duoshuo.ejs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <% if (typeof(script) !== 'undefined' && script) { %>
  2. <script type="text/javascript">
  3. var duoshuoQuery = {short_name:'<%= theme.comment.duoshuo %>'};
  4. (function() {
  5. var ds = document.createElement('script');
  6. ds.type = 'text/javascript';ds.async = true;
  7. ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
  8. ds.charset = 'UTF-8';
  9. (document.getElementsByTagName('head')[0]
  10. || document.getElementsByTagName('body')[0]).appendChild(ds);
  11. })();
  12. </script>
  13. <% } else { %>
  14. <div class="ds-thread" data-thread-key="<%= post.path %>" data-title="<%= post.title %>" data-url="<%= page.permalink %>"></div>
  15. <style>
  16. #ds-thread #ds-reset .ds-textarea-wrapper {
  17. background: none;
  18. }
  19. #ds-reset .ds-avatar img {
  20. box-shadow: none;
  21. }
  22. #ds-reset .ds-gradient-bg {
  23. background: #f7f7f7;
  24. }
  25. #ds-thread #ds-reset li.ds-tab a {
  26. border-radius: 3px;
  27. }
  28. #ds-thread #ds-reset .ds-post-button {
  29. color: white;
  30. border: none;
  31. box-shadow: none;
  32. background: #d32;
  33. text-shadow: none;
  34. font-weight: normal;
  35. font-family: 'Microsoft Yahei';
  36. }
  37. #ds-thread #ds-reset .ds-post-button:hover {
  38. color: white;
  39. background: #DE594C;
  40. }
  41. #ds-thread #ds-reset .ds-post-button:active {
  42. background: #d32;
  43. }
  44. #ds-smilies-tooltip ul.ds-smilies-tabs li a.ds-current {
  45. color: white;
  46. background: #d32;
  47. box-shadow: none;
  48. text-shadow: none;
  49. font-weight: normal;
  50. }
  51. </style>
  52. <% } %>