Monday, January 19, 2009

How to Decorate Blogger Comments

By default, Blogger comments are very simple with a profile picture but I'll tell you a simple way to make your comments look stylish, beautiful & completely customizable.

Remember: Before proceeding, please backup your current template layout. (?)

Find & Change the Default CSS Code for Comments


To do this quick makeover, just go to Layout then Edit HTML section. Find this code there:

/* Comments
----------------------------------------------- */
#comments h4 {
margin:1em 0;
font-weight: bold;
line-height: 1.4em;
text-transform:uppercase;
letter-spacing:.2em;
color: $sidebarcolor;
}

#comments-block {
margin:1em 0 1.5em;
line-height:1.6em;
}
#comments-block .comment-author {
margin:.5em 0;
}
#comments-block .comment-body {
margin:.25em 0 0;
}
#comments-block .comment-footer {
margin:-.25em 0 2em;
line-height: 1.4em;
text-transform:uppercase;
letter-spacing:.1em;
}
#comments-block .comment-body p {
margin:0 0 .75em;
}
.deleted-comment {
font-style:italic;
color:gray;
}


Tip: If you can't find this code then please comment here with your blog address otherwise continue with the tutorial.


Actually, this is the CSS code responsible for the appearance of your comments. So, you need to replace the above code with the following code:

/* Comments
----------------------------------------------- */

.comment-form {
margin-left:.5em;}

.comments {
margin-left:.5em;}

#comments h4 {
margin:1em 0;
font-weight: bold;
line-height: 1.4em;
text-transform:uppercase;
letter-spacing:.2em;
color: $commentheadingcolor;
}

#comments-block {
font-size:13px;
}
#comments-block .comment-author {
color: $commentauthorcolor;
font-size:12px;
background: $commentauthorbackcolor;
padding:4px;
font-weight:bold;
text-decoration:none;
}
#comments-block .comment-author a:link, .comment-author a:visited, .comment-author a:hover {
font-weight:bold;
color: $commentauthorcolor;
border-bottom:solid 1px $authorborderbottom;
padding-bottom:2px;
text-decoration:none;
}

dd{margin:0; border:0; padding:0; padding:0 10px; background: $bodybackcolor; color: $bodytexcolor;}
dd.comment-body{border:solid 2px $bodysidesbordercolor; border-bottom:none; border-top:none;}
dd.comment-body p{border:0; padding:0; margin:0; padding:10px 0;}
dd.comment-footer{border:solid 2px $footerbordercolor; border-top:none; margin-bottom:10px;}

#comments-block .comment-footer {
margin:-.25em 0 2em;
line-height: 1.4em;
text-transform:uppercase;
letter-spacing:.1em;
}

.comment-timestamp{font-size:11px; color: $commentdatecolor;}
.comment-timestamp a:link, .comment-timestamp a:visited {
font-size:11px; color: $commentdatecolor; background:none; width:auto; height:auto;
text-align:left; font-weight:normal;}


.deleted-comment {
font-style:italic;
color:gray;
}


Save the template and see the comments. You'd notice that the comments are now looking really decent and stylish.

Add the Customization Code in CSS


We've changed the default styling for comments after adding the code in previous step but everyone has different taste so let's add some juicy code to the template's HTML. Now, scroll down a little and you'll find this piece of code:

/* Variable definitions
====================


Right after the above code, you need to add the following code:

<Variable name="commentheadingcolor" description="Comments Heading Color" type="color" default="#0B486B" value="#0B486B">
<Variable name="commentauthorcolor" description="Comment Author Color" type="color" default="#53524b" value="#53524b">
<Variable name="commentauthorbackcolor" description="Comment Author Background Color" type="color" default="#d7e8f0" value="#d7e8f0">
<Variable name="authorborderbottom" description="Comment Top Border Color" type="color" default="#80a8ba" value="#80a8ba">
<Variable name="bodybackcolor" description="Comment Body Background Color" type="color" default="#f5f8fa" value="#f5f8fa">
<Variable name="bodytexcolor" description="Comment Text Color" type="color" default="#333" value="#333333">
<Variable name="bodysidesbordercolor" description="Comment Sides Border Color" type="color" default="#d7e8f0" value="#d7e8f0">
<Variable name="footerbordercolor" description="Comment Bottom Border Color" type="color" default="#d7e8f0" value="#d7e8f0">
<Variable name="commentdatecolor" description="Comment Date Color" type="color" default="#999999" value="#999999">


Now, the overall code should look something like this:

/* Variable definitions
====================
<Variable name="commentheadingcolor" description="Comments Heading Color" type="color" default="#0B486B" value="#0B486B">
<Variable name="commentauthorcolor" description="Comment Author Color" type="color" default="#53524b" value="#53524b">
<Variable name="commentauthorbackcolor" description="Comment Author Background Color" type="color" default="#d7e8f0" value="#d7e8f0">
<Variable name="authorborderbottom" description="Comment Top Border Color" type="color" default="#80a8ba" value="#80a8ba">
<Variable name="bodybackcolor" description="Comment Body Background Color" type="color" default="#f5f8fa" value="#f5f8fa">
<Variable name="bodytexcolor" description="Comment Text Color" type="color" default="#333" value="#333333">
<Variable name="bodysidesbordercolor" description="Comment Sides Border Color" type="color" default="#d7e8f0" value="#d7e8f0">
<Variable name="footerbordercolor" description="Comment Bottom Border Color" type="color" default="#d7e8f0" value="#d7e8f0">
<Variable name="commentdatecolor" description="Comment Date Color" type="color" default="#999999" value="#999999">


Save your template. Now, you can go to the Fonts & Colors section and customize all the colors according to your taste.

Thursday, January 15, 2009

Blogspot How To: How to Restore Pencil to Edit Posts


When you're logged in to your Blogger account and you see your own blog, you might have noticed a small pencil in your post footer. This pencil lets you easily edit any post right from your blog but if you're using a custom template or for some other reason, you can't see this small tool then you can easily restore or recover it.

Go to Settings | Basic and scroll down to the option to see Show Quick Editing on your Blog? just make sure it is selected "Yes" and SAVE SETTINGS. Now see your blog if the pencil is there or not. If pencil is still not there then you can manually add it's code in your template.

To manually add pencil code, go to Layout | Edit HTML | Check Expand Widget Templates and search for <div class='post-footer'> paste the following code right after it:



<b:if cond='data:post.editUrl'>
<span expr:class='&quot;item-control &quot; + data:post.adminClass'> <span expr:class='"item-control "+ data:post.adminClass'>
<a expr:href='data:post.editUrl' expr:title='data:top.editPostMsg'> <a expr:href='data:post.editUrl' expr:title='data:top.editPostMsg'>
<img alt='' class='icon-action' height='18' src='http://www.blogger.com/img/icon18_edit_allbkg.gif' width='18'/> <img alt='' class='icon-action' height='18' src='http://www.blogger.com/img/icon18_edit_allbkg.gif' width='18'/>
</a> </ a>
</span> </ span>
</b:if> </ b: if>


Save your template and see the results.
How to Restore Pencil to Edit Posts

Wednesday, January 7, 2009

Blogspot Tutorial: Add a Cool Animated Favicon in Blogger


What is a favicon?


A favicon (short for favorites icon), also known as a website icon, shortcut icon, url icon, or bookmark icon is a 16x16 (or 32x32) pixel square icon associated with a particular website or webpage. (Wikipedia.Org)

How to install an animated favicon in a Blogger blog?


Go to Layout | Edit HTML and find </b:skin>. Paste the following code right after </b:skin> but before </head> tag. It should look like this:



</b:skin>

<link href='URL of .ico file' rel='shortcut icon' type='image/x-icon'/>

<link href='URL of animated .gif file' rel='icon' type='image/gif'/>

</head>


Remember: I'm using two files (.ico & .gif) because old internet browsers like Internet Explorer cannot display an animated favicon so we need to add a .ico file for this purpose.


How to find and upload .gif and .ico files...


You can search on Google for keywords like "animated favicons" or "free .ico favicons" and then you can upload your files to Google Sites for free.

Add a Cool Animated Favicon in Blogger