Browse Source

调整快速导航出现时机

右侧快速导航在首屏轮播区域保持隐藏,页面滚动到校园新闻栏目后才显示;返回首屏轮播时再次隐藏。

Validation:
- scrollY=0 时无 is-visible
- 滚轮进入校园新闻 scrollY=640 时显示
- 返回 scrollY=0 后隐藏
- /usr/bin/python3 /tmp/verify-gjjx-sites.py(主站 115、部门站 47,bad=0/external=0)
非繁 1 month ago
parent
commit
513f983d47

+ 3 - 1
WebRoot/main/ffkj-portal/gjjx-blue.js

@@ -177,11 +177,13 @@
     var href = link.getAttribute('href') || '';
     var href = link.getAttribute('href') || '';
     return href.charAt(0) === '#' ? document.querySelector(href) : null;
     return href.charAt(0) === '#' ? document.querySelector(href) : null;
   });
   });
+  var revealAnchor = document.querySelector('#gjjx-news');
   var ticking = false;
   var ticking = false;
 
 
   function update() {
   function update() {
     ticking = false;
     ticking = false;
-    nav.classList.add('is-visible');
+    var revealAt = revealAnchor ? revealAnchor.offsetTop - 72 : 180;
+    nav.classList.toggle('is-visible', window.scrollY >= Math.max(0, revealAt));
     if (!sections.some(Boolean)) return;
     if (!sections.some(Boolean)) return;
     var marker = window.scrollY + window.innerHeight * 0.36;
     var marker = window.scrollY + window.innerHeight * 0.36;
     var active = -1;
     var active = -1;

+ 2 - 2
WebRoot/web/upload/ffkj-template/gjjx-catalog.jsp

@@ -1,5 +1,5 @@
 <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
 <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <c:set var="sidebarTitle" value="${empty parNavigation.name ? navigation.name : parNavigation.name}"/>
 <c:set var="sidebarTitle" value="${empty parNavigation.name ? navigation.name : parNavigation.name}"/>
-<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>${navigation.name}_${website.seoTitle}</title><link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-25"><link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-25"></head>
-<body class="screen-blue-theme gjjx-site gjjx-inner-page"><div class="portal-shell gjjx-site"><%@ include file="gjjx-header.jsp"%><main class="gjjx-inner-main"><div class="wrap gjjx-breadcrumb"><a href="/">首页</a><c:forEach items="${crumbsNavList}" var="item"><span>/</span><a href="${item.url}">${item.name}</a></c:forEach></div><section class="wrap gjjx-inner-layout"><aside class="gjjx-inner-sidebar"><div class="gjjx-sidebar-media"><img src="/main/ffkj-portal/gjjx/hero-3.jpg" alt="${sidebarTitle}"><strong>${sidebarTitle}</strong></div><nav><c:forEach items="${childrenNavList}" var="item"><a href="${item.href}" target="${item.target}">${item.name}</a></c:forEach></nav></aside><article class="gjjx-inner-panel"><div class="gjjx-inner-title"><h1>${navigation.name}</h1><span>${empty navigation.nameAssistant ? 'COLUMNS' : navigation.nameAssistant}</span></div><div class="gjjx-catalog-grid"><c:forEach items="${childrenNavList}" var="item"><a href="${item.href}" target="${item.target}"><strong>${item.name}</strong><p>${empty item.desc ? '进入该栏目查看更多内容。' : item.desc}</p><em>查看栏目 →</em></a></c:forEach></div></article></section></main><%@ include file="gjjx-footer.jsp"%></div><script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-25"></script></body></html>
+<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>${navigation.name}_${website.seoTitle}</title><link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-26"><link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-26"></head>
+<body class="screen-blue-theme gjjx-site gjjx-inner-page"><div class="portal-shell gjjx-site"><%@ include file="gjjx-header.jsp"%><main class="gjjx-inner-main"><div class="wrap gjjx-breadcrumb"><a href="/">首页</a><c:forEach items="${crumbsNavList}" var="item"><span>/</span><a href="${item.url}">${item.name}</a></c:forEach></div><section class="wrap gjjx-inner-layout"><aside class="gjjx-inner-sidebar"><div class="gjjx-sidebar-media"><img src="/main/ffkj-portal/gjjx/hero-3.jpg" alt="${sidebarTitle}"><strong>${sidebarTitle}</strong></div><nav><c:forEach items="${childrenNavList}" var="item"><a href="${item.href}" target="${item.target}">${item.name}</a></c:forEach></nav></aside><article class="gjjx-inner-panel"><div class="gjjx-inner-title"><h1>${navigation.name}</h1><span>${empty navigation.nameAssistant ? 'COLUMNS' : navigation.nameAssistant}</span></div><div class="gjjx-catalog-grid"><c:forEach items="${childrenNavList}" var="item"><a href="${item.href}" target="${item.target}"><strong>${item.name}</strong><p>${empty item.desc ? '进入该栏目查看更多内容。' : item.desc}</p><em>查看栏目 →</em></a></c:forEach></div></article></section></main><%@ include file="gjjx-footer.jsp"%></div><script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-26"></script></body></html>

+ 1 - 1
WebRoot/web/upload/ffkj-template/gjjx-dept-catalog.jsp

@@ -11,7 +11,7 @@
 	<meta charset="UTF-8">
 	<meta charset="UTF-8">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<title>${navigation.name}_${website.seoTitle}</title>
 	<title>${navigation.name}_${website.seoTitle}</title>
-	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-25">
+	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-26">
 	<c:if test="${not empty portalThemeStyle}"><style>${portalThemeStyle}</style></c:if>
 	<c:if test="${not empty portalThemeStyle}"><style>${portalThemeStyle}</style></c:if>
 </head>
 </head>
 <body class="${portalThemeClass}">
 <body class="${portalThemeClass}">

+ 1 - 1
WebRoot/web/upload/ffkj-template/gjjx-dept-details.jsp

@@ -10,7 +10,7 @@
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<meta name="description" content="${articleDescription}">
 	<meta name="description" content="${articleDescription}">
 	<title>${articleTitle}_${navigation.name}_${website.seoTitle}</title>
 	<title>${articleTitle}_${navigation.name}_${website.seoTitle}</title>
-	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-25">
+	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-26">
 	<c:if test="${not empty portalThemeStyle}"><style>${portalThemeStyle}</style></c:if>
 	<c:if test="${not empty portalThemeStyle}"><style>${portalThemeStyle}</style></c:if>
 </head>
 </head>
 <body class="${portalThemeClass}">
 <body class="${portalThemeClass}">

+ 1 - 1
WebRoot/web/upload/ffkj-template/gjjx-dept-index.jsp

@@ -12,7 +12,7 @@
 	<meta name="keywords" content="${website.seoKeywords}">
 	<meta name="keywords" content="${website.seoKeywords}">
 	<meta name="description" content="${website.seoDescription}">
 	<meta name="description" content="${website.seoDescription}">
 	<title>${website.seoTitle}</title>
 	<title>${website.seoTitle}</title>
-	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-25">
+	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-26">
 	<c:if test="${not empty portalThemeStyle}"><style>${portalThemeStyle}</style></c:if>
 	<c:if test="${not empty portalThemeStyle}"><style>${portalThemeStyle}</style></c:if>
 </head>
 </head>
 <body class="${portalThemeClass}">
 <body class="${portalThemeClass}">

+ 1 - 1
WebRoot/web/upload/ffkj-template/gjjx-dept-list.jsp

@@ -26,7 +26,7 @@
 	<meta charset="UTF-8">
 	<meta charset="UTF-8">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<title>${navigation.name}_${website.seoTitle}</title>
 	<title>${navigation.name}_${website.seoTitle}</title>
-	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-25">
+	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-26">
 	<c:if test="${not empty portalThemeStyle}"><style>${portalThemeStyle}</style></c:if>
 	<c:if test="${not empty portalThemeStyle}"><style>${portalThemeStyle}</style></c:if>
 </head>
 </head>
 <body class="${portalThemeClass}">
 <body class="${portalThemeClass}">

+ 1 - 1
WebRoot/web/upload/ffkj-template/gjjx-dept-search.jsp

@@ -10,7 +10,7 @@
 	<meta charset="UTF-8">
 	<meta charset="UTF-8">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<title>站内搜索_${website.seoTitle}</title>
 	<title>站内搜索_${website.seoTitle}</title>
-	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-25">
+	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-26">
 	<c:if test="${not empty portalThemeStyle}"><style>${portalThemeStyle}</style></c:if>
 	<c:if test="${not empty portalThemeStyle}"><style>${portalThemeStyle}</style></c:if>
 </head>
 </head>
 <body class="${portalThemeClass}">
 <body class="${portalThemeClass}">

+ 2 - 2
WebRoot/web/upload/ffkj-template/gjjx-details.jsp

@@ -1,4 +1,4 @@
 <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
 <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
-<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="${articleDescription}"><title>${articleTitle}_${navigation.name}_${website.seoTitle}</title><link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-25"><link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-25"></head>
-<body class="screen-blue-theme gjjx-site gjjx-inner-page"><div class="portal-shell gjjx-site"><%@ include file="gjjx-header.jsp"%><main class="gjjx-inner-main"><div class="wrap gjjx-breadcrumb"><a href="/">首页</a><c:forEach items="${crumbsNavList}" var="item"><span>/</span><a href="${item.url}">${item.name}</a></c:forEach></div><article class="wrap gjjx-detail"><h1>${articleTitle}</h1><div class="gjjx-detail-meta"><span>${navigation.name}</span><time>${articleReleaseTime}</time><span>来源:${articleSource}</span></div><div class="gjjx-detail-body">${articleContent}</div></article></main><%@ include file="gjjx-footer.jsp"%></div><script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-25"></script><script src="/apps/space/js/secure-pdf.js?v=20260709-pdf-secure"></script></body></html>
+<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="${articleDescription}"><title>${articleTitle}_${navigation.name}_${website.seoTitle}</title><link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-26"><link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-26"></head>
+<body class="screen-blue-theme gjjx-site gjjx-inner-page"><div class="portal-shell gjjx-site"><%@ include file="gjjx-header.jsp"%><main class="gjjx-inner-main"><div class="wrap gjjx-breadcrumb"><a href="/">首页</a><c:forEach items="${crumbsNavList}" var="item"><span>/</span><a href="${item.url}">${item.name}</a></c:forEach></div><article class="wrap gjjx-detail"><h1>${articleTitle}</h1><div class="gjjx-detail-meta"><span>${navigation.name}</span><time>${articleReleaseTime}</time><span>来源:${articleSource}</span></div><div class="gjjx-detail-body">${articleContent}</div></article></main><%@ include file="gjjx-footer.jsp"%></div><script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-26"></script><script src="/apps/space/js/secure-pdf.js?v=20260709-pdf-secure"></script></body></html>

+ 4 - 4
WebRoot/web/upload/ffkj-template/gjjx-index.jsp

@@ -13,8 +13,8 @@
 	<meta name="keywords" content="${website.seoKeywords}">
 	<meta name="keywords" content="${website.seoKeywords}">
 	<meta name="description" content="${website.seoDescription}">
 	<meta name="description" content="${website.seoDescription}">
 	<title>${website.seoTitle}</title>
 	<title>${website.seoTitle}</title>
-	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-25">
-	<link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-25">
+	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-26">
+	<link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-26">
 </head>
 </head>
 <body class="screen-blue-theme gjjx-site">
 <body class="screen-blue-theme gjjx-site">
 <div class="portal-shell screen-shell screen-blue-theme gjjx-site">
 <div class="portal-shell screen-shell screen-blue-theme gjjx-site">
@@ -164,7 +164,7 @@
 	</c:if>
 	</c:if>
 	<%@ include file="gjjx-footer.jsp"%>
 	<%@ include file="gjjx-footer.jsp"%>
 </div>
 </div>
-<script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-25"></script>
-<script src="/main/ffkj-portal/gjjx-blue.js?v=20261017-gjjx-blue-25"></script>
+<script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-26"></script>
+<script src="/main/ffkj-portal/gjjx-blue.js?v=20261017-gjjx-blue-26"></script>
 </body>
 </body>
 </html>
 </html>

+ 2 - 2
WebRoot/web/upload/ffkj-template/gjjx-list.jsp

@@ -5,7 +5,7 @@
 <c:set var="sidebarTitle" value="${empty parNavigation.name ? navigation.name : parNavigation.name}"/>
 <c:set var="sidebarTitle" value="${empty parNavigation.name ? navigation.name : parNavigation.name}"/>
 <c:set var="sidebarImage" value="${empty navigation.backgroundImage ? '/main/ffkj-portal/gjjx/hero-2.jpg' : navigation.backgroundImage}"/>
 <c:set var="sidebarImage" value="${empty navigation.backgroundImage ? '/main/ffkj-portal/gjjx/hero-2.jpg' : navigation.backgroundImage}"/>
 <!doctype html>
 <!doctype html>
-<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>${navigation.name}_${website.seoTitle}</title><link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-25"><link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-25"></head>
+<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>${navigation.name}_${website.seoTitle}</title><link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-26"><link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-26"></head>
 <body class="screen-blue-theme gjjx-site gjjx-inner-page"><div class="portal-shell gjjx-site">
 <body class="screen-blue-theme gjjx-site gjjx-inner-page"><div class="portal-shell gjjx-site">
 <%@ include file="gjjx-header.jsp"%>
 <%@ include file="gjjx-header.jsp"%>
 <main class="gjjx-inner-main">
 <main class="gjjx-inner-main">
@@ -16,4 +16,4 @@
 	</section>
 	</section>
 </main>
 </main>
 <%@ include file="gjjx-footer.jsp"%>
 <%@ include file="gjjx-footer.jsp"%>
-</div><script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-25"></script></body></html>
+</div><script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-26"></script></body></html>

+ 3 - 3
WebRoot/web/upload/ffkj-template/gjjx-org.jsp

@@ -6,8 +6,8 @@
 	<meta charset="UTF-8">
 	<meta charset="UTF-8">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<title>${navigation.name}_${website.seoTitle}</title>
 	<title>${navigation.name}_${website.seoTitle}</title>
-	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-25">
-	<link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-25">
+	<link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-26">
+	<link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-26">
 	<style>
 	<style>
 		body.gjjx-org-structure-page{--wrap:1440px;background:#fff}
 		body.gjjx-org-structure-page{--wrap:1440px;background:#fff}
 		body.gjjx-org-structure-page .portal-shell.gjjx-org-structure-page{display:flex;min-height:100vh;min-height:100dvh;flex-direction:column;padding-top:0;background:#fff}
 		body.gjjx-org-structure-page .portal-shell.gjjx-org-structure-page{display:flex;min-height:100vh;min-height:100dvh;flex-direction:column;padding-top:0;background:#fff}
@@ -79,6 +79,6 @@
 	</main>
 	</main>
 	<%@ include file="gjjx-footer.jsp"%>
 	<%@ include file="gjjx-footer.jsp"%>
 </div>
 </div>
-<script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-25"></script>
+<script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-26"></script>
 </body>
 </body>
 </html>
 </html>

+ 2 - 2
WebRoot/web/upload/ffkj-template/gjjx-search.jsp

@@ -1,5 +1,5 @@
 <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
 <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
-<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>站内搜索_${website.seoTitle}</title><link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-25"><link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-25"></head>
-<body class="screen-blue-theme gjjx-site gjjx-inner-page"><div class="portal-shell gjjx-site"><%@ include file="gjjx-header.jsp"%><main class="gjjx-inner-main"><section class="wrap gjjx-inner-panel gjjx-search-panel"><div class="gjjx-inner-title"><h1>站内搜索</h1><span>搜索:${str}</span></div><c:choose><c:when test="${empty articleList}"><div class="gjjx-empty">没有找到匹配内容</div></c:when><c:otherwise><ul class="gjjx-article-list"><c:forEach items="${articleList}" var="item"><li><a href="${item.url}" target="${item.target}"><span><strong>${item.title}</strong><p>${item.desc}</p></span><time><fmt:formatDate value="${item.release_time}" pattern="yyyy-MM-dd"/></time></a></li></c:forEach></ul></c:otherwise></c:choose></section></main><%@ include file="gjjx-footer.jsp"%></div><script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-25"></script></body></html>
+<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>站内搜索_${website.seoTitle}</title><link rel="stylesheet" href="/main/ffkj-portal/portal-source.css?v=20261017-gjjx-blue-26"><link rel="stylesheet" href="/main/ffkj-portal/gjjx-blue.css?v=20261017-gjjx-blue-26"></head>
+<body class="screen-blue-theme gjjx-site gjjx-inner-page"><div class="portal-shell gjjx-site"><%@ include file="gjjx-header.jsp"%><main class="gjjx-inner-main"><section class="wrap gjjx-inner-panel gjjx-search-panel"><div class="gjjx-inner-title"><h1>站内搜索</h1><span>搜索:${str}</span></div><c:choose><c:when test="${empty articleList}"><div class="gjjx-empty">没有找到匹配内容</div></c:when><c:otherwise><ul class="gjjx-article-list"><c:forEach items="${articleList}" var="item"><li><a href="${item.url}" target="${item.target}"><span><strong>${item.title}</strong><p>${item.desc}</p></span><time><fmt:formatDate value="${item.release_time}" pattern="yyyy-MM-dd"/></time></a></li></c:forEach></ul></c:otherwise></c:choose></section></main><%@ include file="gjjx-footer.jsp"%></div><script src="/main/ffkj-portal/portal-zq.js?v=20261017-gjjx-blue-26"></script></body></html>