修改share的命名,增加volantis的开关

i18n
xaoxuu 6 years ago
parent aec18561dc
commit 1c4b568137
  1. 1
      _config.yml
  2. 14
      layout/_partial/scripts.ejs
  3. 4
      layout/_third-party/share.ejs

@ -29,6 +29,7 @@ services:
# leancloud_visitors: true
recommended_posts: true # 需要安装"hexo-recommended-posts": "^1.0.3",
comments: true
volantis: true
music: true
share: true

@ -53,9 +53,9 @@
}, false)
</script>
<% } %>
<% if (theme.services.share == true && config.mob && config.mob.appkey) { %>
<% if (theme.services.share == true && config.mob && config.mob.app_key) { %>
<% if (page.layout == 'post' && page.share != false) { %>
<script id="-mob-share" src="//f1.webshare.mob.com/code/mob-share.js?appkey=<%- config.mob.appkey %>"></script>
<script id="-mob-share" src="//f1.webshare.mob.com/code/mob-share.js?appkey=<%- config.mob.app_key %>"></script>
<% } %>
<% } %>
@ -208,10 +208,14 @@
<% if (config.valine){ %>
<% if (config.valine.enable && config.valine.app_id && config.valine.app_key){ %>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<% if (theme.services && theme.services.cdn == true) { %>
<script src="https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0/js/volantis.min.js"></script>
<% if (theme.services.volantis == true) { %>
<% if (theme.services && theme.services.cdn == true) { %>
<script src="https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0/js/volantis.min.js"></script>
<% } else { %>
<%- js('js/volantis.js') %>
<% } %>
<% } else { %>
<%- js('js/volantis.js') %>
<script src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-valine@1.3.4/js/valine.min.js"></script>
<% } %>
<script>
var GUEST_INFO = ['nick','mail','link'];

@ -1,9 +1,9 @@
<% if (theme.services && theme.services.share == true && config.mob && config.mob.appkey && config.mob.list && page.layout == 'post' && page.share != false) { %>
<% if (theme.services && theme.services.share == true && config.mob && config.mob.app_key && config.mob.list && page.layout == 'post' && page.share != false) { %>
<div class='metatag share -mob-share-list'>
<i class="left fas fa-share-alt fa-fw" aria-hidden="true"></i>
<div class="-mob-share-list share-body">
<% (config.mob.list||[]).forEach(function(item){ %>
<a class="-mob-share-<%- item.key %>" title="<%- item.name %>">
<a class="-mob-share-<%- item.id %>" title="<%- item.name %>">
<% if (item.icon){ %>
<i class="<%- item.icon %> fa-fw"></i>
<% } else if (item.img){ %>

Loading…
Cancel
Save