Skip to content
Permalink
Browse files

add recommended posts support

  • Loading branch information...
hiberabyss committed May 6, 2018
1 parent 8f4fdc1 commit 499d5ef3f73b6735cd5cf848438055501208a59b
Showing with 21 additions and 1 deletion.
  1. +3 −0 _config.yml
  2. +8 −0 layout/post.pug
  3. +10 −1 source/css/style.scss
@@ -93,6 +93,9 @@ recommendations:
v2ex: true
# ali_redpacket: /img/AliRedPacket.jpeg

recommended_posts:
enable: true

# qrcode: /img/AliRedPacket.jpeg

highlight:
@@ -37,6 +37,14 @@ block content
if theme.donate.enable == true
iframe(src='/donate/?AliPayQR=' + theme.donate.alipay_qr + '&WeChatQR=' + theme.donate.wechat_qr + '&GitHub=' + theme.donate.github + '&BTCQR=' + theme.donate.btc_qr + '&BTCKEY='+ theme.donate.btc_key + '&PayPal=' + theme.donate.paypal_url, style='overflow-x:hidden; overflow-y:hidden; border:0xp none #fff; min-height:185px; width:100%;', frameborder='0', scrolling='no')

if theme.recommended_posts.enable == true
div.recommended_posts
h3() 推荐阅读
- var post_list = recommended_posts(page, site)
- for (var i in post_list)
li
a(href=post_list[i].permalink, target='_blank')= post_list[i].title

if theme.post_copyright.enable == true
div
ul.post-copyright
@@ -1714,7 +1714,6 @@ em.search-keyword {
text-shadow: 0
}


// Custom styles.
.post-copyright {
margin: 2em 0 0;
@@ -1726,3 +1725,13 @@ em.search-keyword {
margin: 8px 0;
}
}

.recommended_posts {
padding: 0.5em 1em;
border-left: 3px solid #6f42c1;
background-color: #f5f0fa;
li { margin: 5px 0; }
a:link { color: blue; }
a:hover { text-decoration:underline;color: red}
a:visited { color: green; }
}

0 comments on commit 499d5ef

Please sign in to comment.
You can’t perform that action at this time.