Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
子溯 committed Sep 15, 2016
1 parent 94c1844 commit 0a1785f
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 40 deletions.
2 changes: 1 addition & 1 deletion base.jade
Expand Up @@ -6,7 +6,6 @@ html
+i18n('Tags', '标签', 'zh_cn')
+i18n('About', '关于', 'zh_cn')
+i18n('Links', '友链', 'zh_cn')

head
meta(http-equiv="Content-Type", content="text/html; charset=UTF-8")
block title
Expand All @@ -15,6 +14,7 @@ html
meta(name="author", content="CaiCai,hi@cai-cai.me")
meta(name="keywords", content=site.configs.keywords.escaped)
meta(name="description", content=site.raw_content.escaped)
link(rel="stylesheet", type="text/css", href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,latin-ext")
+load('font')
+get_resource("blog_basic.css")
+load('/template/style/css/style.scss')
Expand Down
8 changes: 8 additions & 0 deletions index.jade
@@ -0,0 +1,8 @@
from mixins import make_post, make_pager

extends base.jade
block content
.autopagerize_page_element:.content
for post in posts
+make_post(post, is_detail=False)
+make_pager('Older Posts', 'Newer Posts')
45 changes: 19 additions & 26 deletions mixins.jade
Expand Up @@ -10,32 +10,25 @@ mixin make_post(post, is_detail=False)
.post-content= post.content
else
.post-content= post.content.limit(200).no_pic
.post-footer
.tags
ul
for tag in post.tags
li
a.btn(role="tags",href="/tags/{{ tag }}")= tag
.meta
.info
i.fa.fa-clock-o
span.date= post.date.format("%Y-%m-%d")
if site.configs.disqus
i.fa.fa-comment-o
a(href="{{post.url}}#disqus_thread") Comments
.like-reblog-buttons
.reblog-button
a(href="javascript:void((function(s,d,e){try{}catch(e){}var f='http://service.weibo.com/share/share.php?',u=d.location.href,p=['url=',e(u),'&title=',e(d.title),'&appkey=2924220432'].join('');function a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=620,height=450,left=',(s.width-620)/2,',top=',(s.height-450)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})(screen,document,encodeURIComponent));")
i.fa.fa-plus
.post-footer:.meta
.info
i.fa.fa-clock-o
span.date= post.date.format("%Y-%m-%d")
if site.configs.disqus
i.fa.fa-comment-o
a(href="{{post.url}}#disqus_thread") Comments
.like-reblog-buttons
.reblog-button
a(href="javascript:void((function(s,d,e){try{}catch(e){}var f='http://service.weibo.com/share/share.php?',u=d.location.href,p=['url=',e(u),'&title=',e(d.title),'&appkey=2924220432'].join('');function a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=620,height=450,left=',(s.width-620)/2,',top=',(s.height-450)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})(screen,document,encodeURIComponent));")
i.fa.fa-plus

mixin make_pager(pre_text, next_text)
if paginator.has_next or paginator.has_previous
.pagination
ul.clearfix
if paginator.has_next
li.next.pagbuttons
a.btn(role="navigation",href="{{ paginator.next_page_url}}")= next_text
.pagination
ul.clearfix
if paginator.has_next
li.next.pagbuttons
a.btn(role="navigation",href="{{ paginator.next_page_url}}")= next_text

if paginator.has_previous
li.pre.pagbuttons
a.btn(role="navigation",href="{{ paginator.previous_page_url }}")= pre_text
if paginator.has_previous
li.pre.pagbuttons
a.btn(role="navigation",href="{{ paginator.previous_page_url }}")= pre_text
21 changes: 8 additions & 13 deletions style/css/style.scss
Expand Up @@ -8,15 +8,11 @@ body {
color: rgba(0, 0, 0, 0.6);
font-family: 'Open Sans', sans-serif;
font-size: 15px;

width: 100%;
margin: 0 auto 30px auto;
background-color: #fff;

}



p {
line-height: 1.9em;
font-weight: 400;
Expand Down Expand Up @@ -136,7 +132,10 @@ a:hover, a:active {
margin: 0 auto;
}


.list_with_title .container{
width: 720px;
margin: 0 auto;
}
.header {
width: 720px;
padding: 100px 0;
Expand All @@ -148,6 +147,7 @@ a:hover, a:active {
text-align: center;
padding: 0 20px;


.description {
padding: 20px 5px 0px 5px;
font-size: 14px;
Expand All @@ -162,9 +162,11 @@ a:hover, a:active {
.title{
h1 {
text-transform: uppercase;
font-size: 24px;
font-size: 4rem;
font-weight: bold;
letter-spacing: 5px;
line-height: 1;
margin:0;
}

a {
Expand Down Expand Up @@ -449,10 +451,6 @@ a:hover, a:active {
}






/* 评论样式 */

.comment-count {
Expand Down Expand Up @@ -596,11 +594,8 @@ a.btn {
}




@media screen and (max-width: 900px) {
.header {
display: none;
}

.content{
Expand Down
12 changes: 12 additions & 0 deletions style/js/font.js
@@ -0,0 +1,12 @@
WebFontConfig = {
google: { families: [ 'Open+Sans:700italic,400,300,800,700,600:cyrillic-ext,latin,latin-ext' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();

0 comments on commit 0a1785f

Please sign in to comment.