vehicle-list.jsp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. <c:set var="vehicleDefaultImage" value="/main/ffkj-portal/vehicle-source/hero-01-q2ERYw8krpzmxfjShDx5cSW2PU.jpg"/>
  5. <c:set var="vehiclePageImage" value="${empty navigation.backgroundImage ? vehicleDefaultImage : navigation.backgroundImage}"/>
  6. <c:set var="vehicleSidebarTitle" value="${empty parNavigation.name ? navigation.name : parNavigation.name}"/>
  7. <c:if test="${empty articleList and not empty childrenNavList}"><c:redirect url="https://${pageContext.request.serverName}${childrenNavList[0].href}"/></c:if>
  8. <!doctype html>
  9. <html lang="zh-CN">
  10. <head>
  11. <meta charset="UTF-8">
  12. <meta name="viewport" content="width=device-width, initial-scale=1">
  13. <title>${navigation.name}_${empty website.seoTitle ? website.name : website.seoTitle}</title>
  14. <link rel="icon" href="${empty website.seoIcon ? website.logo : website.seoIcon}?v=20261105-logo-2">
  15. <link rel="stylesheet" href="/main/ffkj-portal/vehicle-college.css?v=20261127-nav-poster1">
  16. </head>
  17. <body class="vehicle-page" id="top">
  18. <%@ include file="vehicle-header.jsp"%>
  19. <main>
  20. <section class="vc-page-hero" style="--vc-page-bg:url('${vehiclePageImage}')">
  21. <div class="vc-page-hero-inner">
  22. <small>COLLEGE NEWS · 栏目列表</small>
  23. <div class="vc-page-hero-title">${navigation.name}</div>
  24. <p>${empty navigation.desc ? '汇集车辆学院教学、科研、实践与校园动态,记录学院发展。' : navigation.desc}</p>
  25. </div>
  26. </section>
  27. <div class="vc-breadcrumb"><div class="vc-wrap"><a href="/">首页</a><c:forEach items="${crumbsNavList}" var="item"><span>/</span><a href="${item.url}">${item.name}</a></c:forEach></div></div>
  28. <section class="vc-list-section">
  29. <div class="vc-wrap vc-list-layout">
  30. <aside class="vc-sidebar">
  31. <div class="vc-sidebar-head"><small>COLUMN NAVIGATION</small><h2>${empty vehicleSidebarTitle ? '学院栏目' : vehicleSidebarTitle}</h2></div>
  32. <nav class="vc-sidebar-nav" aria-label="${vehicleSidebarTitle}导航">
  33. <c:choose>
  34. <c:when test="${not empty childrenNavList}"><c:forEach items="${childrenNavList}" var="item"><a class="${item.navigationid eq navigation.navigationid ? 'is-active' : ''}" href="${item.href}" target="${item.target}" rel="noopener">${item.name}</a></c:forEach></c:when>
  35. <c:when test="${not empty brotherNavList}"><c:forEach items="${brotherNavList}" var="item"><a class="${item.navigationid eq navigation.navigationid ? 'is-active' : ''}" href="${item.href}" target="${item.target}" rel="noopener">${item.name}</a></c:forEach></c:when>
  36. <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 ? 'is-active' : ''}" href="${item.href}" target="${item.target}" rel="noopener">${item.name}</a></c:if></c:forEach></c:otherwise>
  37. </c:choose>
  38. </nav>
  39. </aside>
  40. <article class="vc-list-panel">
  41. <div class="vc-list-head"><h1>${navigation.name}</h1><span>${empty navigation.nameAssistant ? 'News List' : navigation.nameAssistant}</span></div>
  42. <c:choose>
  43. <c:when test="${empty articleList and not empty childrenNavList}">
  44. <div class="vc-catalog-grid">
  45. <c:forEach items="${childrenNavList}" var="item"><a class="vc-catalog-card" href="${item.href}" target="${item.target}" rel="noopener"><strong>${item.name}</strong><p>${empty item.desc ? '进入该栏目查看更多内容。' : item.desc}</p></a></c:forEach>
  46. </div>
  47. </c:when>
  48. <c:when test="${empty articleList}"><div class="vc-empty" style="margin-top:22px">暂无内容,请在后台发布文章。</div></c:when>
  49. <c:otherwise>
  50. <ul class="vc-article-list">
  51. <c:forEach items="${articleList}" var="item">
  52. <li><a class="vc-article-card" href="${item.url}" target="${item.target}" rel="noopener">
  53. <div class="vc-article-thumb"><img src="${empty item.thumbnail ? vehicleDefaultImage : item.thumbnail}" alt="${item.title}"></div>
  54. <div class="vc-article-copy">
  55. <h2>${item.title}</h2>
  56. <c:if test="${not empty item.desc}"><p>${item.desc}</p></c:if>
  57. <div class="vc-article-meta"><span>${navigation.name}</span><time><fmt:formatDate value="${item.release_time}" pattern="yyyy-MM-dd"/></time></div>
  58. </div>
  59. </a></li>
  60. </c:forEach>
  61. </ul>
  62. </c:otherwise>
  63. </c:choose>
  64. <c:if test="${not empty articleList}">
  65. <c:set var="pageWindowStart" value="${curPageNo - 2 < 1 ? 1 : curPageNo - 2}"/>
  66. <c:set var="pageWindowEnd" value="${pageWindowStart + 4 > pageCount ? pageCount : pageWindowStart + 4}"/>
  67. <c:set var="pageWindowStart" value="${pageWindowEnd - 4 < 1 ? 1 : pageWindowEnd - 4}"/>
  68. <nav class="vc-pagination" data-page-count="${pageCount}" data-current-page="${curPageNo}" aria-label="分页">
  69. <span class="vc-page-summary">共 ${pageCount} 页</span>
  70. <c:choose><c:when test="${curPageNo > 1}"><a href="${curHerf}?page=${curPageNo - 1}">上一页</a></c:when><c:otherwise><span class="is-disabled">上一页</span></c:otherwise></c:choose>
  71. <c:if test="${pageWindowStart > 1}"><a href="${curHerf}?page=1">1</a><c:if test="${pageWindowStart > 2}"><span class="vc-ellipsis">…</span></c:if></c:if>
  72. <c:forEach begin="${pageWindowStart}" end="${pageWindowEnd}" var="pageNo"><a class="${pageNo eq curPageNo ? 'is-active' : ''}" href="${curHerf}?page=${pageNo}">${pageNo}</a></c:forEach>
  73. <c:if test="${pageWindowEnd < pageCount}"><c:if test="${pageWindowEnd < pageCount - 1}"><span class="vc-ellipsis">…</span></c:if><a href="${curHerf}?page=${pageCount}">${pageCount}</a></c:if>
  74. <c:choose><c:when test="${curPageNo < pageCount}"><a href="${curHerf}?page=${curPageNo + 1}">下一页</a></c:when><c:otherwise><span class="is-disabled">下一页</span></c:otherwise></c:choose>
  75. </nav>
  76. </c:if>
  77. </article>
  78. </div>
  79. </section>
  80. </main>
  81. <%@ include file="vehicle-footer.jsp"%>
  82. <script src="/main/ffkj-portal/pagination-jump.js?v=20261128-search-pages-r3"></script>
  83. </body>
  84. </html>