MT用日历模板

| No Comments | No TrackBacks
我是比较喜欢在自己的MT上显示日历的.看看哪天发表了文章,今天是几号等.显示日历的功能是MT的标准功能,在widget那里就有日历的模板.但是这个模板太简陋,以至于难以见人,这里我将自己使用的日历模板放到这里,喜欢的人拿去修改用吧.样子看网页右边日历。

首先,将你的widget模板中的日历一栏打开,做一下修改,

<div class="widget-calendar widget">
<h3 class="widget-header"><$MTDate format="%Y年%m月"$></h3>
<div id="calendar">
<table summary="月别日历">
<tr>
<th abbr="星期一" align="center"><span class="calendar">一</span></th>
<th abbr="星期二" align="center"><span class="calendar">二</span></th>
<th abbr="星期三" align="center"><span class="calendar">三</span></th>
<th abbr="星期四" align="center"><span class="calendar">四</span></th>
<th abbr="星期五" align="center"><span class="calendar">五</span></th>
<th abbr="星期六" align="center"><span class="calendar">六</span></th>
<th abbr="星期日" align="center"><span class="calendar">日</span></th>
</tr>
<MTCalendar>
<MTCalendarWeekHeader><tr></MTCalendarWeekHeader>
<td <MTCalendarIfToday>class="tody"</MTCalendarIfToday>><span class="calendar">
<MTCalendarIfEntries><MTEntries lastn="1"><a href="<$MTEntryPermalink$>"><$MTCalendarDay$></a></MTEntries>
</MTCalendarIfEntries>
<MTCalendarIfNoEntries><$MTCalendarDay$></MTCalendarIfNoEntries>
<MTCalendarIfBlank>&nbsp;</MTCalendarIfBlank>
</span>
</td>
<MTCalendarWeekFooter>
</tr>
</MTCalendarWeekFooter>
</MTCalendar>
</table>
</div>
</div>

然后,打开你的styles.css模板,添加一下内容,

/***** calendar *****/
div#calendar {
    padding:0 35px 10px 15px;
    }
#calendar caption {
    font-weight: bold;
    padding-bottom: 2px;
    }
#calendar td {
    color: #666;

    font-size:12px;
      line-height:140%;
    text-align: center;
      padding: 2px;
    font-family: helvetica,arial,sans-serif;
    border-top: 1px solid #FFF;
    border-right: 1px solid #CCCCCC;
    border-bottom: 1px solid #CCCCCC;
    border-left: 1px solid #FFF;
    }
#calendar th {
    color: #666;
    font-size:12px;
      line-height:140%;
      padding: 2px;
    text-align:center;
    }
#calendar a, #calendar a:link, #calendar a:visited {
    font-weight: bold;
    text-decoration: none;
    width: 100%;
    display: block;
    background: url(http://●●●●●●/arch_gr_calendar_bg_on.gif);
    color: #666;
    }
#calendar a:hover {
    font-weight: bold;
    text-decoration: none;
    width: 100%;
    display: block;
    background: url(http://●●●●●●/arch_gr_calendar_bg.gif);
    color: #999;
    }
.tody {
        background: url(http://●●●●●●/arch_red_calendar_bg.gif);
        }
/***** calendar *****/


接着,下载下面三个小图片放到适当的地方之后,修改上面css文件粗体字的地方(图片的地址),



最后,创建一个Widget,在自己的网页适当的位置显示出来就可以了.

<$MTWidgetSet name="Widget名"$>

No TrackBacks

TrackBack URL: http://www.ikias.com/mt-tb.cgi/190

Leave a comment

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.23-en

About this Entry

This page contains a single entry by ikias published on 2008年2月27日 22:33.

汉江污染影响正常用水 was the previous entry in this blog.

PDF文件在网络浏览器上打开慢的解决方法 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.