| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <div class="header">
- <div>
- <div class="header-top">
- <div class="header-top-bg"></div>
- <!-- ${dingbulianjie.articleList} -->
- <div class="header-top-left">
- <!-- 第一个循环,只处理前四个元素 -->
- <c:forEach items="${dingbulianjie.articleList}" var="item" varStatus="status" begin="0" end="3">
- <span>
- <a href="${item.url}" target="${item.target}">
- <c:out value="${item.title}" />
- </a>
- </span>
- </c:forEach>
- </div>
- <div class="header-top-right">
- <!-- 第二个循环,跳过前三个元素,处理剩余的元素 -->
- <c:forEach items="${dingbulianjie.articleList}" var="item" varStatus="status" begin="4">
- <span>
- <a href="${item.url}" target="${item.target}">
- <c:out value="${item.title}" />
- </a>
- </span>
- </c:forEach>
- </div>
- <div class="header-img">
- <c:forEach items="${logo.articleList}" var="item" varStatus="status">
- <img src="${item.thumbnail}" alt=""/>
- </c:forEach>
- </div>
- <div class="mobile-nav-icon">
- <span></span>
- <span></span>
- <span></span>
- </div>
- </div>
- </div>
- <div>
- <!-- 导航 -->
- <div class="header-nav">
- <ul>
- <c:forEach items="${navList}" var="item">
- <li>
- <c:if test="${item.existChildren == '0'}">
- <a href="${item.href}" target="${item.target}">
- ${item.name}
- </a>
- </c:if>
- <c:if test="${item.existChildren == '1'}">
- <a href="${item.href}" target="${item.target}">
- ${item.name}
- <span>></span>
- </a>
- <ul class="nav-secondLevel">
- <c:forEach items="${item.children}" var="item2">
- <li>
- <c:if test="${item2.existChildren == '0'}">
- <a href="${item2.href}" target="${item2.target}">
- ${item2.name}
- </a>
- </c:if>
- <c:if test="${item2.existChildren == '1'}">
- <a href="${item2.href}" target="${item2.target}">
- ${item2.name}
- <span>></span>
- </a>
- <ul class="nav-threeLevel">
- <c:forEach items="${item2.children}" var="item3">
- <li>
- <a href="${item3.href}" target="${item3.target}">
- ${item3.name}
- </a>
- </li>
- </c:forEach>
- </ul>
- </c:if>
- </li>
- </c:forEach>
- </ul>
- </c:if>
- </li>
- </c:forEach>
- </ul>
- </div>
- </div>
- <div class="header-top-bg" style="transform: rotate(180deg)"></div>
- <!-- 移动端导航,跟上面的导航一模一样,最外层的类名不一样 -->
- <div class="mobile-header-nav">
- <ul>
- <c:forEach items="${navList}" var="item">
- <li>
- <c:if test="${item.existChildren == '0'}">
- <a href="${item.href}" target="${item.target}">
- ${item.name}
- </a>
- </c:if>
- <c:if test="${item.existChildren == '1'}">
- <a href="#">
- ${item.name}
- <span>></span>
- </a>
- <ul class="nav-secondLevel">
- <c:forEach items="${item.children}" var="item2">
- <li>
- <c:if test="${item2.existChildren == '0'}">
- <a href="${item2.href}" target="${item2.target}">
- ${item2.name}
- </a>
- </c:if>
- <c:if test="${item2.existChildren == '1'}">
- <a href="#">
- ${item2.name}
- <span>></span>
- </a>
- <ul class="nav-threeLevel">
- <c:forEach items="${item2.children}" var="item3">
- <li>
- <a href="${item3.href}" target="${item3.target}">
- ${item3.name}
- </a>
- </li>
- </c:forEach>
- </ul>
- </c:if>
- </li>
- </c:forEach>
- </ul>
- </c:if>
- </li>
- </c:forEach>
- </ul>
- </div>
- </div>
|