diff --git a/languages/default.yml b/languages/default.yml index 0482680..4eb6fb9 100644 --- a/languages/default.yml +++ b/languages/default.yml @@ -13,6 +13,7 @@ page: Page %d recent_posts: Recent Posts menu: Menu weibo: Weibo +music: music links: Links rss: RSS showsidebar: Show Sidebar diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index 7cafd09..56c40ff 100644 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -14,6 +14,7 @@ recent_posts: 近期文章 menu: 菜单 links: 友情链接 weibo: 新浪微博 +music: 云音乐 rss: RSS 订阅 showsidebar: 显示侧边栏 hidesidebar: 隐藏侧边栏 diff --git a/languages/zh-TW.yml b/languages/zh-TW.yml index ee639b4..6ae343b 100644 --- a/languages/zh-TW.yml +++ b/languages/zh-TW.yml @@ -14,6 +14,7 @@ recent_posts: 近期文章 menu: 菜單 links: 友情鏈接 weibo: 新浪微博 +music: 雲音楽 rss: RSS 訂閱 showsidebar: 顯示側邊欄 hidesidebar: 隱藏側邊欄 diff --git a/layout/_partial/after_footer.ejs b/layout/_partial/after_footer.ejs index 9ec284c..5912858 100644 --- a/layout/_partial/after_footer.ejs +++ b/layout/_partial/after_footer.ejs @@ -90,8 +90,8 @@ $(document).ready(function(){ tsina = $this.attr('data-tsina'), description = $this.attr('description'); var html = [ - '', - '
扫描二维码分享到微信朋友圈Loading...Please wait
', +'', +'
扫描二维码分享到微信朋友圈Loading...Please wait
', '', '', '', @@ -100,14 +100,34 @@ $(document).ready(function(){ '' ].join(''); $this.append(html); + + $('.hoverqrcode').hide(); + + var myWidth = 0; + function updatehoverqrcode(){ + if( typeof( window.innerWidth ) == 'number' ) { + myWidth = window.innerWidth; + } else if( document.documentElement && document.documentElement.clientWidth) { + myWidth = document.documentElement.clientWidth; + }; + var qrsize = myWidth > 1024 ? 200:100; + var options = {render: 'image', size: qrsize, fill: '#2ca6cb', text: url, radius: 0.5, quiet: 1}; + var p = $('.article-share-qrcode').position(); + $('.hoverqrcode').empty().css('width', qrsize).css('height', qrsize) + .css('left', p.left-qrsize/2+20).css('top', p.top-qrsize-10) + .qrcode(options); + }; + $(window).resize(function(){ + $('.hoverqrcode').hide(); + }); $('.article-share-qrcode').click(function(){ - var imgSrc = $('#qrcode-pic').attr('data-src'); - $('#qrcode-pic').attr('src', imgSrc); - $('#qrcode-pic').load(function(){ - $('.qrcode strong').text(' '); - }); + updatehoverqrcode(); + $('.hoverqrcode').toggle(); + }); + $('.article-share-qrcode').hover(function(){}, function(){ + $('.hoverqrcode').hide(); }); -}); +}); <% } %> diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 0bd9e24..153db3b 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -34,7 +34,7 @@ <% } %> <% if(theme.author.zhihu){ %> - + <% } %> <% if(theme.author.google_plus){ %> diff --git a/layout/_widget/music.ejs b/layout/_widget/music.ejs new file mode 100644 index 0000000..a12a6df --- /dev/null +++ b/layout/_widget/music.ejs @@ -0,0 +1,4 @@ +
+

<%= __('music') %>

+ +
\ No newline at end of file diff --git a/layout/_widget/weibo.ejs b/layout/_widget/weibo.ejs index ca6b8cf..3e62487 100644 --- a/layout/_widget/weibo.ejs +++ b/layout/_widget/weibo.ejs @@ -1,4 +1,4 @@

<%= __('weibo') %>

- -
+ + \ No newline at end of file diff --git a/source/css/_partial/aside.styl b/source/css/_partial/aside.styl index c600b13..00207bd 100644 --- a/source/css/_partial/aside.styl +++ b/source/css/_partial/aside.styl @@ -210,6 +210,20 @@ iframe padding 0.5em 0 +//netease-music +.music + margin-top 0.5em + @media mini + width 45% + float left + margin 0 5% 0 0 + @media tablet + width 100% + float none + margin 1em 0 0 + iframe + padding 0.5em 0 + //douban .doubanshow margin-top 0.5em