Browse Source

调整华夏新闻网顶部品牌展示

保持原标题取网站属性中的网站名称不变,在名称前增加网站属性徽标Logo;桌面和移动端均保持Logo在左、网站名称在右。

Validation:
- 本地Microsoft Edge桌面和手机宽度下Logo均成功加载
- Logo位于网站名称左侧且同一行
- 页面HTTP 200
非繁 2 months ago
parent
commit
8eb51de8dd

+ 12 - 0
WebRoot/main/ffkj-portal/news-red.css

@@ -782,3 +782,15 @@ body.screen-red-theme .screen-footer-philosophy span {
 .search input{min-width:0;width:100%}
 .search button,
 .mobile-nav-search button{flex:0 0 auto;width:auto;min-width:max-content;padding:0;white-space:nowrap;word-break:keep-all;overflow-wrap:normal;writing-mode:horizontal-tb;text-orientation:mixed;line-height:1;appearance:none;-webkit-appearance:none}
+
+
+/* 顶部品牌:网站属性徽标 + 网站名称 */
+.brand{display:inline-flex;align-items:center;max-width:calc(100% - 230px);gap:14px;color:#fff;text-decoration:none;white-space:nowrap}
+.brand-name{display:inline-block;min-width:0;white-space:nowrap}
+.brand-logo{display:block;flex:0 0 auto;width:auto;max-width:180px;height:1.18em;object-fit:contain}
+.brand-name{font-size:1em;font-weight:600;line-height:1.2}
+@media (max-width:900px){
+.brand{display:inline-flex;flex-wrap:nowrap;max-width:calc(100% - 52px);gap:8px;white-space:nowrap}
+.brand-logo{max-width:84px;height:1.15em}
+.brand-name{max-width:calc(100% - 92px);overflow:hidden;text-overflow:ellipsis;font-size:18px}
+}

+ 1 - 1
WebRoot/web/upload/ffkj-template/news-red-catalog.jsp

@@ -10,7 +10,7 @@
 	<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/news-red.css?v=20260922-red-dot">
+	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260922-brand-logo-name">
 </head>
 <body class="screen-red-theme screen-list-page">
 	<%@ include file="news-red-header.jsp"%>

+ 1 - 1
WebRoot/web/upload/ffkj-template/news-red-details.jsp

@@ -7,7 +7,7 @@
 	<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/news-red.css?v=20260922-red-dot">
+	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260922-brand-logo-name">
 </head>
 <body class="screen-red-theme">
 	<%@ include file="news-red-header.jsp"%>

+ 4 - 1
WebRoot/web/upload/ffkj-template/news-red-header.jsp

@@ -14,7 +14,10 @@
 				<c:otherwise><a href="/">学校首页</a><b>|</b><a href="/">新闻首页</a></c:otherwise>
 			</c:choose>
 		</div>
-		<a class="brand" href="/">${website.name}</a>
+		<a class="brand" href="/" aria-label="${website.name}首页">
+			<c:if test="${not empty website.logo}"><img class="brand-logo" src="${website.logo}" alt="${website.name}"></c:if>
+			<span class="brand-name">${website.name}</span>
+		</a>
 		<form class="search" action="/search" method="get"><input name="str" value="${str}" placeholder="站内" aria-label="站内搜索"><button type="submit">搜索</button></form>
 	</div>
 </header>

+ 1 - 1
WebRoot/web/upload/ffkj-template/news-red-index.jsp

@@ -12,7 +12,7 @@
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<title>${website.seoTitle}</title>
 	<meta name="description" content="${website.seoDescription}">
-	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260922-red-dot">
+	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260922-brand-logo-name">
 </head>
 <body class="screen-red-theme">
 	<%@ include file="news-red-header.jsp"%>

+ 1 - 1
WebRoot/web/upload/ffkj-template/news-red-list.jsp

@@ -13,7 +13,7 @@
 	<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/news-red.css?v=20260922-red-dot">
+	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260922-brand-logo-name">
 </head>
 <body class="screen-red-theme screen-list-page">
 	<%@ include file="news-red-header.jsp"%>

+ 1 - 1
WebRoot/web/upload/ffkj-template/news-red-search.jsp

@@ -8,7 +8,7 @@
 	<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/news-red.css?v=20260922-red-dot">
+	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260922-brand-logo-name">
 </head>
 <body class="screen-red-theme">
 	<%@ include file="news-red-header.jsp"%>