Skip to content

Commit

Permalink
added Disqus comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rsim committed Aug 8, 2010
1 parent 2e33560 commit 3de64d4
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 18 deletions.
3 changes: 2 additions & 1 deletion _config.yml
@@ -1,4 +1,5 @@
markdown: rdiscount
pygments: true
permalink: /:year/:month/:day/:title
permalink: /:year/:month/:day/:title/
exclude: Rakefile README.textile
lsi: true
7 changes: 4 additions & 3 deletions _includes/show_post.html
Expand Up @@ -2,11 +2,12 @@
<h3 class="date">{{ post.date | date: "%B %d, %Y" }}</h3>
<h2 class="title"><a href="{{ post.url }}">{{ post.title }}</a></h2>
<div class="meta">
Posted by Raimonds Simanovskis,
tags:
Posted by <span class="author">Raimonds Simanovskis</span> &#149;
Tags:
{% for tag in post.tags %}
<a href="/tags/{{ tag }}" title="View posts tagged with &quot;{{ tag }}&quot;">{{ tag }}</a>{% if forloop.last != true %}, {% endif %}
{% endfor %}
{% endfor %} &#149;
<a href="{{ post.url }}#disqus_thread">Show comments</a>
</div>
<div class="body">
{{ post.content }}
Expand Down
13 changes: 12 additions & 1 deletion _layouts/default.html
Expand Up @@ -33,8 +33,19 @@ <h1 id="header">

<a href="http://github.com/rsim"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a>

<!-- Show Disqus comments count -->

<script type="text/javascript">
var disqus_shortname = 'rayapps-blog';
(function () {
var s = document.createElement('script'); s.async = true;
s.src = 'http://disqus.com/forums/rayapps-blog/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>

<!-- Google Analytics -->
<!-- Google Analytics end -->


</body>
</html>
25 changes: 21 additions & 4 deletions _layouts/post.html
Expand Up @@ -5,10 +5,12 @@
<h3 class="date">{{ page.date | date: "%B %d, %Y" }}</h3>
<h2 class="title"><a href="{{ page.url }}">{{ page.title }}</a></h2>
<div class="meta">
Posted by <span class="author">Raimonds Simanovskis</span>, tags:
Posted by <span class="author">Raimonds Simanovskis</span> &#149;
Tags:
{% for tag in page.tags %}
<a href="/tags/{{ tag }}" title="View posts tagged with &quot;{{ tag }}&quot;">{{ tag }}</a>{% if forloop.last != true %}, {% endif %}
{% endfor %}
{% endfor %} &#149;
<a href="{{ post.url }}#disqus_thread">Show comments</a>
</div>
<div class="body">
{{ content }}
Expand All @@ -23,8 +25,23 @@ <h4>Possibly related posts (automatically generated)</h4>
</ul>
</div>

<div class="comments">
<h4>Comments</h4>
{% if page.comments_disabled != true %}
<div id="comments">
<div id="disqus_thread"></div>
<script type="text/javascript">
/**
* var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread]
*/
// var disqus_developer = 1;
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://rayapps-blog.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=rayapps-blog">comments powered by Disqus.</a></noscript>
</div>
<br/>
{% endif %}

</div>
39 changes: 30 additions & 9 deletions css/screen.css
Expand Up @@ -11,7 +11,7 @@ html, body {

body {
font-family: Verdana, Tahoma, Arial, sans-serif;
font-size: 90%;
/* font-size: 90%;*/
background-attachment: fixed;
background-color: white;
background-image: url(/images/gradient.gif);
Expand Down Expand Up @@ -106,7 +106,7 @@ h4 {
}

#content div, p, td, th, li, pre {
font-size: 1em;
font-size: 14px;
line-height: 1.65em;
}

Expand Down Expand Up @@ -142,6 +142,10 @@ h4 {
margin: 0.2em 0px;
}

#sidebar img {
border-style: none;
}

/* Post */

div.post {
Expand All @@ -162,9 +166,9 @@ div.post {
margin-top: 0.25em;
}

.post .meta {
#content .post .meta {
color: #666;
font-size: 0.85em;
font-size: 12px;
margin-bottom: 1em;
}

Expand Down Expand Up @@ -207,18 +211,22 @@ div.post {
font-weight: normal;
}

.post .highlight pre {
font-size: 12px;
}

.post pre.terminal code {
background-color: #333;
}

.post blockquote {
border-left: 4px solid #444;
border-left: 5px solid #DDD;
margin: 15px 30px 0px 10px;
padding-left: 20px;
font-style: italic;
margin: 20px;
padding-left: 10px;
}
.post .warning {
background-color: #ff8;
background-color: #FF8;
}

/* Related posts*/
Expand All @@ -243,8 +251,21 @@ ul.posts li {
}

ul.posts span.date {
color: #aaa;
color: #AAA;
font-family: Consolas, Monaco, monospace;
font-size: 80%;
}

/* Disqus comments */

#disqus_thread div, #disqus_thread p, #disqus_thread td, #disqus_thread th, #disqus_thread li, #disqus_thread pre {
font-size: 12px;
}

#disqus_thread h3 {
font-size: 1.0em;
font-weight: bold;
line-height: 1.5em;
margin-top: 1em;
margin-bottom: 0.33em;
}

0 comments on commit 3de64d4

Please sign in to comment.