Skip to content

Commit

Permalink
fix: post loading 文章显示延迟问题
Browse files Browse the repository at this point in the history
Now the default opacity is 1,
article will be shown immediately without animation.
  • Loading branch information
MOxFIVE committed Mar 7, 2016
1 parent 9bc4c6b commit 4adf95e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 3 additions & 0 deletions layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
<link href="//cdn.bootcss.com/jqueryui/1.10.4/css/jquery-ui.min.css" rel="stylesheet">
<% } %>
<%- css('css/style') %>
<% if (is_home() && theme.animate){ %>
<style> .article { opacity: 0;} </style>
<% } %>
<%- css('font-awesome/css/font-awesome.min') %>
<link rel="apple-touch-icon" href="<%- theme.root_url %>/apple-touch-icon.png">
<% if (is_home()){ %>
Expand Down
5 changes: 0 additions & 5 deletions source/css/_partial/article.styl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
margin-bottom: 5px;
position: relative;
background: article-color;
opacity: 0;
-webkit-transition: all 0.2s ease-in;
&.show{
visibility: visible;
Expand All @@ -24,10 +23,6 @@
}
}

if !hexo-config("animate")
.article
opacity 1

@-webkit-keyframes cd-bounce-1 {
0% {
opacity: 0;
Expand Down

0 comments on commit 4adf95e

Please sign in to comment.