Skip to content

Commit

Permalink
add github card widget
Browse files Browse the repository at this point in the history
  • Loading branch information
mutse committed Sep 27, 2015
1 parent 2ce1a1a commit 180b134
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ You can learn how to use them from [Configuration](https://github.com/wuchong/ja
- [Yangxiaolei's blog](http://yangxiaolei.me) - 让知识成为信仰,让优秀成为习惯
- [CC's blog](http://ccloveyou.org) - CC
- [TadGuo's pages](http://watermeion.github.io) - More is different.
- [Mutse's blog](http://mutse.github.io) - Love Life, Love open source

If you are using Jacman,you can add your site [here](https://github.com/wuchong/jacman/wiki/Sites) ! I'll push the available sites here.

Expand Down
1 change: 1 addition & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ git pull origin master
- [Yangxiaolei's blog](http://yangxiaolei.me) - 让知识成为信仰,让优秀成为习惯
- [CC's blog](http://ccloveyou.org) - CC
- [TadGuo's pages](http://watermeion.github.io) - More is different.
- [Mutse's blog](http://mutse.github.io) - 爱生活,爱开源

如果你正在使用 Jacman主题,欢迎将网址添加到[wiki的网站列表](https://github.com/wuchong/jacman/wiki/Sites)。我会不定期进行整理。

Expand Down
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ menu:

#### Widgets
widgets:
- github-card
- category
- tag
- links
- douban
- rss
## provide seven widgets:category,tag,rss,archive,tagcloud,links,weibo,douban
## provide eight widgets:github-card,category,tag,rss,archive,tagcloud,links,weibo


#### RSS
Expand Down
2 changes: 2 additions & 0 deletions languages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ menu: Menu
weibo: Weibo
links: Links
rss: RSS
doubanshow: Douban Show
github-card: Github Card
showsidebar: Show Sidebar
hidesidebar: Hide Sidebar
updated: Updated
Expand Down
2 changes: 2 additions & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ menu: 菜单
links: 友情链接
weibo: 新浪微博
rss: RSS 订阅
doubanshow: 豆瓣秀
github-card: Github 名片
showsidebar: 显示侧边栏
hidesidebar: 隐藏侧边栏
updated: 更新日期
Expand Down
2 changes: 2 additions & 0 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ menu: 菜單
links: 友情鏈接
weibo: 新浪微博
rss: RSS 訂閱
doubanshow: 豆瓣秀
github-card: Github 名片
showsidebar: 顯示側邊欄
hidesidebar: 隱藏側邊欄
updated: 更新日期
Expand Down
2 changes: 1 addition & 1 deletion layout/_widget/douban.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<% if(theme.author.douban) { %>
<div class="doubanshow">
<p class="asidetitle">豆瓣秀</p>
<p class="asidetitle"><%= __('doubanshow') %></p>
<div>
<script type="text/javascript" src="http://www.douban.com/service/badge/<%= theme.author.douban %>/?show=collection&amp;n=12&amp;columns=3&amp;hidelogo=yes&amp;hideself=yes&amp;cat=book|movie" ></script>
</div>
Expand Down
6 changes: 6 additions & 0 deletions layout/_widget/github-card.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<% if(theme.author.github) { %>
<p class="asidetitle"><%= __('github-card') %></p>
<div class="github-card" data-github="<%= theme.author.github %>" data-width="220" data-height="119" data-theme="medium">
<script type="text/javascript" src="//cdn.jsdelivr.net/github-cards/latest/widget.js" ></script>
</div>
<% } %>
14 changes: 14 additions & 0 deletions source/css/_partial/aside.styl
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,17 @@
margin 1em 0 0
div
padding 0.5em 0

//github-card
.github-card
margin-top 1.5em
@media mini
width 45%
float left
margin 0 5% 0 0
@media tablet
width 100%
float none
margin 1em 0 0
div
padding 0.5em 0

0 comments on commit 180b134

Please sign in to comment.