Permalink
Browse files

Add disqus support

  • Loading branch information...
1 parent 934e0f3 commit 2ea4bf2bf086a98fd5f170fd0eb0b6d99a311956 @JacksonTian committed Jan 30, 2013
Showing with 43 additions and 3 deletions.
  1. +1 −0 index.js
  2. +0 −3 templates/default/assets/base.css
  3. +14 −0 templates/default/doc.html
  4. +14 −0 templates/pomelo/doc.html
  5. +14 −0 templates/wordpress/doc.html
View
@@ -1,3 +1,4 @@
module.exports = require('./lib/doxmate.js');
// TODO: 在header这块区域里,添加一个github项目的链接,可以从package.json文件中抽取
// TODO: 添加分享到的功能
+// TODO: 添加Metro模版 http://metroui.org.ua/
@@ -102,9 +102,6 @@ hr.soften {
letter-spacing: -1px;
line-height: 1;
}
-.jumbotron h1:first-letter {
- text-transform: uppercase;
-}
.jumbotron p {
font-size: 24px;
font-weight: 300;
@@ -8,6 +8,20 @@
<section>
<%-content%>
</section>
+ <% if (locals.disqus && disqus) { %>
+ <section>
+ <div id="disqus_thread"></div>
+ <script>
+ var disqus_shortname = '<%=disqus%>';
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+ </section>
+ <% } %>
</div>
</div>
</div>
@@ -11,6 +11,20 @@
<h1><%= name%> <span class='version'><%=version%></span> <span><%=author%></span></h1>
</div>
<%-content%>
+ <% if (locals.disqus && disqus) { %>
+ <div>
+ <div id="disqus_thread"></div>
+ <script>
+ var disqus_shortname = '<%=disqus%>';
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+ </div>
+ <% } %>
</div>
<% include indexs %>
</div>
@@ -6,6 +6,20 @@
</div>
<div class="col-9">
<%-content%>
+ <% if (locals.disqus && disqus) { %>
+ <div>
+ <div id="disqus_thread"></div>
+ <script>
+ var disqus_shortname = '<%=disqus%>';
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+ </div>
+ <% } %>
</div>
</div>
</div>

0 comments on commit 2ea4bf2

Please sign in to comment.