fix:arrow jump&styles

This commit is contained in:
shenyu 2020-01-09 19:55:59 +08:00
parent 42b387c94a
commit 63497f1ad2
3 changed files with 7 additions and 6 deletions

View File

@ -9,8 +9,9 @@
else title = __('archive_a'); else title = __('archive_a');
} }
%> %>
<% if (pagination !== 2){ %>
<h1 class="page-type-title"><%- title %></h1> <h1 class="page-type-title"><%- title %></h1>
<% } %>
<% if (pagination == 2){ %> <% if (pagination == 2){ %>
<% page.posts.each(function(post){ %> <% page.posts.each(function(post){ %>
<%- partial('article', {post: post, index: true}) %> <%- partial('article', {post: post, index: true}) %>

View File

@ -25,7 +25,7 @@
</div> </div>
</div> </div>
<div class="cover-learn-more"> <div class="cover-learn-more">
<a href="#main" class="anchor"><i class="ri-arrow-down-line"></i></a> <a href="javascript:void(0)" class="anchor"><i class="ri-arrow-down-line"></i></a>
</div> </div>
</section> </section>
<% } %> <% } %>

View File

@ -137,11 +137,11 @@
margins: 5 margins: 5
}); });
// // scroll down
$(document).ready(function ($) { $(document).ready(function ($) {
$('.anchor').click(function (event) { $('.anchor').click(function (e) {
event.preventDefault(); e.preventDefault();
$('main').animate({ scrollTop: $(this.hash).offset().top }, 'smooth'); $('main').animate({ scrollTop: $('.cover').height() }, 'smooth');
}); });
}); });