|
1 |
| -<% if (theme.services && theme.services.share == true && config.mob && config.mob.app_key && config.mob.list && page.layout == 'post' && page.share != false) { %> |
| 1 | +<% if (theme.services && theme.services.share == true && (config.share || config.mob) && page.layout == 'post' && page.share != false) { %> |
2 | 2 | <div class='metatag share -mob-share-list'>
|
3 | 3 | <i class="left fas fa-share-alt fa-fw" aria-hidden="true"></i>
|
4 | 4 | <div class="-mob-share-list share-body">
|
5 |
| - <% (config.mob.list||[]).forEach(function(item){ %> |
6 |
| - <a class="-mob-share-<%- item.id %>" title="<%- item.name %>"> |
| 5 | + <% ((config.share || config.mob.list)||[]).forEach(function(item){ %> |
| 6 | + <% if (item.id == 'qrcode' && theme.services.qrcode == true){ %> |
| 7 | + <a class='qrcode' rel="external nofollow noopener noreferrer" href='<%- qrcode(url) %>'> |
7 | 8 | <% if (item.img){ %>
|
8 | 9 | <img src="<%- item.img %>">
|
9 | 10 | <% } else if (item.icon){ %>
|
10 | 11 | <i class="<%- item.icon %> fa-fw"></i>
|
11 | 12 | <% } %>
|
12 |
| - </a> |
| 13 | + </a> |
| 14 | + <% } else { %> |
| 15 | + <a class="-mob-share-<%- item.id %>" title="<%- item.name %>" rel="external nofollow noopener noreferrer" |
| 16 | + <% if (item.id == 'qzone'){ %> |
| 17 | + href="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<%- post.permalink %>&title=<%- post.title + ' | ' + config.title %><%- (post.img || config.avatar) ? '&pics=' + (post.img || config.avatar) : '' %>&summary=<%- strip_html(post.excerpt) %>" |
| 18 | + <% } else if (item.id == 'qq'){ %> |
| 19 | + href="http://connect.qq.com/widget/shareqq/index.html?url=<%- post.permalink %>&title=<%- post.title + ' | ' + config.title %><%- (post.img || config.avatar) ? '&pics=' + (post.img || config.avatar) : '' %>&summary=<%- strip_html(post.excerpt) %>" |
| 20 | + <% } else if (item.id == 'weibo'){ %> |
| 21 | + href="http://service.weibo.com/share/share.php?url=<%- post.permalink %>&title=<%- post.title + ' | ' + config.title %><%- (post.img || config.avatar) ? '&pics=' + (post.img || config.avatar) : '' %>&summary=<%- strip_html(post.excerpt) %>" |
| 22 | + <% } %> |
| 23 | + > |
| 24 | + <% if (item.img){ %> |
| 25 | + <img src="<%- item.img %>"> |
| 26 | + <% } else if (item.icon){ %> |
| 27 | + <i class="<%- item.icon %> fa-fw"></i> |
| 28 | + <% } %> |
| 29 | + </a> |
| 30 | + <% } %> |
13 | 31 | <% }) %>
|
14 | 32 | </div>
|
15 | 33 | </div>
|
|
0 commit comments