Last active
June 23, 2018 13:25
-
-
Save fengkx/b7fe7b576b3f2822e872930a552e8152 to your computer and use it in GitHub Desktop.
Valine Next主题 next/layout/_third-party/comments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not theme.disqus_shortname and not (theme.valine.enable and theme.valine.appkey and theme.appid) %} | |
{% if theme.hypercomments_id %} | |
<script type="text/javascript"> | |
_hcwp = window._hcwp || []; | |
_hcwp.push({widget:"Bloggerstream", widget_id: {{ theme.hypercomments_id }}, selector:".hc-comment-count", label: "{\%COUNT%\}" }); | |
{% if page.comments %} | |
_hcwp.push({widget:"Stream", widget_id: {{ theme.hypercomments_id }}, xid: "{{ page.path }}"}); | |
{% endif %} | |
(function() { | |
if("HC_LOAD_INIT" in window)return; | |
HC_LOAD_INIT = true; | |
var lang = (navigator.language || navigator.systemLanguage || navigator.userLanguage || "en").substr(0, 2).toLowerCase(); | |
var hcc = document.createElement("script"); hcc.type = "text/javascript"; hcc.async = true; | |
hcc.src = ("https:" == document.location.protocol ? "https" : "http")+"://w.hypercomments.com/widget/hc/{{ theme.hypercomments_id }}/"+lang+"/widget.js"; | |
var s = document.getElementsByTagName("script")[0]; | |
s.parentNode.insertBefore(hcc, s.nextSibling); | |
})(); | |
</script> | |
{% endif %} | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% include 'duoshuo.swig' %} | |
{% include 'disqus.swig' %} | |
{% include 'hypercomments.swig' %} | |
{% include 'youyan.swig' %} | |
{% include 'livere.swig' %} | |
{% include 'changyan.swig' %} | |
{% include 'valine.swig' %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not (theme.disqus.enable and theme.disqus.shortname) and not theme.hypercomments_id and not (theme.valine.enable and theme.valine.appkey and theme.appid) %} | |
{% if page.comments and theme.livere_uid %} | |
<script type="text/javascript"> | |
(function(d, s) { | |
var j, e = d.getElementsByTagName(s)[0]; | |
if (typeof LivereTower === 'function') { return; } | |
j = d.createElement(s); | |
j.src = 'https://cdn-city.livere.com/js/embed.dist.js'; | |
j.async = true; | |
e.parentNode.insertBefore(j, e); | |
})(document, 'script'); | |
</script> | |
{% endif %} | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not theme.disqus_shortname and not theme.hypercomments_id %} | |
{% if theme.valine.enable and theme.valine.appkey and theme.valine.appid %} | |
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script> | |
<script src='//unpkg.com/valine/dist/Valine.min.js'></script> | |
{% if page.comments %} | |
<script type= "text/javascript"> | |
new Valine({ | |
el: '#valine_comment' , | |
notify:false, | |
verify:false, | |
appId: '{{ theme.valine.appid }}', | |
appKey: '{{ theme.valine.appkey }}', | |
placeholder: 'just go go', | |
path:window.location.pathname, | |
avatar:'retro' | |
}); | |
</script> | |
{% endif %} | |
{% endif %} | |
{% endif %} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if not (theme.duoshuo and theme.duoshuo.shortname) | |
and not theme.duoshuo_shortname | |
and not theme.disqus_shortname | |
and not theme.hypercomments_id | |
and not (theme.valine.enable and theme.valine.appkey and theme.appid) %} | |
{% if theme.youyan_uid %} | |
{% set uid = theme.youyan_uid %} | |
{% if page.comments %} | |
<!-- UY BEGIN --> | |
<script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js?uid={{uid}}"></script> | |
<!-- UY END --> | |
{% endif %} | |
{% endif %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment