diff --git a/themes/tajian/views/site/myindex.php b/themes/tajian/views/site/myindex.php index 0845e21..7dc69fe 100644 --- a/themes/tajian/views/site/myindex.php +++ b/themes/tajian/views/site/myindex.php @@ -39,6 +39,7 @@ eof; $videoExts = array('url'); if (!empty($viewData['tags'])) { //显示tags分类 + $tagIndex = 0; foreach($viewData['tags'] as $id => $item) { //输出分类名称 @@ -68,9 +69,9 @@ eof; $pubDate = date('m/d', $file['fstat']['ctime']); - $imgSrc = $index < 8 ? " src=\"{$snapshot}\"" : ''; - $imgAlt = $index < 8 ? " alt=\"{$title}\"" : ''; - $imgCls = $index < 8 ? '' : 'lazy'; + $imgSrc = $tagIndex == 0 && $index < 8 ? " src=\"{$snapshot}\"" : ''; + $imgAlt = $tagIndex == 0 && $index < 8 ? " alt=\"{$title}\"" : ''; + $imgCls = $tagIndex == 0 && $index < 8 ? '' : 'lazy'; $itemCls = $index < 4 ? '' : 'hidden-xs'; echo << eof; + $tagIndex ++; } } ?>