首页 > 程序 > 今天做了修改
作者:ghostry 发布时间:2012-12-09 浏览: 3885
转载注明出处: https://blog.1ge.fun/program/jin-tian-zuo-le-xiu-gai.html今天给博客做了一些修改,具体如下
添加加载进度条(看了所谓刚子的博客,觉得很好.)
在header.php最后加上
<script type="text/javascript">
jQuery("#w-loading div").animate({width:"33%"});
</script>
在sidebar最后加上
<script type="text/javascript">
jQuery("#w-loading div").animate({width:"66%"});
</script>
在footer最后加上
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#w-loading div").animate({width:"100%"},800,function(){
setTimeout(function(){jQuery("#w-loading div").fadeOut(500);
}); }); });
</script>
在style.css最后加上
#w-loading{z-index:99999;position:fixed;left:0;top:0;width:100%;height:10px;}
#w-loading div{ width: 0; height: 10px; background-color: #0FF; /* mozila code */
background-image: -moz-linear-gradient(left, right,
from(#0ff),
to(#00f));
/* webkit code */
background-image: -webkit-gradient(linear, left top, right bottom,
color-stop(0.00, #0ff),
color-stop(1.00, #00f));
/* IE code - note GradientType=0 means vertical */
filter: progid:DXImageTransform.Microsoft.gradient(enabled='true',
startColorstr=#0ff, endColorstr=#00f, GradientType=1);
}
功能按钮单独列出
在sidebar顶部加上
<div class="topdown">
<div id="topdown">
<a href="#paage" title="<?php _e('回顶端'); ?>" class="gotop"></a>
<?php if($this->is('post')){
$look='看评论';
$xie='写评论';
}
if($this->is('page','Message_Board')){
$look='看留言';
$xie='写留言';
}
if($this->is('post')||$this->is('page','Message_Board')){
?><a href="#comments" title="<?php _e($look); ?>" class="gopin"></a>
<a href="#response" title="<?php _e($xie); ?>" class="goxie"></a>
<?php
}
?>
</div></div>
在style.css底部加上
.topdown { position: relative; width: 1px; }
.topdown #topdown { position: absolute; width: 32px; left: 595px; top: 200px; }
.topdown #topdown a { float: left; border-bottom: none; display: block; height: 32px; width: 32px; margin-top: 5px; }
.topdown #topdown a.gotop { background-image: url(/usr/images/arrow2-up.png); background-repeat: no-repeat; }
.topdown #topdown a.gopin { background-image: url(/usr/images/bubble6.png); background-repeat: no-repeat; }
.topdown #topdown a.goxie { background-image: url(/usr/images/bubble5.png); background-repeat: no-repeat; }
相关文章功能
在sidebar合适位置(比如最新文章下边)加上,
<?php if ($this->is('post')): ?>
<?php $this->related(5)->to($relatedPosts);
if ($relatedPosts->title):
?>
<div class="widget">
<h3><?php _e('相关文章'); ?></h3>
<ul>
<?php while ($relatedPosts->next()): ?>
<li><a href="<?php $relatedPosts->permalink(); ?>" title="<?php $relatedPosts->title(); ?>"><?php $relatedPosts->title(); ?></a></li>
<?php endwhile; ?>
</ul>
</div>
<?php endif;
endif; ?>
下一篇: 忽然想卖个萌