xingong-header.jsp 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <%@ page pageEncoding="UTF-8"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
  4. <header class="header">
  5. <div class="wm" aria-hidden="true">
  6. <svg class="l" viewBox="0 0 300 118" fill="none" stroke="#fff" stroke-width="1.4">
  7. <circle cx="60" cy="59" r="34"/><circle cx="60" cy="59" r="20"/>
  8. <path d="M8 92 L52 60 L18 44 L60 24"/>
  9. <text x="112" y="40" fill="#fff" stroke="none" font-size="20" font-family="serif">∑ ∫ π</text>
  10. <text x="112" y="72" fill="#fff" stroke="none" font-size="16" font-family="serif">f(x)=ax²+bx+c</text>
  11. </svg>
  12. <svg class="r" viewBox="0 0 300 118" fill="none" stroke="#fff" stroke-width="1.4">
  13. <path d="M292 18 H210 V52 H150 V86 H60 M292 58 H240 V96 H150"/>
  14. <circle cx="286" cy="18" r="5"/><circle cx="286" cy="58" r="5"/><circle cx="60" cy="86" r="5"/>
  15. <rect x="150" y="42" width="34" height="20" rx="3"/><path d="M184 52 H210"/>
  16. </svg>
  17. </div>
  18. <div class="wrap">
  19. <a class="brand" href="/" aria-label="${website.name}首页">
  20. <c:choose>
  21. <c:when test="${not empty website.logo}"><img class="brand-logo-image" src="${website.logo}" alt="${website.name}"></c:when>
  22. <c:otherwise><span class="brand-text-fallback"><span class="s1">${website.name}</span><span class="s2">School of Information Engineering</span></span></c:otherwise>
  23. </c:choose>
  24. </a>
  25. <form class="search" action="/search" method="get" role="search">
  26. <input type="search" name="str" value="${fn:escapeXml(str)}" placeholder="搜索文章…" aria-label="站内搜索">
  27. <button class="btn" type="submit" aria-label="提交搜索">
  28. <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round"><circle cx="10.5" cy="10.5" r="7"/><path d="M20 20 l-4.6-4.6"/></svg>
  29. </button>
  30. </form>
  31. </div>
  32. </header>
  33. <nav class="nav" aria-label="主导航">
  34. <ul>
  35. <c:forEach items="${navList}" var="item">
  36. <c:if test="${item.name ne '首页子栏目'}">
  37. <li class="${not empty item.children ? 'has-children' : ''}${empty navigation and item.name eq '首页' ? ' on' : ''}">
  38. <a href="${item.href}" target="${item.target}">${item.name}</a>
  39. <c:if test="${not empty item.children}">
  40. <ul class="xg-nav-panel">
  41. <c:forEach items="${item.children}" var="child">
  42. <li><a href="${child.href}" target="${child.target}">${child.name}</a></li>
  43. </c:forEach>
  44. </ul>
  45. </c:if>
  46. </li>
  47. </c:if>
  48. </c:forEach>
  49. </ul>
  50. </nav>