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 8 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
21 changes: 10 additions & 11 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cache:
# And if you want to place your icons in `hexo-site/source/` root directory, you must remove `/images` prefix from pathes.

# For example, you put your favicons into `hexo-site/source/images` directory.
# Then need to rename & redefine they on any other names, otherwise icons from Next will rewrite your custom icons in Hexo.
# Then need to rename & redefine them on any other names, otherwise icons from Next will rewrite your custom icons in Hexo.
favicon:
small: /images/favicon-16x16-next.png
medium: /images/favicon-32x32-next.png
Expand Down Expand Up @@ -72,7 +72,7 @@ footer:
# Change the color of icon, using Hex Code.
color: "#808080"

# If not defined, will be used `author` from Hexo main config.
# If not defined, `author` from Hexo main config will be used.
copyright:
# -------------------------------------------------------------
powered:
Expand All @@ -99,7 +99,7 @@ footer:

# Creative Commons 4.0 International License.
# https://creativecommons.org/share-your-work/licensing-types-examples
# Available: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero
# Available values: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero
creative_commons:
license: by-nc-sa
sidebar: false
Expand Down Expand Up @@ -135,7 +135,7 @@ exturl: false
# Key is the name of menu item. If translate for this menu will find in languages - this translate will be loaded; if not - Key name will be used. Key is case-senstive.
# Value before `||` delimeter is the target link.
# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, question icon will be loaded.
# External url should start with http:// or https:// .
# External url should start with http:// or https://
menu:
home: / || home
#about: /about/ || user
Expand Down Expand Up @@ -170,7 +170,7 @@ scheme: Muse
# Posts / Categories / Tags in sidebar.
site_state: true

# Social Links.
# Social Links
# Usage: `Key: permalink || icon`
# Key is the link label showing to end users.
# Value before `||` delimeter is the target permalink.
Expand Down Expand Up @@ -231,7 +231,7 @@ toc:
max_depth: 6

sidebar:
# Sidebar Position, available value: left | right (only for Pisces | Gemini).
# Sidebar Position, available values: left | right (only for Pisces | Gemini).
position: left
#position: right

Expand All @@ -241,7 +241,7 @@ sidebar:
# Pisces | Gemini: 240
#width: 300

# Sidebar Display, available value (only for Muse | Mist):
# Sidebar Display, available values (only for Muse | Mist):
# - post expand on posts automatically. Default.
# - always expand for all pages automatically
# - hide expand only when click on the sidebar toggle icon.
Expand Down Expand Up @@ -365,7 +365,7 @@ mobile_layout_economy: false
# Android Chrome header panel color ($brand-bg / $headband-bg => $black-deep).
android_chrome_color: "#222"

# Custom Logo.
# Custom Logo
# Do not support Scheme Mist currently.
# Options:
# enabled: If true, will enable custom logo
Expand Down Expand Up @@ -575,7 +575,7 @@ gitalk:
distraction_free_mode: true # Facebook-like distraction free mode

# Baidu Share
# Available value:
# Available values:
# button | slide
# Warning: Baidu Share does not support https.
#baidushare:
Expand All @@ -586,8 +586,7 @@ gitalk:

# NeedMoreShare2
# Dependencies: https://github.com/theme-next/theme-next-needmoreshare2
# See: https://github.com/revir/need-more-share2
# Also see: https://github.com/DzmVasileusky/needShareButton
# See: https://github.com/revir/need-more-share2, https://github.com/DzmVasileusky/needShareButton
# iconStyle: default | box
# boxForm: horizontal | vertical
# position: top / middle / bottom + Left / Center / Right
Expand Down
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 @@ -321,7 +295,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();

});