Skip to content

Commit

Permalink
# 修复 当存在很短的 README 时,与底部间隔太大的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyo committed Aug 21, 2018
1 parent bcfd28a commit 68d361b
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions resources/themes/bootstrap/index.php
Expand Up @@ -131,16 +131,19 @@ function AddFavorite(title, url) {
</div>
<hr style="margin-bottom: 0;margin-top: 40px;" />
<?php file_exists('footer.php') ? include('footer.php') : include($lister->getThemePath(true) . "/default_footer.php"); ?>
<script type="text/javascript">
<script type="text/javascript">
$(document).ready(function(){
if (document.body.scrollHeight > window.innerHeight)
{
container_top.style.marginBottom = '0';
container_page.style.marginBottom = '0';
container_readme.style.marginBottom = '0';
container_readme.style.marginTop = '20px';
}
if(document.getElementById("container_readme"))
{
container_readme.style.marginBottom = '0';
}
if (document.body.scrollHeight > window.innerHeight)
{
container_top.style.marginBottom = '0';
container_page.style.marginBottom = '0';
container_readme.style.marginTop = '20px';
}
});
</script>
</script>
</body>
</html>

0 comments on commit 68d361b

Please sign in to comment.