From a3bee60b615a6559fceeb14145f865b29b27d157 Mon Sep 17 00:00:00 2001 From: chenxing Date: Mon, 7 Sep 2026 20:22:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(B4):=20=E5=8F=8B=E9=93=BE=E9=A1=B5?= =?UTF-8?q?=E8=84=9A=20Logo=20=E6=B8=B2=E6=9F=93-5=E4=B8=BB=E9=A2=98=20img?= =?UTF-8?q?+=E5=90=8D=E7=A7=B0=E5=B9=B6=E6=8E=92,=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E6=9C=9F=E8=A1=A5=E5=9F=BA=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PortalLink 模型已有 logoUrl,渲染缺口在模板:5 套 footer 增 th:if logo 图(url.upload 补基准+alt 名称+lazy) - 5 套 main.css 增 .link-logo(高20px/contain/垂直居中/过宽截断) - PortalSsrIT+2 例(有 logo 渲染图/无 logo 纯文字无 link-logo);mvn -o test 260/260 全绿 --- .../themes/blue-white/assets/css/main.css | 12 +++++++ .../themes/blue-white/fragments/footer.html | 7 +++-- .../themes/classic-red/assets/css/main.css | 12 +++++++ .../themes/classic-red/fragments/footer.html | 7 +++-- .../themes/default/assets/css/main.css | 12 +++++++ .../themes/default/fragments/footer.html | 8 +++-- .../themes/scholar-blue/assets/css/main.css | 12 +++++++ .../themes/scholar-blue/fragments/footer.html | 7 +++-- .../themes/warm-kinder/assets/css/main.css | 12 +++++++ .../themes/warm-kinder/fragments/footer.html | 7 +++-- .../com/yunhai/cms/portal/PortalSsrIT.java | 31 +++++++++++++++++++ 11 files changed, 117 insertions(+), 10 deletions(-) diff --git a/src/main/resources/templates/themes/blue-white/assets/css/main.css b/src/main/resources/templates/themes/blue-white/assets/css/main.css index aeeb344..7ddd4bd 100644 --- a/src/main/resources/templates/themes/blue-white/assets/css/main.css +++ b/src/main/resources/templates/themes/blue-white/assets/css/main.css @@ -330,3 +330,15 @@ time, .item-meta { color: var(--text-light); font-size: 13px; } .home-main, .list-main, .detail-main { padding-top: 36px; padding-bottom: 56px; } .article-list .article-title, .block-head, .page-title { letter-spacing: .02em; } .article-list li, .banner, .banner-title { border-radius: 4px; } + +/* B4 友链 Logo:与名称并排小图(高度 ~20px,垂直居中;过宽截断不撑破页脚) */ +.links-group a .link-logo, +.sp-links-row a .link-logo { + height: 20px; + width: auto; + max-width: 64px; + object-fit: contain; + vertical-align: middle; + margin-right: 4px; + border-radius: 2px; +} diff --git a/src/main/resources/templates/themes/blue-white/fragments/footer.html b/src/main/resources/templates/themes/blue-white/fragments/footer.html index 5c8e713..1f3f83d 100644 --- a/src/main/resources/templates/themes/blue-white/fragments/footer.html +++ b/src/main/resources/templates/themes/blue-white/fragments/footer.html @@ -5,8 +5,11 @@ diff --git a/src/main/resources/templates/themes/scholar-blue/assets/css/main.css b/src/main/resources/templates/themes/scholar-blue/assets/css/main.css index 1912e88..5d4cadd 100644 --- a/src/main/resources/templates/themes/scholar-blue/assets/css/main.css +++ b/src/main/resources/templates/themes/scholar-blue/assets/css/main.css @@ -1293,3 +1293,15 @@ input, button, select, textarea { font-size: inherit; color: inherit; } transition-duration: .01ms !important; } } + +/* B4 友链 Logo:与名称并排小图(高度 ~20px,垂直居中;过宽截断不撑破页脚) */ +.links-group a .link-logo, +.sp-links-row a .link-logo { + height: 20px; + width: auto; + max-width: 64px; + object-fit: contain; + vertical-align: middle; + margin-right: 4px; + border-radius: 2px; +} diff --git a/src/main/resources/templates/themes/scholar-blue/fragments/footer.html b/src/main/resources/templates/themes/scholar-blue/fragments/footer.html index dd56587..4d48d2e 100644 --- a/src/main/resources/templates/themes/scholar-blue/fragments/footer.html +++ b/src/main/resources/templates/themes/scholar-blue/fragments/footer.html @@ -41,8 +41,11 @@ th:if="${!#lists.isEmpty(group.links)}"> 分组 diff --git a/src/main/resources/templates/themes/warm-kinder/assets/css/main.css b/src/main/resources/templates/themes/warm-kinder/assets/css/main.css index 30e0c91..1f5d782 100644 --- a/src/main/resources/templates/themes/warm-kinder/assets/css/main.css +++ b/src/main/resources/templates/themes/warm-kinder/assets/css/main.css @@ -330,3 +330,15 @@ time, .item-meta { color: var(--text-light); font-size: 13px; } .banner, .banner-title { border-radius: 20px; overflow: hidden; } .site-search input, .site-search button { border-radius: 999px; } .footer-info p { color: var(--primary-dark); } + +/* B4 友链 Logo:与名称并排小图(高度 ~20px,垂直居中;过宽截断不撑破页脚) */ +.links-group a .link-logo, +.sp-links-row a .link-logo { + height: 20px; + width: auto; + max-width: 64px; + object-fit: contain; + vertical-align: middle; + margin-right: 4px; + border-radius: 2px; +} diff --git a/src/main/resources/templates/themes/warm-kinder/fragments/footer.html b/src/main/resources/templates/themes/warm-kinder/fragments/footer.html index 8094359..bac2117 100644 --- a/src/main/resources/templates/themes/warm-kinder/fragments/footer.html +++ b/src/main/resources/templates/themes/warm-kinder/fragments/footer.html @@ -5,8 +5,11 @@