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 #573: [Muse & Mist] Footer is not at the bottom of the page #574

Merged
merged 2 commits into from
Jan 10, 2019
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
2 changes: 1 addition & 1 deletion layout/_macro/post-collapse.swig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="post-meta">
<time class="post-time" itemprop="dateCreated"
datetime="{{ moment(post.date).format() }}"
content="{{ date(post.date, config.date_format) }}" >
content="{{ date(post.date, config.date_format) }}">
{{ date(post.date, 'MM-DD') }}
</time>
</div>
Expand Down
6 changes: 3 additions & 3 deletions layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
</span>

{% if post.categories and post.categories.length and theme.post_meta.categories %}
<span class="post-category" >
<span class="post-category">
{% if theme.post_meta.created_at or theme.post_meta.updated_at %}
<span class="post-meta-divider">|</span>
{% endif %}
Expand Down Expand Up @@ -175,7 +175,7 @@
</a>
{% else %}
<a href="{{ url_for(post.path) }}#SOHUCS" itemprop="discussionUrl">
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span> <span id="url::{{ post.permalink }}" class="cy_cmt_count" data-xid="{{ post.path }}" itemprop="commentsCount" ></span>
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span> <span id="url::{{ post.permalink }}" class="cy_cmt_count" data-xid="{{ post.path }}" itemprop="commentsCount"></span>
</a>
{% endif %}
{% elseif is_post() and theme.gitment.enable and theme.gitment.mint and theme.gitment.count %}
Expand Down Expand Up @@ -221,7 +221,7 @@
{% if not theme.post_meta.item_text %} title="{{ __('post.views') }}" {% endif %}>
<i class="fa fa-{{ theme.busuanzi_count.post_views_icon }}"></i>
{% if theme.post_meta.item_text %} {{ __('post.views') + __('symbol.colon') }} {% endif %}
<span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>
<span class="busuanzi-value" id="busuanzi_value_page_pv"></span>
</span>
{% endif %}

Expand Down
1 change: 1 addition & 0 deletions layout/_scripts/schemes/mist.swig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include 'muse.swig' %}
9 changes: 9 additions & 0 deletions layout/_scripts/schemes/muse.swig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{%
set scripts = [
'src/schemes/muse.js'
]
%}

{% for script in scripts %}
<script src="{{ url_for(theme.js) }}/{{ script }}?v={{ version }}"></script>
{% endfor %}
18 changes: 2 additions & 16 deletions source/css/_common/components/footer/footer.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
@keyframes iconAnimate {
0%, 100% { transform: scale(1); }
10%, 30% { transform: scale(0.9); }
20%, 40%, 60%, 80% {transform: scale(1.1); }
50%, 70% {transform: scale(1.1); }
20%, 40%, 60%, 80% { transform: scale(1.1); }
50%, 70% { transform: scale(1.1); }
}

if hexo-config('footer.icon.animated') {
Expand All @@ -28,17 +28,3 @@ if hexo-config('footer.icon.animated') {

.powered-by,
.theme-info { display: inline-block; }

.cc-license {
margin-top: 10px;
text-align: center;

.cc-opacity {
opacity: 0.7;
border-bottom: none;

&:hover { opacity: 0.9; }
}

img { display: inline-block; }
}
1 change: 0 additions & 1 deletion source/css/_common/components/highlight/highlight.styl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ pre {
.line { height: 20px; }
}


.gutter {
-webkit-user-select: none;
-moz-user-select: none;
Expand Down
1 change: 1 addition & 0 deletions source/css/_common/components/sidebar/sidebar-nav.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
margin: 0 0 20px;
padding-left: 0;
}

.sidebar-nav li {
display: inline-block;
cursor: pointer;
Expand Down
14 changes: 14 additions & 0 deletions source/css/_common/components/sidebar/sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@
overflow-x: hidden;
}

.cc-license {
margin-top: 10px;
text-align: center;

.cc-opacity {
opacity: 0.7;
border-bottom: none;

&:hover { opacity: 0.9; }
}

img { display: inline-block; }
}

@import "sidebar-toggle";
@import "sidebar-author";
@import "site-state";
Expand Down
1 change: 1 addition & 0 deletions source/css/_common/components/sidebar/site-state.styl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

a { border-bottom: none; }
}

.site-state-item-count {
display: block;
text-align: center;
Expand Down
1 change: 0 additions & 1 deletion source/css/_common/outline/outline.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ html, body { height: 100%; }

.container {
position: relative;
min-height: 100%;
}


Expand Down
1 change: 0 additions & 1 deletion source/css/_common/scaffolding/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ img {
height: auto;
}


hr {
margin: 40px 0;
height: 3px;
Expand Down
1 change: 0 additions & 1 deletion source/css/_common/scaffolding/mobile.styl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

}


// < 767px
+mobile() {

Expand Down
9 changes: 9 additions & 0 deletions source/js/src/schemes/muse.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$(document).ready(function() {
function updateFooterPosition() {
var containerHeight = $('#footer').attr('position') ? $('.container').height() + $('#footer').outerHeight(true) : $('.container').height();
if (containerHeight < window.innerHeight) $('#footer').css({ 'position': 'fixed', 'bottom': 0, 'left': 0, 'right': 0 }).attr('position', 'fixed');
else $('#footer').removeAttr('style position');
}
updateFooterPosition();
$(window).on('resize scroll', updateFooterPosition);
});
1 change: 0 additions & 1 deletion source/js/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ $(document).ready(function() {
* Init Sidebar & TOC inner dimensions on all pages and for all schemes.
* Need for Sidebar/TOC inner scrolling if content taller then viewport.
*/

function updateSidebarHeight(height) {
height = height || 'auto';
$('.site-overview, .post-toc').css('max-height', height);
Expand Down