今天是大年初一了,新的一年又开始了,俗话说“一年之计在于春”,今天上午半天转着拜年,中午吃完饭就开始对博客做些修改,主要是给博客侧栏加入了GG的AdSense搜索广告,其实主要是为了给站点增加站内搜索功能;另外还对文章中的链接颜色做了修改,以前自定义的淡蓝色,总是感觉跟模板的整体风格不匹配,因此又改成以前的颜色,并且将链接带上了下划线,这样能够使链接可以更明显,因为当时改成淡蓝色就是因为链接颜色不太显眼,特别是在颜色效果不好的液晶显示器上。
1、在侧栏加入AdSense搜索广告
先进入GG账户,获取搜索广告,然后将广告代码加入下面代码中,并将其分别放入default.html、single.html、catalog.html这三个模板文件中。
<div class="function" id="divSearchPanel">
<h3>站内搜索</h3>
<center>
AdSense搜索代码
</center>
</div>
2、自定义文章中链接文字颜色
主要是修改样式表文件,在样式表文件中加入下面内容,就可以自定义文章中链接文字颜色了。
div.post-body a:link,div.post-body a:visited {
color:#4e0a13;
text-decoration: underline;
}
div.post-body a:hover {
color:#FF7850;
text-decoration: underline;
}
晚上又将侧栏顶部的日历去掉了,换成了订阅按钮,将default.html、single.html、catalog.html这三个模板文件中日历代码改成了订阅按钮的代码,如下:
日历代码:
<div class="function" id="divCalendar">
<h3><#ZC_MSG050#></h3>
<div><#CACHE_INCLUDE_CALENDAR#></div>
</div>
将上面的日历代码替换为下面的订阅代码,蓝色部分为博客订阅地址。
<div class="function" id="divSearchPanel">
<h3>订阅博客</h3>
<ul>
<li>订阅我的博客:<a href="http://feed.feedsky.com/grnnet" target="_blank"><img style="border: medium none ;" align="absmiddle" src="/image/logo/sub_rss.gif" border="0" alt="订阅我的博客" /></a></li>
<li><a href="http://www.google.com/reader/view/feed/http://feeds2.feedburner.com/grnnet" target="_blank" rel="nofollow"><img src="/image/logo/sub_google.gif" border="0" alt="通过Google订阅本站" /></a></li>
<li><a href="http://www.xianguo.com/subscribe.php?url=http://feeds2.feedburner.com/grnnet" target="_blank" rel="nofollow"><img src="/image/logo/sub_xianguo.gif" border="0" alt="通过鲜果订阅本站" /></a></li>
</ul>
</div>
原创文章如转载,请注明:转载自晓宁博客〖http://www.grnnet.com/〗
本文链接地址:http://www.grnnet.com/post/215.html


