From 63497f1ad2a2ceb7368b6f84b76448a9e47d1111 Mon Sep 17 00:00:00 2001 From: shenyu <448766534@qq.com> Date: Thu, 9 Jan 2020 19:55:59 +0800 Subject: [PATCH] fix:arrow jump&styles --- layout/_partial/archive.ejs | 3 ++- layout/_partial/ayer.ejs | 2 +- source/js/ayer.js | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/layout/_partial/archive.ejs b/layout/_partial/archive.ejs index 5607aac..dfddfa9 100644 --- a/layout/_partial/archive.ejs +++ b/layout/_partial/archive.ejs @@ -9,8 +9,9 @@ else title = __('archive_a'); } %> + <% if (pagination !== 2){ %>

<%- title %>

- + <% } %> <% if (pagination == 2){ %> <% page.posts.each(function(post){ %> <%- partial('article', {post: post, index: true}) %> diff --git a/layout/_partial/ayer.ejs b/layout/_partial/ayer.ejs index 2a85c73..170de76 100644 --- a/layout/_partial/ayer.ejs +++ b/layout/_partial/ayer.ejs @@ -25,7 +25,7 @@
- +
<% } %> \ No newline at end of file diff --git a/source/js/ayer.js b/source/js/ayer.js index 81ad9e4..d699ec2 100644 --- a/source/js/ayer.js +++ b/source/js/ayer.js @@ -137,11 +137,11 @@ margins: 5 }); - // + // scroll down $(document).ready(function ($) { - $('.anchor').click(function (event) { - event.preventDefault(); - $('main').animate({ scrollTop: $(this.hash).offset().top }, 'smooth'); + $('.anchor').click(function (e) { + e.preventDefault(); + $('main').animate({ scrollTop: $('.cover').height() }, 'smooth'); }); });