关于itheme主题的小修改

由 iamphoenix 于 周二, 2007-07-31 20:01 提交。

n-studio的itheme主题很漂亮,可惜转换到drupal的作者比较懒,有些地方没能改动

今天先给一个node提交日期的修改方案

第一步,建立一个 node.tpl.php 文件
内容填入

<div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) { print ' sticky'; } ?><?php if (!$status) { print ' node-unpublished'; } ?> clear-block">

<?php print $picture ?>

<?php if ($page == 0): ?>
<div class="post-date"><span class="post-month"><?php print (format_date($node->created, 'custom', 'M')) ?></span> <span class="post-day"><?php print (format_date($node->created, 'custom', 'd')) ?></span></div>
  <h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>

<?php endif; ?>

  <div class="meta">


  <?php if ($terms): ?>
    <span class="terms"><?php print $terms ?></span>
  <?php endif;?>
  </div>

  <div class="content">
    <?php print $content ?>
  </div>

<?php
 
if ($links) {
    print
$links;
  }
?>


</div>

第二步 ,打开 style.css 文件,添加

.node .post-date {
height: 50px;
width: 45px;
background: url(images/calendar.gif) no-repeat;
font: normal 22px Arial, Helvetica, sans-serif;
color: #666666;
text-align: center;
padding: 0px 2px 0 0;
line-height: 100%;
float: left;

}
.node .post-date span.post-month{
height: 16px;
display: block;
font: normal 11px Arial, Helvetica, sans-serif;
color: #ffffff;
text-align: center;
padding-top: 5px;
}
.node .post-date span.post-day{
height: 16px;
display: block;
font: normal 22px Arial, Helvetica, sans-serif bold;
color: #666666;
text-align: center;
padding-top: 0px;
}

搞定!

呵呵,大家看看我的

呵呵,大家看看我的,三栏的itheme

不错,我试一下。

不错,我试一下。

---------------------------------------------------------------------------------------------
肚破惊天dupola.com