1010910739_edit.jsp 3.8 KB

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