list.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {include file="header" /}
  2. <link rel="stylesheet" href="/assets/xtu/news-list.css?v=20260429-1658">
  3. {php}
  4. $currentPage = max(1, (int)request()->param('page/d', 1));
  5. $featuredWhere = "FIND_IN_SET('1', flag)";
  6. $newsWhere = "(flag='' OR flag IS NULL OR !FIND_IN_SET('1', flag))";
  7. {/php}
  8. <main class="brand-news-page">
  9. <section class="brand-news-hero"{if !empty($category['image'])} style="background-image:url({$category['image']});"{/if}>
  10. <div class="content-1300-wrap brand-news-hero-inner">
  11. <h1>{$category['catname']|default=''}</h1>
  12. {if !empty($category['description'])}
  13. <p>{$category['description']}</p>
  14. {/if}
  15. </div>
  16. </section>
  17. <section class="brand-news-section">
  18. <div class="content-1300-wrap">
  19. {if $currentPage == 1}
  20. {yzn module="cms" action="lists" catid="$catid" where="$featuredWhere" order="listorder DESC,publish_time DESC,id DESC" num="1" return="featuredList" moreinfo="1"}
  21. {if !empty($featuredList)}
  22. {volist name="featuredList" id="featured"}
  23. <article class="brand-news-featured-card">
  24. <a class="brand-news-featured-media" href="{$featured.url}">
  25. <img src="{if !empty($featured.thumb)}{$featured.thumb}{else /}/uploads/20260409/15d257a4faf1bc9aadd0095112b6b7f7.png{/if}" alt="{$featured.title}">
  26. </a>
  27. <div class="brand-news-featured-copy">
  28. <div class="brand-news-kicker">{:getCategory($featured['catid'],'catname')}</div>
  29. <h2><a href="{$featured.url}">{$featured.title}</a></h2>
  30. <div class="brand-news-date">{$featured.publish_time|date='Y-m-d'}</div>
  31. </div>
  32. </article>
  33. {/volist}
  34. {/if}
  35. {/yzn}
  36. {/if}
  37. <div class="brand-news-grid">
  38. {yzn module="cms" action="lists" catid="$catid" where="$newsWhere" order="publish_time DESC,id DESC" num="9" page="$page" return="data" moreinfo="1"}
  39. {volist name="data" id="vo"}
  40. <article class="brand-news-card">
  41. <a class="brand-news-card-media" href="{$vo.url}">
  42. <img src="{if !empty($vo.thumb)}{$vo.thumb}{else /}/uploads/20260409/15d257a4faf1bc9aadd0095112b6b7f7.png{/if}" alt="{$vo.title}">
  43. </a>
  44. <div class="brand-news-card-copy">
  45. <div class="brand-news-kicker">{:getCategory($vo['catid'],'catname')}</div>
  46. <h3><a href="{$vo.url}">{$vo.title}</a></h3>
  47. <div class="brand-news-date">{$vo.publish_time|date='Y-m-d'}</div>
  48. </div>
  49. </article>
  50. {/volist}
  51. {/yzn}
  52. </div>
  53. {if !empty($pages)}
  54. <div class="brand-news-pagination">{$pages|raw}</div>
  55. {/if}
  56. </div>
  57. </section>
  58. {include file="footer-links" /}
  59. </main>
  60. {include file="footer" /}