Changeset 6049
- Timestamp:
- 05/24/07 14:51:27 (2 years ago)
- Files:
-
- trunk/src/net.nehmer.blog/handler/index.php (modified) (2 diffs)
- trunk/src/net.nehmer.blog/style/index-item.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/net.nehmer.blog/handler/index.php
r6045 r6049 147 147 if ($this->_articles) 148 148 { 149 $total_count = count($this->_articles); 149 150 $prefix = $_MIDCOM->get_context_data(MIDCOM_CONTEXT_ANCHORPREFIX); 150 151 foreach ($this->_articles as $article_counter => $article) … … 161 162 $data['article'] =& $article; 162 163 $data['article_counter'] = $article_counter; 164 $data['article_count'] = $total_count; 163 165 $arg = $article->name ? $article->name : $article->guid; 164 166 trunk/src/net.nehmer.blog/style/index-item.php
r6045 r6049 3 3 $view = $data['datamanager']->get_content_html(); 4 4 $view_counter = $data['article_counter']; 5 $article_count = $data['article_count']; 6 $class_str = ''; 7 if($view_counter == 0) 8 { 9 $class_str = ' first'; 10 } 11 elseif($view_counter == ($article_count-1)) 12 { 13 $class_str = ' last'; 14 } 5 15 6 16 $published = sprintf($data['l10n']->get('posted on %s.'), "<abbr title=\"" . strftime('%Y-%m-%dT%H:%M:%S%z', $data['article']->metadata->published) . "\">" . strftime('%x %X', $data['article']->metadata->published) . "</abbr>"); … … 12 22 ?> 13 23 14 <div class="hentry counter_&(view_counter); " style="clear: left;">24 <div class="hentry counter_&(view_counter); &(class_str);" style="clear: left;"> 15 25 <h2 class="entry-title"><a href="&(data['view_url']);" rel="bookmark">&(view['title']:h);</a></h2> 16 26 <p class="published">&(published:h);</p>
