Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(comment):add changyan comment system #247

Merged
merged 3 commits into from
Mar 27, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions layout/_partial/comment.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

<% if(theme.comment.use === 'changyan') { %>
<!-- 使用 changyan -->
<div id="disqus-comment">
<div id="changyan-comment">
<%- partial('_widget/changyan') %>
</div>
<style>
#disqus-comment{
#changyan-comment{
background-color: #eee;
padding: 2pc;
}
Expand All @@ -31,7 +31,7 @@

<% if(theme.comment.use === 'disqus_click') { %>
<!-- 使用 DISQUS_CLICK -->
<div id="disqus-comment">
<div id="disqus-comment">
<%- partial('_widget/disqus_click') %>
</div>
<style>
Expand All @@ -40,4 +40,4 @@
padding: 2pc;
}
</style>
<% } %>
<% } %>
2 changes: 1 addition & 1 deletion layout/_widget/changyan.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ var appid = '<%= theme.comment.changyan_appid %>';
var conf = '<%= theme.comment.changyan_conf %>';
var width = window.innerWidth || document.documentElement.clientWidth;
if (width < 960) {
window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="http://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("http://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})}); } })(); </script>
window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("http://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})}); } })(); </script>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still has http protocal url