1010210682_run.jsp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <div class="header">
  4. <div>
  5. <div class="header-top">
  6. <div class="header-top-bg"></div>
  7. <!-- ${dingbulianjie.articleList} -->
  8. <div class="header-top-left">
  9. <!-- 第一个循环,只处理前四个元素 -->
  10. <c:forEach items="${dingbulianjie.articleList}" var="item" varStatus="status" begin="0" end="3">
  11. <span>
  12. <a href="${item.url}" target="${item.target}">
  13. <c:out value="${item.title}" />
  14. </a>
  15. </span>
  16. </c:forEach>
  17. </div>
  18. <div class="header-top-right">
  19. <!-- 第二个循环,跳过前三个元素,处理剩余的元素 -->
  20. <c:forEach items="${dingbulianjie.articleList}" var="item" varStatus="status" begin="4">
  21. <span>
  22. <a href="${item.url}" target="${item.target}">
  23. <c:out value="${item.title}" />
  24. </a>
  25. </span>
  26. </c:forEach>
  27. </div>
  28. <div class="header-img">
  29. <c:forEach items="${logo.articleList}" var="item" varStatus="status">
  30. <img src="${item.thumbnail}" alt=""/>
  31. </c:forEach>
  32. </div>
  33. <div class="mobile-nav-icon">
  34. <span></span>
  35. <span></span>
  36. <span></span>
  37. </div>
  38. </div>
  39. </div>
  40. <div>
  41. <!-- 导航 -->
  42. <div class="header-nav">
  43. <ul>
  44. <c:forEach items="${navList}" var="item">
  45. <li>
  46. <c:if test="${item.existChildren == '0'}">
  47. <a href="${item.href}" target="${item.target}">
  48. ${item.name}
  49. </a>
  50. </c:if>
  51. <c:if test="${item.existChildren == '1'}">
  52. <a href="${item.href}" target="${item.target}">
  53. ${item.name}
  54. <span>></span>
  55. </a>
  56. <ul class="nav-secondLevel">
  57. <c:forEach items="${item.children}" var="item2">
  58. <li>
  59. <c:if test="${item2.existChildren == '0'}">
  60. <a href="${item2.href}" target="${item2.target}">
  61. ${item2.name}
  62. </a>
  63. </c:if>
  64. <c:if test="${item2.existChildren == '1'}">
  65. <a href="${item2.href}" target="${item2.target}">
  66. ${item2.name}
  67. <span>></span>
  68. </a>
  69. <ul class="nav-threeLevel">
  70. <c:forEach items="${item2.children}" var="item3">
  71. <li>
  72. <a href="${item3.href}" target="${item3.target}">
  73. ${item3.name}
  74. </a>
  75. </li>
  76. </c:forEach>
  77. </ul>
  78. </c:if>
  79. </li>
  80. </c:forEach>
  81. </ul>
  82. </c:if>
  83. </li>
  84. </c:forEach>
  85. </ul>
  86. </div>
  87. </div>
  88. <div class="header-top-bg" style="transform: rotate(180deg)"></div>
  89. <!-- 移动端导航,跟上面的导航一模一样,最外层的类名不一样 -->
  90. <div class="mobile-header-nav">
  91. <ul>
  92. <c:forEach items="${navList}" var="item">
  93. <li>
  94. <c:if test="${item.existChildren == '0'}">
  95. <a href="${item.href}" target="${item.target}">
  96. ${item.name}
  97. </a>
  98. </c:if>
  99. <c:if test="${item.existChildren == '1'}">
  100. <a href="#">
  101. ${item.name}
  102. <span>></span>
  103. </a>
  104. <ul class="nav-secondLevel">
  105. <c:forEach items="${item.children}" var="item2">
  106. <li>
  107. <c:if test="${item2.existChildren == '0'}">
  108. <a href="${item2.href}" target="${item2.target}">
  109. ${item2.name}
  110. </a>
  111. </c:if>
  112. <c:if test="${item2.existChildren == '1'}">
  113. <a href="#">
  114. ${item2.name}
  115. <span>></span>
  116. </a>
  117. <ul class="nav-threeLevel">
  118. <c:forEach items="${item2.children}" var="item3">
  119. <li>
  120. <a href="${item3.href}" target="${item3.target}">
  121. ${item3.name}
  122. </a>
  123. </li>
  124. </c:forEach>
  125. </ul>
  126. </c:if>
  127. </li>
  128. </c:forEach>
  129. </ul>
  130. </c:if>
  131. </li>
  132. </c:forEach>
  133. </ul>
  134. </div>
  135. </div>