news-red-list.jsp 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
  4. <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
  5. <c:set var="assetBase" value="/main/ffkj-portal/news-red"/>
  6. <c:set var="defaultListImage" value="/main/ffkj-portal/news-red/campus-life.jpg"/>
  7. <c:set var="sidebarTitle" value="${empty parNavigation.name ? website.name : parNavigation.name}"/>
  8. <c:set var="sidebarImage" value="${empty navigation.backgroundImage ? defaultListImage : navigation.backgroundImage}"/>
  9. <c:set var="listStyleCode" value="${empty navigation.wnlscode ? 10000 : navigation.wnlscode}"/>
  10. <c:set var="isGraphicList" value="${listStyleCode == 10010}"/>
  11. <c:set var="isMediaGrid" value="${listStyleCode == 10030 or listStyleCode == 10050}"/>
  12. <!doctype html>
  13. <html lang="zh-CN">
  14. <head>
  15. <meta charset="UTF-8">
  16. <meta name="viewport" content="width=device-width, initial-scale=1">
  17. <title>${navigation.name}_${website.seoTitle}</title>
  18. <link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260918-news-red-mobile-slogan-gap20">
  19. </head>
  20. <body class="screen-red-theme">
  21. <%@ include file="news-red-header.jsp"%>
  22. <main>
  23. <div class="news-breadcrumb"><div class="wrap"><a href="/">首页</a><c:forEach items="${crumbsNavList}" var="item"><span> / </span><a href="${item.url}">${item.name}</a></c:forEach></div></div>
  24. <section class="section"><div class="wrap news-list-layout">
  25. <aside class="news-sidebar">
  26. <div class="news-sidebar-media"><img src="${sidebarImage}" alt="${sidebarTitle}"><strong class="news-sidebar-title">${sidebarTitle}</strong></div>
  27. <nav class="news-sidebar-links" aria-label="${sidebarTitle}导航">
  28. <c:choose>
  29. <c:when test="${not empty brotherNavList}">
  30. <c:forEach items="${brotherNavList}" var="item"><a class="${item.navigationid eq navigation.navigationid ? 'active' : ''}" href="${item.href}" target="${item.target}">${item.name}</a></c:forEach>
  31. </c:when>
  32. <c:when test="${not empty childrenNavList}">
  33. <c:forEach items="${childrenNavList}" var="item"><a class="${item.navigationid eq navigation.navigationid ? 'active' : ''}" href="${item.href}" target="${item.target}">${item.name}</a></c:forEach>
  34. </c:when>
  35. <c:otherwise><c:forEach items="${navList}" var="item"><c:if test="${item.name ne '首页' and item.name ne '首页子栏目'}"><a class="${item.navigationid eq navigation.navigationid ? 'active' : ''}" href="${item.href}" target="${item.target}">${item.name}</a></c:if></c:forEach></c:otherwise>
  36. </c:choose>
  37. </nav>
  38. </aside>
  39. <article class="news-list-panel">
  40. <div class="news-list-head"><h1>${navigation.name}</h1><span>${empty navigation.nameAssistant ? 'News List' : navigation.nameAssistant}</span></div>
  41. <c:choose>
  42. <c:when test="${empty articleList}"><div class="empty-line">暂无内容</div></c:when>
  43. <c:when test="${isMediaGrid}">
  44. <ul class="article-list article-list-media">
  45. <c:forEach items="${articleList}" var="item"><li><a href="${item.url}" target="${item.target}"><img src="${empty item.thumbnail ? defaultListImage : item.thumbnail}" alt="${item.title}"><div class="article-copy"><strong>${item.title}</strong><p>${item.desc}</p><time><fmt:formatDate value="${item.release_time}" pattern="yyyy-MM-dd"/></time></div></a></li></c:forEach>
  46. </ul>
  47. </c:when>
  48. <c:when test="${isGraphicList}">
  49. <ul class="article-list article-list-graphic">
  50. <c:forEach items="${articleList}" var="item"><li><a href="${item.url}" target="${item.target}"><img src="${empty item.thumbnail ? defaultListImage : item.thumbnail}" alt="${item.title}"><div class="article-copy"><strong>${item.title}</strong><p>${item.desc}</p><time><fmt:formatDate value="${item.release_time}" pattern="yyyy-MM-dd"/></time></div></a></li></c:forEach>
  51. </ul>
  52. </c:when>
  53. <c:otherwise>
  54. <ul class="article-list">
  55. <c:forEach items="${articleList}" var="item"><li><a href="${item.url}" target="${item.target}"><time><fmt:formatDate value="${item.release_time}" pattern="yyyy-MM-dd"/></time><div class="article-copy"><strong>${item.title}</strong><p>${item.desc}</p></div></a></li></c:forEach>
  56. </ul>
  57. </c:otherwise>
  58. </c:choose>
  59. <c:if test="${pageCount > 1}">
  60. <nav class="news-pagination" aria-label="分页"><c:if test="${curPageNo > 1}"><a href="${curHerf}?page=${curPageNo - 1}">上一页</a></c:if><a class="active" href="${curHerf}?page=${curPageNo}">${curPageNo}</a><c:if test="${curPageNo < pageCount}"><a href="${curHerf}?page=${curPageNo + 1}">下一页</a></c:if></nav>
  61. </c:if>
  62. </article>
  63. </div></section>
  64. </main>
  65. <%@ include file="news-red-footer.jsp"%>
  66. </body>
  67. </html>