Browse Source

improve user index image load

master
filesite 7 months ago
parent
commit
abc855e633
  1. 8
      themes/tajian/views/site/myindex.php

8
themes/tajian/views/site/myindex.php

@ -39,6 +39,7 @@ eof; @@ -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; @@ -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
@ -95,6 +96,7 @@ eof; @@ -95,6 +96,7 @@ eof;
</div>
eof;
$tagIndex ++;
}
}
?>

Loading…
Cancel
Save