Permalink
Browse files

Add other social network badges for the Rock template.

Corrected the path in screen.css to show other badges, and the settings.php to be easily customizable.
  • Loading branch information...
1 parent 59dd776 commit 7801e1ab3424585e74a896401b0a08fbf8cffce1 @Chouffy Chouffy committed Dec 27, 2014
Showing with 38 additions and 18 deletions.
  1. +4 −0 settings.php
  2. +16 −0 templates/rock/base.html
  3. +18 −18 templates/rock/css/screen.css
View
@@ -30,6 +30,10 @@
//your github url
$blog_config['github'] = 'https://github.com/hjue/JustWriting';
+//other social network : twitter, facebook, rss and email. For example :
+$blog_config['twitter'] = '';
+//there's more supported networks, but you must add them manually to \templates\rock\base.html - names are in \templates\rock\images\social\*
+
//posts count of posts list
$blog_config['posts_per_page'] = 10;
@@ -70,6 +70,22 @@
<a class="github" href="{{ config.github }}" title="GitHub">GitHub</a>
{% endif %}
+ {% if config.twitter %}
+ <a class="twitter" href="{{ config.twitter }}" title="Twitter">Twitter</a>
+ {% endif %}
+
+ {% if config.rss %}
+ <a class="rss" href="{{ config.rss }}" title="RSS">RSS</a>
+ {% endif %}
+
+ {% if config.facebook %}
+ <a class="facebook" href="{{ config.facebook }}" title="Facebook">Facebook</a>
+ {% endif %}
+
+ {% if config.email %}
+ <a class="email" href="{{ config.email }}" title="e-Mail">e-Mail</a>
+ {% endif %}
+
</div>
</nav>
@@ -103,43 +103,43 @@ a{text-decoration:none;outline-width:0;color:#258fb8}
}
#sub-nav .social a{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;display:-moz-inline-stack;display:inline-block;vertical-align:middle;*vertical-align:auto;zoom:1;*display:inline;text-indent:-9999px;margin:0 10px 10px 0;opacity:0.5;width:28px;height:28px;-webkit-transition:0.3s;-moz-transition:0.3s;-o-transition:0.3s;transition:0.3s}
#sub-nav .social a:hover{opacity:1}
-#sub-nav .social a.facebook{background:url('/images/social/facebook.png') center no-repeat #3b5998;border:1px solid #3b5998}
+#sub-nav .social a.facebook{background:url('../images/social/facebook.png') center no-repeat #3b5998;border:1px solid #3b5998}
#sub-nav .social a.facebook:hover{border:1px solid #2d4373}
-#sub-nav .social a.google{background:url('/images/social/google.png') center no-repeat #c83d20;border:1px solid #c83d20}
+#sub-nav .social a.google{background:url('../images/social/google.png') center no-repeat #c83d20;border:1px solid #c83d20}
#sub-nav .social a.google:hover{border:1px solid #9c3019}
-#sub-nav .social a.twitter{background:url('/images/social/twitter.png') center no-repeat #55cff8;border:1px solid #55cff8}
+#sub-nav .social a.twitter{background:url('../images/social/twitter.png') center no-repeat #55cff8;border:1px solid #55cff8}
#sub-nav .social a.twitter:hover{border:1px solid #24c1f6}
#sub-nav .social a.github{background:url('../images/social/github.png') center no-repeat #afb6ca;border:1px solid #afb6ca}
#sub-nav .social a.github:hover{border:1px solid #909ab6}
-#sub-nav .social a.linkedin{background:url('/images/social/linkedin.png') center no-repeat #005a87;border:1px solid #005a87}
+#sub-nav .social a.linkedin{background:url('../images/social/linkedin.png') center no-repeat #005a87;border:1px solid #005a87}
#sub-nav .social a.linkedin:hover{border:1px solid #003854}
-#sub-nav .social a.pinterest{background:url('/images/social/pinterest.png') center no-repeat #be4037;border:1px solid #be4037}
+#sub-nav .social a.pinterest{background:url('../images/social/pinterest.png') center no-repeat #be4037;border:1px solid #be4037}
#sub-nav .social a.pinterest:hover{border:1px solid #96332c}
-#sub-nav .social a.delicious{background:url('/images/social/delicious.png') center no-repeat #3271cb;border:1px solid #3271cb}
+#sub-nav .social a.delicious{background:url('../images/social/delicious.png') center no-repeat #3271cb;border:1px solid #3271cb}
#sub-nav .social a.delicious:hover{border:1px solid #285aa2}
-#sub-nav .social a.pinboard{background:url('/images/social/pinboard.png') center no-repeat #0066c8;border:1px solid #3a729f}
+#sub-nav .social a.pinboard{background:url('../images/social/pinboard.png') center no-repeat #0066c8;border:1px solid #3a729f}
#sub-nav .social a.pinboard:hover{border:1px solid #0052cc}
-#sub-nav .social a.instagram{background:url('/images/social/instagram.png') center no-repeat #afb6ca;border:1px solid #afb6ca}
+#sub-nav .social a.instagram{background:url('../images/social/instagram.png') center no-repeat #afb6ca;border:1px solid #afb6ca}
#sub-nav .social a.instagram:hover{border:1px solid #61210b}
-#sub-nav .social a.weibo{background:url('/images/social/weibo.png') center no-repeat #b40404;border:1px solid #b40404}
+#sub-nav .social a.weibo{background:url('../images/social/weibo.png') center no-repeat #b40404;border:1px solid #b40404}
#sub-nav .social a.weibo:hover{border:1px solid #eb182c}
-#sub-nav .social a.qq{background:url('/images/social/qq.png') center no-repeat #128abc;border:1px solid #128abc}
+#sub-nav .social a.qq{background:url('../images/social/qq.png') center no-repeat #128abc;border:1px solid #128abc}
#sub-nav .social a.qq:hover{border:1px solid #519cba}
-#sub-nav .social a.qq2{background:url('/images/social/qq2.png') center no-repeat #111111;border:1px solid #111111}
+#sub-nav .social a.qq2{background:url('../images/social/qq2.png') center no-repeat #111111;border:1px solid #111111}
#sub-nav .social a.qq2:hover{border:1px solid #313131}
-#sub-nav .social a.qqqun{background:url('/images/social/qqqun.png') center no-repeat #111111;border:1px solid #111111}
+#sub-nav .social a.qqqun{background:url('../images/social/qqqun.png') center no-repeat #111111;border:1px solid #111111}
#sub-nav .social a.qqqun:hover{border:1px solid #313131}
-#sub-nav .social a.weixin{background:url('/images/social/weixin.png') center no-repeat #1d8c0f;border:1px solid #1d8c0f}
+#sub-nav .social a.weixin{background:url('../images/social/weixin.png') center no-repeat #1d8c0f;border:1px solid #1d8c0f}
#sub-nav .social a.weixin:hover{border:1px solid #328d26}
-#sub-nav .social a.fanfou{background:url('/images/social/fanfou.png') center no-repeat #00a0d0;border:1px solid #00a0d0}
+#sub-nav .social a.fanfou{background:url('../images/social/fanfou.png') center no-repeat #00a0d0;border:1px solid #00a0d0}
#sub-nav .social a.fanfou:hover{border:1px solid #00c3f3}
-#sub-nav .social a.zhihu{background:url('/images/social/zhihu.png') center no-repeat #177fc3;border:1px solid #177fc3}
+#sub-nav .social a.zhihu{background:url('../images/social/zhihu.png') center no-repeat #177fc3;border:1px solid #177fc3}
#sub-nav .social a.zhihu:hover{border:1px solid #31a5e5}
-#sub-nav .social a.douban{background:url('/images/social/douban.png') center no-repeat #088a08;border:1px solid #088a08}
+#sub-nav .social a.douban{background:url('../images/social/douban.png') center no-repeat #088a08;border:1px solid #088a08}
#sub-nav .social a.douban:hover{border:1px solid #007711}
-#sub-nav .social a.email{background:url('/images/social/email.png') center no-repeat #ffb900;border:1px solid #ffb900}
+#sub-nav .social a.email{background:url('../images/social/email.png') center no-repeat #ffb900;border:1px solid #ffb900}
#sub-nav .social a.email:hover{border:1px solid #ffcd51}
-#sub-nav .social a.rss{background:url('/images/social/rss.png') center no-repeat #ef7522;border:1px solid #ef7522}
+#sub-nav .social a.rss{background:url('../images/social/rss.png') center no-repeat #ef7522;border:1px solid #ef7522}
#sub-nav .social a.rss:hover{border:1px solid #cf5d0f}
#pagenavi{padding:20px 0;height:20px;line-height:20px;position:relative;border-top:1px solid #fff;border-bottom:1px solid #ddd}
#pagenavi a:hover{text-decoration:underline}

0 comments on commit 7801e1a

Please sign in to comment.