Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #48 Footer position #550

Merged
merged 9 commits into from
Dec 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions source/css/_common/outline/outline.styl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ html, body { height: 100%; }
}
}


// Main Section
// --------------------------------------------------
.main { padding-bottom: $footer-height + $gap-between-main-and-footer; }
.main-inner {
margin: 0 auto;
width: $content-desktop;
Expand All @@ -47,15 +47,11 @@ html, body { height: 100%; }
// Footer Section
// --------------------------------------------------
.footer {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
min-height: $footer-height;
padding: 20px 0;
}
.footer-inner {
box-sizing: border-box;
margin: 20px auto;
margin: 0px auto;
width: $content-desktop;

+desktop-large() {
Expand Down
7 changes: 0 additions & 7 deletions source/css/_schemes/Pisces/_layout.styl
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@

.main {
clearfix();
+tablet() {
padding-bottom: 100px;
}
+mobile() {
padding-bottom: 100px;
}
}

.container .main-inner {
Expand Down Expand Up @@ -128,4 +122,3 @@
padding-right: 260px;
}
}

27 changes: 0 additions & 27 deletions source/css/_variables/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
// =================================================



// Colors
// colors for use across theme.
// --------------------------------------------------

$whitesmoke = #f5f5f5
$gainsboro = #eee
$gray-lighter = #ddd
Expand All @@ -25,11 +23,9 @@ $blue-deep = #262a30
$orange = #fc6423



// Scaffolding
// Settings for some of the most global styles.
// --------------------------------------------------

// Global text color on <body>
$text-color = $black-light

Expand All @@ -50,12 +46,9 @@ $selection-bg = $blue-deep
$selection-color = white



// Typography
// Font, line-height, and elements colors.
// --------------------------------------------------


get_font_family(config) {
custom_family = hexo-config('font.' + config + '.family')
return custom_family is a 'string' ? custom_family : null
Expand Down Expand Up @@ -113,7 +106,6 @@ $line-height-base = 2
$line-height-code-block = 1.6 // Can't be less than 1.3



// Z-index master list
// --------------------------------------------------
$zindex-bottom = -1
Expand All @@ -124,7 +116,6 @@ $zindex-4 = 1040
$zindex-5 = 1050



// Table
// --------------------------------------------------
$table-width = 100%
Expand All @@ -140,7 +131,6 @@ $table-row-odd-bg-color = #f9f9f9
$table-row-hover-bg-color = $whitesmoke



// Code & Code Blocks
// --------------------------------------------------
$code-font-family = $font-family-monospace
Expand All @@ -151,10 +141,8 @@ $code-foreground = $black-light
$code-background = $gainsboro



// Buttons
// --------------------------------------------------

$btn-font-weight = normal

$btn-default-radius = 0
Expand All @@ -168,10 +156,8 @@ $btn-default-hover-color = $black-deep
$btn-default-hover-border-color = $black-deep



// Pagination
// --------------------------------------------------

$pagination-border = $gainsboro

$pagination-link-bg = transparent
Expand All @@ -187,11 +173,8 @@ $pagination-active-color = white
$pagination-active-border = $grey-light



// Layout sizes
// --------------------------------------------------


$content-desktop = 700px
$content-desktop-large = 800px
$content-desktop-largest = 900px
Expand All @@ -200,23 +183,16 @@ $content-desktop-padding = 40px
$content-tablet-padding = 10px
$content-mobile-padding = 8px

$footer-height = 50px

$gap-between-main-and-footer = 100px



// Headband
// --------------------------------------------------
$headband-height = 3px
$headband-bg = $black-deep



// Section Header
// Variables for header section elements.
// --------------------------------------------------

$head-bg = transparent

// Site Meta
Expand All @@ -237,7 +213,6 @@ $menu-link-border = transparent
$menu-link-hover-border = $black-deep



// Posts Expand
// --------------------------------------------------
$posts-expand-title-font-weight = $font-weight-normal
Expand Down Expand Up @@ -302,7 +277,6 @@ $toc-link-active-current-border-color = $sidebar-highlight

// Components
// --------------------------------------------------

// Back to top
$b2t-opacity = 1
$b2t-position-bottom = -100px
Expand All @@ -322,7 +296,6 @@ $post-eof-margin-bottom = 60px // or 120px for less white space
// Iconography
// Icons SVG Base64
// --------------------------------------------------

// blockquote-center icon
$center-quote-left = '../images/quote-l.svg'
$center-quote-right = '../images/quote-r.svg'
Expand Down
3 changes: 1 addition & 2 deletions source/js/src/motion.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ $(document).ready(function() {
self.sidebarEl.addClass('sidebar-active');
self.sidebarEl.trigger('sidebar.didShow');
}
}
);
});

this.sidebarEl.trigger('sidebar.isShowing');
},
Expand Down
7 changes: 4 additions & 3 deletions source/js/src/schemes/pisces.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
$(document).ready(function() {

var sidebarInner = $('.sidebar-inner');
var sidebarOffset = CONFIG.sidebar.offset ? CONFIG.sidebar.offset : 12;
var sidebarOffset = CONFIG.sidebar.offset || 12;

function getHeaderOffset() {
return $('.header-inner').height() + sidebarOffset;
}

function getFooterOffset() {
var footer = $('#footer');
var footerInner = $('.footer-inner');
var footerMargin = footerInner.outerHeight(true) - footerInner.outerHeight();
var footerOffset = footerInner.outerHeight(true) + footerMargin;
var footerMargin = footer.outerHeight() - footerInner.outerHeight();
var footerOffset = footer.outerHeight() + footerMargin;
return footerOffset;
}

Expand Down
5 changes: 0 additions & 5 deletions source/js/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ NexT.utils = NexT.$u = {
}
}
});

},

registerESCKeyEvent: function() {
Expand Down Expand Up @@ -260,7 +259,6 @@ NexT.utils = NexT.$u = {
var $div = $('<div />').addClass('scrollbar-measure').prependTo('body');
var div = $div[0];
var scrollbarWidth = div.offsetWidth - div.clientWidth;

$div.remove();

return scrollbarWidth;
Expand Down Expand Up @@ -289,7 +287,6 @@ NexT.utils = NexT.$u = {
: (sidebarPadding * 2) + (sidebarNavHeight / 2);
return sidebarSchemePadding;
}

};

$(document).ready(function() {
Expand Down Expand Up @@ -329,7 +326,5 @@ $(document).ready(function() {
// Initialize Sidebar & TOC Height.
updateSidebarHeight(document.body.clientHeight - NexT.utils.getSidebarSchemePadding());
}

initSidebarDimension();

});