Implemented commenting system. * Integrated with IntenseDebate. * Imported legagy comments * Closes #5.
h3rald h3rald@h3rald.com
Sat, 15 Aug 2009 18:42:02 +0200
6 files changed,
73 insertions(+),
61 deletions(-)
M
layouts/comments.htm
→
layouts/comments.htm
@@ -1,4 +1,14 @@
----- filter: erb ----- -<div id="disqus_thread"></div><script type="text/javascript" src="http://disqus.com/forums/h3rald/embed.js"></script><noscript><a href="http://h3rald.disqus.com/?url=ref">View the discussion thread.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> +<div id="comments"> + <%= render 'legacy_comments' if @page.comments && @page.comments.length > 0 %> +<script> +var idcomments_acct = '7a8e41c4b06641909304090b010e8009'; +var idcomments_post_id; +var idcomments_post_url; +</script> +<span id="IDCommentsPostTitle" style="display:none"></span> +<script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'></script> +</div> +
M
layouts/default.htm
→
layouts/default.htm
@@ -76,8 +76,6 @@ </div>
<!-- HEADER END --> <div id="border-top"></div> <div class="inner-border"> -<a class="a2a_dd" href="http://www.addtoany.com/share_save"><img src="http://static.addtoany.com/buttons/share_save_120_16.gif" width="120" height="16" border="0" alt="Share/Save/Bookmark"/></a><script type="text/javascript">a2a_linkname=document.title;a2a_linkurl=location.href;a2a_onclick=1;a2a_prioritize=["delicious","stumbleupon","friendfeed","twitter","dzone","digg","reddit","slashdot","facebook","newsvine","sphere","ping"];</script><script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script> -<a class="a2a_dd" href="http://www.addtoany.com/subscribe?linkname=&linkurl=http%3A%2F%2Fwww.h3rald.com%2Frss%2F"><img src="http://static.addtoany.com/buttons/subscribe_120_16.gif" width="120" height="16" border="0" alt="Subscribe"/></a><script type="text/javascript">a2a_linkname=document.title;a2a_linkurl="http://www.h3rald.com/rss/";a2a_onclick=1;</script><script type="text/javascript" src="http://static.addtoany.com/menu/feed.js"></script> </div> <!-- MAIN START --> <div id="main">@@ -114,10 +112,11 @@ </div>
<!-- MAIN END --> <div class="inner-border"></div> <div id="border-bottom"> + <div id="share"> +<a class="a2a_dd" href="http://www.addtoany.com/share_save"><img src="http://static.addtoany.com/buttons/share_save_120_16.gif" width="120" height="16" border="0" alt="Share/Save/Bookmark"/></a><script type="text/javascript">a2a_linkname=document.title;a2a_linkurl=location.href;a2a_onclick=1;a2a_prioritize=["delicious","stumbleupon","friendfeed","twitter","dzone","digg","reddit","slashdot","facebook","newsvine","sphere","ping"];</script><script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script> +<a class="a2a_dd" href="http://www.addtoany.com/subscribe?linkname=&linkurl=http%3A%2F%2Fwww.h3rald.com%2Frss%2F"><img src="http://static.addtoany.com/buttons/subscribe_120_16.gif" width="120" height="16" border="0" alt="Subscribe"/></a><script type="text/javascript">a2a_linkname=document.title;a2a_linkurl="http://www.h3rald.com/rss/";a2a_onclick=1;</script><script type="text/javascript" src="http://static.addtoany.com/menu/feed.js"></script> + </div> <% if @page.type == 'article' then %> - <script type="text/javascript"> - var disqus_developer = 1; - </script> <%= render 'comments' %> <% else %> <%= render 'services' %>
A
layouts/legacy_comments.htm
@@ -0,0 +1,18 @@
+----- +filters: +- erb +----- +<div id="legacy-comments"> + <h3>Legacy Comments</h3> + <p> + <em>These comments were imported automatically from an old version of this web site. Scroll <a href="#idc-container-parent">down</a> for the newest stuff.</em> + </p> + <% @page.comments.each do |c| %> + <div id="comment-<%=c[:id]%>" class="legacy-comment"> + <div class="lc-header"><%= (c[:url].empty?) ? c[:author] : %{<a href="#{c[:url]}">#{c[:author]}</a>} %></div> + <div class="lc-body"> + <%= RedCloth.new(c[:body]).to_html %> + </div> + </div> + <% end %> +</div>
M
resources/css/elements.css
→
resources/css/elements.css
@@ -1,54 +1,4 @@
-li.comment -{ - list-style-type: none; - margin: 10px 0; - border-bottom: 1px dashed #ccc; - padding-bottom: 20px; - clear: both; - display: block; -} - -#content li.comment p -{ - line-height:1.5em; - margin: 0.5em 0em; -} - - -li.comment li -{ - list-style-type: disc; - margin: 0; - margin-left: 40px; - padding: 3px; - display: inline; - min-height: 0; -} - -.comments label -{ - font-family: Georgia, Serif; - font-style: italic; - color: #313634; -} - -.comment .author -{ - float: left; - width: 80px; - text-align: center; -} - -.comment .content -{ - height: 100%; - margin-left: 80px; -} - -.gravatar -{ - border: 1px solid #313634; -} +/*** CONTENT ***/ #content img {@@ -112,7 +62,6 @@ }
.tag, .link, .cross-link, #taglist a, #timeline a { - color: #B80000; margin: 0 1px; font-family: Georgia, Serif; font-style: italic;@@ -141,7 +90,6 @@ .feed-item
{ list-style-type: none; margin: 0.8em 0.3em; - color: #BDB7BA; } .feed-item-text, .feed-item-date@@ -212,6 +160,27 @@
#up-arrow:hover { background: url('../images/icons/up_hover.png'); +} + +/*** COMMENTS ***/ + +#idc-container-parent, #legacy-comments; +{ + padding: 5px; +} + +.legacy-comment +{ + padding: 5px 0; +} + +.lc-header +{ + display: block; + height: 20px; + border: 1px solid #232323; + background: #121212; + padding: 5px; } /**** TABLES ****/
M
resources/css/layout.css
→
resources/css/layout.css
@@ -169,8 +169,6 @@ .inner-border
{ background: #000 url('../images/redcloth.png') top repeat-x; height: 30px; - text-align: center; - padding-left: 610px; } #footer {@@ -218,6 +216,19 @@ {
clear: both; font-size: 95%; color: #CACACA; +} + +#share +{ + margin:auto; + padding: 5px; + text-align: center; +} + +#comments +{ + width: 900px; + margin:auto; } /* slider */
M
resources/css/text.css
→
resources/css/text.css
@@ -75,6 +75,11 @@ background: url("../images/icons/bullet.png") top left no-repeat;
padding-left: 20px; } +#footer, #border-bottom +{ + color: #BDB7BA; +} + /**** Article Lists ****/ .article-list h3