|
|
@@ -25,11 +25,16 @@
|
|
|
</a>
|
|
|
<div class="header-search-group">
|
|
|
<c:if test="${xingongHomePage}">
|
|
|
+ <c:set var="xgSchoolHomeFound" value="${false}" scope="request"/>
|
|
|
<c:forEach items="${deptTopLinksNmv.articleList}" var="item">
|
|
|
<c:if test="${item.title eq '学校首页'}">
|
|
|
+ <c:set var="xgSchoolHomeFound" value="${true}" scope="request"/>
|
|
|
<a class="school-home-link" href="${item.url}" target="${item.target}" rel="noopener"><span>${item.title}</span><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M7 17 17 7M9 7h8v8"/></svg></a>
|
|
|
</c:if>
|
|
|
</c:forEach>
|
|
|
+ <c:if test="${not xgSchoolHomeFound}">
|
|
|
+ <a class="school-home-link" href="https://www.gzhxtc.edu.cn/" target="_blank" rel="noopener"><span>学校首页</span><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M7 17 17 7M9 7h8v8"/></svg></a>
|
|
|
+ </c:if>
|
|
|
</c:if>
|
|
|
<form class="search" action="/search" method="get" role="search">
|
|
|
<input type="search" name="str" value="${fn:escapeXml(str)}" placeholder="搜索文章…" aria-label="站内搜索">
|
|
|
@@ -45,8 +50,8 @@
|
|
|
<ul>
|
|
|
<c:forEach items="${navList}" var="item">
|
|
|
<c:if test="${item.name ne '首页子栏目'}">
|
|
|
- <li class="${not empty item.children ? 'has-children' : ''}${empty navigation and item.name eq '首页' ? ' on' : ''}">
|
|
|
- <a href="${item.href}" target="${item.target}">${item.name}</a>
|
|
|
+ <li class="${not empty item.children ? 'has-children' : ''}${(empty navigation and item.name eq '首页') or item.navigationid eq navigation.navigationid or item.navigationid eq navigation.parentNid ? ' on' : ''}">
|
|
|
+ <a href="${empty item.href ? (empty item.children ? '/' : item.children[0].href) : item.href}" target="${item.target}">${item.name}</a>
|
|
|
<c:if test="${not empty item.children}">
|
|
|
<ul class="xg-nav-panel">
|
|
|
<c:forEach items="${item.children}" var="child">
|
|
|
@@ -67,7 +72,7 @@
|
|
|
<a href="/">首页</a>
|
|
|
<c:forEach items="${navList}" var="item">
|
|
|
<c:if test="${item.name ne '首页子栏目'}">
|
|
|
- <a href="${item.href}" target="${item.target}">${item.name}</a>
|
|
|
+ <a href="${empty item.href ? (empty item.children ? '/' : item.children[0].href) : item.href}" target="${item.target}">${item.name}</a>
|
|
|
<c:if test="${not empty item.children}">
|
|
|
<div class="xg-drawer-children">
|
|
|
<c:forEach items="${item.children}" var="child"><a href="${child.href}" target="${child.target}">${child.name}</a></c:forEach>
|