Browse Source

统一红色二级模板栏目列表与导航

让文字列表和图文列表共用红色二级模板的栏目页外层布局,图文文章继续展示缩略图、描述和日期,并保留响应式列表表现。\n\n让栏目页、正文页和搜索页统一复用红色二级模板的隐式目录穿透导航,确保新闻网-2026各页面导航保持一致;不涉及其他模板、栏目数据或数据库。\n\nValidation:\n- git diff --cached --check\n- 本地红色二级模板栏目页、首页导航一致性和完整环境回归已通过
非繁 2 tháng trước cách đây
mục cha
commit
3c5b24dff9

+ 89 - 13
WebRoot/web/upload/ffkj-template/college-red-list.jsp

@@ -29,7 +29,7 @@
 	<c:set var="navigationUrl" value="${navigation.url}"/>
 	<c:set var="navigationUrl" value="${navigation.url}"/>
 </c:if>
 </c:if>
 <c:set var="isOrgStructurePage" value="${fn:startsWith(navigationUrl, '/zuzhijiegou/')}" />
 <c:set var="isOrgStructurePage" value="${fn:startsWith(navigationUrl, '/zuzhijiegou/')}" />
-<c:set var="isTextArticleList" value="${isTextList and empty childrenNavList and not isOrgStructurePage}"/>
+<c:set var="isUnifiedArticleList" value="${(isTextList or isGraphicList) and empty childrenNavList and not isOrgStructurePage}"/>
 <c:set var="pageClassExtra" value=""/>
 <c:set var="pageClassExtra" value=""/>
 <c:if test="${isOrgStructurePage}">
 <c:if test="${isOrgStructurePage}">
 	<c:set var="pageClassExtra" value="department-org-page"/>
 	<c:set var="pageClassExtra" value="department-org-page"/>
@@ -219,7 +219,7 @@
 			}
 			}
 		</style>
 		</style>
 	</c:if>
 	</c:if>
-	<c:if test="${isTextArticleList}">
+	<c:if test="${isUnifiedArticleList}">
 		<style>
 		<style>
 			body.screen-red-theme .college-department-page .department-graphic-list-layout {
 			body.screen-red-theme .college-department-page .department-graphic-list-layout {
 				display: grid;
 				display: grid;
@@ -421,6 +421,44 @@
 				white-space: nowrap;
 				white-space: nowrap;
 			}
 			}
 
 
+			body.screen-red-theme .college-department-page .department-graphic-article-list-with-thumb .department-graphic-article {
+				grid-template-columns: 190px minmax(0, 1fr);
+				gap: 24px;
+			}
+
+			body.screen-red-theme .college-department-page .department-graphic-article-copy-with-thumb {
+				display: flex;
+				flex-direction: column;
+				gap: 8px;
+				padding-top: 2px;
+			}
+
+			body.screen-red-theme .college-department-page .department-graphic-article-copy-with-thumb .department-graphic-article-head {
+				display: flex;
+				min-width: 0;
+				align-items: center;
+				gap: 14px;
+			}
+
+			body.screen-red-theme .college-department-page .department-graphic-article-copy-with-thumb .department-graphic-article-title {
+				font-weight: 600;
+				line-height: 1.45;
+				white-space: normal;
+			}
+
+			body.screen-red-theme .college-department-page .department-graphic-article-copy-with-thumb p {
+				display: -webkit-box;
+				max-height: calc(14px * 1.55 * 3);
+				margin: 0;
+				overflow: hidden;
+				color: #999999;
+				font-size: 14px;
+				line-height: 1.55;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 3;
+				line-clamp: 3;
+			}
+
 			body.screen-red-theme .college-department-page .department-graphic-article:hover .department-graphic-article-title,
 			body.screen-red-theme .college-department-page .department-graphic-article:hover .department-graphic-article-title,
 			body.screen-red-theme .college-department-page .department-graphic-article:focus-visible .department-graphic-article-title {
 			body.screen-red-theme .college-department-page .department-graphic-article:focus-visible .department-graphic-article-title {
 				color: #be2135;
 				color: #be2135;
@@ -473,6 +511,11 @@
 					padding: 14px 0;
 					padding: 14px 0;
 				}
 				}
 
 
+				body.screen-red-theme .college-department-page .department-graphic-article-list-with-thumb .department-graphic-article {
+					grid-template-columns: 128px minmax(0, 1fr);
+					gap: 12px;
+				}
+
 				body.screen-red-theme .college-department-page .department-graphic-article-copy {
 				body.screen-red-theme .college-department-page .department-graphic-article-copy {
 					grid-template-columns: minmax(0, 1fr) auto;
 					grid-template-columns: minmax(0, 1fr) auto;
 					gap: 8px;
 					gap: 8px;
@@ -485,6 +528,12 @@
 				body.screen-red-theme .college-department-page .department-graphic-article-time {
 				body.screen-red-theme .college-department-page .department-graphic-article-time {
 					font-size: 12px;
 					font-size: 12px;
 				}
 				}
+
+				body.screen-red-theme .college-department-page .department-graphic-article-copy-with-thumb .department-graphic-article-head {
+					align-items: flex-start;
+					flex-direction: column;
+					gap: 4px;
+				}
 			}
 			}
 		</style>
 		</style>
 	</c:if>
 	</c:if>
@@ -572,7 +621,7 @@
 				<c:otherwise>
 				<c:otherwise>
 					<section class="department-inner-content">
 					<section class="department-inner-content">
 						<c:choose>
 						<c:choose>
-				<c:when test="${isTextArticleList}">
+				<c:when test="${isUnifiedArticleList}">
 								<div class="wrap department-graphic-list-layout">
 								<div class="wrap department-graphic-list-layout">
 									<aside class="department-graphic-sidebar">
 									<aside class="department-graphic-sidebar">
 										<div class="department-graphic-sidebar-media"><img src="${sidebarImage}" alt="${navigation.name}"><strong class="department-graphic-sidebar-title">${website.seoTitle}栏目</strong></div>
 										<div class="department-graphic-sidebar-media"><img src="${sidebarImage}" alt="${navigation.name}"><strong class="department-graphic-sidebar-title">${website.seoTitle}栏目</strong></div>
@@ -595,16 +644,43 @@
 									</div>
 									</div>
 									<c:choose>
 									<c:choose>
 										<c:when test="${not empty articleList}">
 										<c:when test="${not empty articleList}">
-											<ul class="department-graphic-article-list">
-												<c:forEach items="${articleList}" var="item">
-													<li>
-														<a class="department-graphic-article" href="${item.url}" target="${item.target}">
-															<strong class="department-graphic-article-title">${item.title}</strong>
-															<time class="department-graphic-article-time"><fmt:formatDate value="${item.release_time}" pattern="yyyy-MM-dd"/></time>
-														</a>
-													</li>
-												</c:forEach>
-											</ul>
+											<c:choose>
+												<c:when test="${isGraphicList}">
+													<ul class="department-graphic-article-list department-graphic-article-list-with-thumb">
+														<c:forEach items="${articleList}" var="item">
+															<li>
+																<a class="department-graphic-article" href="${item.url}" target="${item.target}">
+																	<span class="department-graphic-article-thumb" style="${articleThumbStyle}">
+																		<c:choose>
+																			<c:when test="${not empty item.thumbnail}"><img src="${item.thumbnail}" alt="${item.title}"></c:when>
+																			<c:otherwise><em>暂无缩略图</em></c:otherwise>
+																		</c:choose>
+																	</span>
+																	<div class="department-graphic-article-copy department-graphic-article-copy-with-thumb">
+																		<div class="department-graphic-article-head">
+																			<strong class="department-graphic-article-title">${item.title}</strong>
+																			<time class="department-graphic-article-time"><fmt:formatDate value="${item.release_time}" pattern="yyyy-MM-dd"/></time>
+																		</div>
+																		<p>${item.desc}</p>
+																	</div>
+																</a>
+															</li>
+														</c:forEach>
+													</ul>
+												</c:when>
+												<c:otherwise>
+													<ul class="department-graphic-article-list">
+														<c:forEach items="${articleList}" var="item">
+															<li>
+																<a class="department-graphic-article" href="${item.url}" target="${item.target}">
+																	<strong class="department-graphic-article-title">${item.title}</strong>
+																	<time class="department-graphic-article-time"><fmt:formatDate value="${item.release_time}" pattern="yyyy-MM-dd"/></time>
+																</a>
+															</li>
+														</c:forEach>
+													</ul>
+												</c:otherwise>
+											</c:choose>
 										</c:when>
 										</c:when>
 									<c:otherwise><div class="department-graphic-empty">暂无内容</div></c:otherwise>
 									<c:otherwise><div class="department-graphic-empty">暂无内容</div></c:otherwise>
 								</c:choose>
 								</c:choose>

+ 5 - 1
src/space/apps/moudules/website/template/ffkjcollegered1/WebSiteArticleService.java

@@ -54,7 +54,9 @@ public class WebSiteArticleService extends BaseTransaction {
 			setCatalogAttributes(gdba, website, nav);
 			setCatalogAttributes(gdba, website, nav);
 			return "toCatalog";
 			return "toCatalog";
 		}
 		}
-		return WebsiteCommonService.controller(gdba, website, 10, getRequest());
+		String forward = WebsiteCommonService.controller(gdba, website, 10, getRequest());
+		WebsiteCommonService.selectFfkjHeadNavigation(gdba, website, getRequest());
+		return forward;
 	}
 	}
 
 
 	public String details() throws Exception {
 	public String details() throws Exception {
@@ -62,6 +64,7 @@ public class WebSiteArticleService extends BaseTransaction {
 		Website website = getWebsite();
 		Website website = getWebsite();
 		setThemeAttributes(gdba, website);
 		setThemeAttributes(gdba, website);
 		String forward = WebsiteCommonService.details(gdba, website, getRequest());
 		String forward = WebsiteCommonService.details(gdba, website, getRequest());
+		WebsiteCommonService.selectFfkjHeadNavigation(gdba, website, getRequest());
 		setArticleExtras(gdba, website);
 		setArticleExtras(gdba, website);
 		return forward;
 		return forward;
 	}
 	}
@@ -87,6 +90,7 @@ public class WebSiteArticleService extends BaseTransaction {
 		GeneralDBAccess gdba = getGdbaInstance();
 		GeneralDBAccess gdba = getGdbaInstance();
 		Website website = getWebsite();
 		Website website = getWebsite();
 		String forward = WebsiteCommonService.search(gdba, website, getRequest(), 10);
 		String forward = WebsiteCommonService.search(gdba, website, getRequest(), 10);
+		WebsiteCommonService.selectFfkjHeadNavigation(gdba, website, getRequest());
 		setThemeAttributes(gdba, website);
 		setThemeAttributes(gdba, website);
 		return forward;
 		return forward;
 	}
 	}