Skip to content

Commit

Permalink
# 修复当有README文件时,底部高度过高的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyo committed Aug 20, 2018
1 parent 6e2f6d6 commit bcfd28a
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions resources/themes/bootstrap/index.php
Expand Up @@ -74,8 +74,8 @@ function AddFavorite(title, url) {
<!-- 顶部公告栏 -->
</div>
</div>
<div class="container">
<div class="page-content container">
<div class="container" id="container_top">
<div class="page-content container" id="container_page">
<?php file_exists('header.php') ? include('header.php') : include($lister->getThemePath(true) . "/default_header.php"); ?>
<?php if($lister->getSystemMessages()): ?>
<?php foreach ($lister->getSystemMessages() as $message): ?>
Expand Down Expand Up @@ -110,9 +110,6 @@ function AddFavorite(title, url) {
</div>
</a>
<?php if (is_file($fileInfo['file_path'])): ?>
<!-- a href="javascript:void(0)" class="file-info-button">
<i class="fa fa-info-circle"></i>
</a -->
<?php else: ?>
<?php if ($lister->containsIndex($fileInfo['file_path'])): ?>
<a href="<?php echo $fileInfo['file_path']; ?>" class="web-link-button" <?php if($lister->externalLinksNewWindow()): ?>target="_blank"<?php endif; ?>>
Expand All @@ -134,5 +131,16 @@ 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"); ?>
</body>
</html>
<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';
}
});
</script>
</body>
</html>

0 comments on commit bcfd28a

Please sign in to comment.