mirror of
https://github.com/danpros/htmly.git
synced 2026-04-19 12:06:22 +05:30
Add disqus recent comments
Add disqus recent comments to the core.
This commit is contained in:
parent
6e5926f9a4
commit
2591e69497
3 changed files with 59 additions and 1 deletions
|
|
@ -848,6 +848,54 @@ EOF;
|
|||
}
|
||||
}
|
||||
|
||||
// Disqus recent comments
|
||||
function recent_comments(){
|
||||
$disqus = config('disqus.shortname');
|
||||
$script = <<<EOF
|
||||
<script type="text/javascript">
|
||||
var heading ='<h3>Comments</h3>';
|
||||
document.write(heading);
|
||||
</script>
|
||||
<script type="text/javascript" src="http://{$disqus}.disqus.com/recent_comments_widget.js?num_items=5&hide_avatars=0&avatar_size=48&excerpt_length=200&hide_mods=0"></script>
|
||||
<style>
|
||||
li.dsq-widget-item {
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
margin:0;
|
||||
margin-bottom:10px;
|
||||
padding:0;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
a.dsq-widget-user {
|
||||
font-weight:normal;
|
||||
}
|
||||
img.dsq-widget-avatar {
|
||||
margin-right:10px;
|
||||
}
|
||||
.dsq-widget-comment {
|
||||
display:block;
|
||||
padding-top:5px;
|
||||
}
|
||||
.dsq-widget-comment p {
|
||||
display:block;
|
||||
margin:0;
|
||||
}
|
||||
p.dsq-widget-meta {
|
||||
padding-top:5px;
|
||||
margin:0;
|
||||
}
|
||||
#dsq-combo-widget.grey #dsq-combo-content .dsq-combo-box {
|
||||
background: transparent;
|
||||
}
|
||||
#dsq-combo-widget.grey #dsq-combo-tabs li {
|
||||
background: none repeat scroll 0 0 #DDDDDD;
|
||||
}
|
||||
</style>
|
||||
EOF;
|
||||
if (!empty($disqus)) {
|
||||
return $script;
|
||||
}
|
||||
}
|
||||
|
||||
// Google Publisher (Google+ page).
|
||||
function publisher(){
|
||||
$publisher = config('google.publisher');
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ ul li, ol li{
|
|||
margin:0;
|
||||
}
|
||||
|
||||
.about, .social, .archive, .tagcloud {
|
||||
.about, .social, .archive, .comments, .tagcloud {
|
||||
margin-bottom:2em;
|
||||
}
|
||||
|
||||
|
|
@ -793,6 +793,11 @@ table.post-list td a {
|
|||
margin-bottom:1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
word-wrap:break-word;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media all and (max-width: 360px) {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,11 @@
|
|||
<div class="archive">
|
||||
<?php echo archive_list()?>
|
||||
</div>
|
||||
<?php if(disqus()):?>
|
||||
<div class="comments">
|
||||
<?php echo recent_comments() ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="tagcloud">
|
||||
<?php echo tag_cloud()?>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue