yandex修改,页面样式调整
This commit is contained in:
@@ -19,7 +19,7 @@ func TestNavigationPageUsesDedicatedVerificationAndAnalytics(t *testing.T) {
|
||||
t.Fatalf("navigation SEO output does not contain %q", want)
|
||||
}
|
||||
}
|
||||
for _, unwanted := range []string{"112387687", "G-TZQS2NZ3TN", "6bb06ed5659790d0"} {
|
||||
for _, unwanted := range []string{"112967594", "G-B5KGM8S5J1", "6bb06ed5659790d0"} {
|
||||
if strings.Contains(navHTML, unwanted) {
|
||||
t.Fatalf("navigation SEO output unexpectedly contains main-site id %q", unwanted)
|
||||
}
|
||||
@@ -31,8 +31,8 @@ func TestMainSiteKeepsMainVerificationAndAnalytics(t *testing.T) {
|
||||
for _, want := range []string{
|
||||
"r7geXn5kBugzOSLZzyw4v3NBDMQwAmzFCVkqp92odh0",
|
||||
"6bb06ed5659790d0",
|
||||
"112387687",
|
||||
"G-TZQS2NZ3TN",
|
||||
"112967594",
|
||||
"G-B5KGM8S5J1",
|
||||
} {
|
||||
if !strings.Contains(mainHTML, want) {
|
||||
t.Fatalf("main-site SEO output does not contain %q", want)
|
||||
|
||||
+177
-25
@@ -29,18 +29,10 @@ a.footer-social-home-item {
|
||||
gap: min(12px, 0.625vw);
|
||||
}
|
||||
|
||||
body.home-page .footer-main {
|
||||
gap: min(32px, 1.666667vw);
|
||||
}
|
||||
|
||||
body.home-page .footer-product {
|
||||
gap: min(18px, 0.9375vw);
|
||||
}
|
||||
|
||||
body.home-page .footer-brand {
|
||||
gap: min(18px, 0.9375vw);
|
||||
}
|
||||
|
||||
body.home-page .footer-logo {
|
||||
width: min(178px, 9.270833vw);
|
||||
height: min(49px, 2.552083vw);
|
||||
@@ -52,28 +44,12 @@ a.footer-social-home-item {
|
||||
line-height: clamp(20px, 1.25vw, 24px);
|
||||
}
|
||||
|
||||
body.home-page .footer-contact {
|
||||
gap: min(4px, 0.208333vw);
|
||||
}
|
||||
|
||||
body.home-page .footer-contact-line,
|
||||
body.home-page .footer-links {
|
||||
font-size: clamp(12px, 0.833333vw, 16px);
|
||||
font-size: clamp(13px, 0.833333vw, 16px);
|
||||
line-height: clamp(18px, 1.145833vw, 22px);
|
||||
}
|
||||
|
||||
body.home-page .footer-links {
|
||||
gap: min(15px, 0.78125vw);
|
||||
}
|
||||
|
||||
body.home-page .footer-links a + a {
|
||||
padding-left: min(16px, 0.833333vw);
|
||||
}
|
||||
|
||||
body.home-page .footer-links a + a::before {
|
||||
height: min(18px, 0.9375vw);
|
||||
}
|
||||
|
||||
body.home-page .footer-bottom {
|
||||
min-height: min(38px, 1.979167vw);
|
||||
gap: min(24px, 1.25vw);
|
||||
@@ -968,3 +944,179 @@ body.site-shell.list-page-body {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== 页脚改版:品牌 / 访问地址 / 帮助与支持 三栏 ===== */
|
||||
.footer-col-title {
|
||||
color: #FFFFFF;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.footer-contact-label {
|
||||
flex: 0 0 auto;
|
||||
min-width: 6.5em;
|
||||
color: rgba(255, 255, 255, 0.45);
|
||||
}
|
||||
|
||||
.footer-contact-url {
|
||||
min-width: 0;
|
||||
color: #EC237F;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
a.footer-contact-line:hover .footer-contact-url,
|
||||
a.footer-contact-line:focus-visible .footer-contact-url {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.footer-main {
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
||||
align-items: start;
|
||||
column-gap: 48px;
|
||||
row-gap: 28px;
|
||||
}
|
||||
|
||||
.footer-brand {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 1;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 14px;
|
||||
max-width: 640px;
|
||||
}
|
||||
|
||||
.footer-logo {
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.footer-brand .footer-muted-text {
|
||||
color: rgba(255, 255, 255, 0.55);
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.footer-contact {
|
||||
grid-column: 1;
|
||||
grid-row: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.footer-contact-line {
|
||||
flex-direction: row;
|
||||
align-items: baseline;
|
||||
gap: 12px;
|
||||
max-width: 100%;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.footer-nav-col {
|
||||
grid-column: 2;
|
||||
grid-row: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, max-content);
|
||||
column-gap: 40px;
|
||||
row-gap: 10px;
|
||||
justify-self: start;
|
||||
color: rgba(255, 255, 255, 0.75);
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.footer-links a + a {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.footer-links a + a::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.footer-divider {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.footer-main {
|
||||
grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
|
||||
column-gap: 64px;
|
||||
}
|
||||
|
||||
.footer-brand {
|
||||
grid-column: 1;
|
||||
grid-row: 1;
|
||||
max-width: 560px;
|
||||
}
|
||||
|
||||
.footer-contact {
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
}
|
||||
|
||||
.footer-nav-col {
|
||||
grid-column: 3;
|
||||
grid-row: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.footer-col-title {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.footer-nav-col {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 链接换行时行首不再挂分隔线:改成 3 列网格 */
|
||||
.footer-links {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
row-gap: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-links a + a {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.footer-links a + a::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.site-shell .home-mobile-footer-links {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
row-gap: 10px;
|
||||
column-gap: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.site-shell .home-mobile-footer-links a {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.site-shell .home-mobile-footer-links a::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* 页脚进入视口时,悬浮按钮随之上移,不压住页脚(--footer-lift 由 footer.js 维护) */
|
||||
.download-fab,
|
||||
.floating-action {
|
||||
translate: 0 calc(var(--footer-lift, 0px) * -1);
|
||||
}
|
||||
|
||||
@@ -422,6 +422,15 @@
|
||||
line-height: 23px;
|
||||
}
|
||||
|
||||
body.home-page .card-grid .poster-card-tags {
|
||||
height: 29px;
|
||||
}
|
||||
|
||||
body.home-page .poster-card-episode {
|
||||
font-size: 16px;
|
||||
line-height: 23px;
|
||||
}
|
||||
|
||||
body.home-page .poster-card-tag,
|
||||
body.home-page .ranking-card-tag {
|
||||
padding: 2px 9px;
|
||||
@@ -911,6 +920,21 @@
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
/* 集数占了标签行右侧:放不下的标签整颗换行并被隐藏,而不是每颗都截成省略号 */
|
||||
.home-page .card-grid .poster-card-tags {
|
||||
flex-wrap: wrap;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.home-page .poster-card-episode {
|
||||
flex-shrink: 0;
|
||||
margin-left: 8px;
|
||||
color: rgba(255, 255, 255, 0.55);
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.home-page .poster-card-tag,
|
||||
.home-page .ranking-card-tag {
|
||||
width: max-content;
|
||||
@@ -1287,6 +1311,15 @@
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.home-page .card-grid .poster-card-tags {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.home-page .poster-card-episode {
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.home-page .episode-badge,
|
||||
.home-page .ranking-episode-badge {
|
||||
right: 8px;
|
||||
|
||||
@@ -5,4 +5,41 @@
|
||||
window.scrollTo({ top: 0, behavior: "smooth" });
|
||||
});
|
||||
});
|
||||
|
||||
// 页脚进入视口后,把悬浮按钮(下载 App / 回到顶部)顶到页脚上方,避免遮住页脚内容。
|
||||
var footers = document.querySelectorAll(".footer-box, .home-mobile-footer");
|
||||
if (!footers.length) return;
|
||||
var root = document.documentElement;
|
||||
var ticking = false;
|
||||
var lastLift = -1;
|
||||
|
||||
function visibleFooter() {
|
||||
for (var i = 0; i < footers.length; i++) {
|
||||
if (footers[i].offsetHeight > 0) return footers[i];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function update() {
|
||||
ticking = false;
|
||||
var footer = visibleFooter();
|
||||
var lift = 0;
|
||||
if (footer) {
|
||||
var top = footer.getBoundingClientRect().top;
|
||||
lift = Math.max(0, Math.round((window.innerHeight || 0) - top));
|
||||
}
|
||||
if (lift === lastLift) return;
|
||||
lastLift = lift;
|
||||
root.style.setProperty("--footer-lift", lift + "px");
|
||||
}
|
||||
|
||||
function schedule() {
|
||||
if (ticking) return;
|
||||
ticking = true;
|
||||
window.requestAnimationFrame(update);
|
||||
}
|
||||
|
||||
window.addEventListener("scroll", schedule, { passive: true });
|
||||
window.addEventListener("resize", schedule);
|
||||
schedule();
|
||||
})();
|
||||
|
||||
@@ -6,18 +6,18 @@
|
||||
m[i].l=1*new Date();
|
||||
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
|
||||
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
|
||||
})(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id={{if .isNavPage}}112390883{{else}}112387687{{end}}', 'ym');
|
||||
})(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id={{if .isNavPage}}112390883{{else}}112967594{{end}}', 'ym');
|
||||
|
||||
ym({{if .isNavPage}}112390883{{else}}112387687{{end}}, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", referrer: document.referrer, url: location.href, accurateTrackBounce:true, trackLinks:true});
|
||||
ym({{if .isNavPage}}112390883{{else}}112967594{{end}}, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", referrer: document.referrer, url: location.href, accurateTrackBounce:true, trackLinks:true});
|
||||
</script>
|
||||
<!-- /Yandex.Metrika counter -->
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{if .isNavPage}}G-SY26Y2MSHS{{else}}G-TZQS2NZ3TN{{end}}"></script>
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{if .isNavPage}}G-SY26Y2MSHS{{else}}G-B5KGM8S5J1{{end}}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{if .isNavPage}}G-SY26Y2MSHS{{else}}G-TZQS2NZ3TN{{end}}');
|
||||
gtag('config', '{{if .isNavPage}}G-SY26Y2MSHS{{else}}G-B5KGM8S5J1{{end}}');
|
||||
</script>
|
||||
{{end}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{define "footer"}}
|
||||
<link rel="stylesheet" href="/static/css/footer.css?v=12" />
|
||||
<link rel="stylesheet" href="/static/css/footer.css?v=14" />
|
||||
<footer class="home-mobile-footer">
|
||||
<img class="home-mobile-footer-logo" src="/static/images/logo.png?v=3" width="127" height="40" alt="黄果短剧" title="黄果短剧" />
|
||||
<div class="home-mobile-footer-legal">
|
||||
@@ -54,14 +54,15 @@
|
||||
{{end}}
|
||||
{{if or .appConfig.NewURLAddr .appConfig.NewURLAddr1 .appConfig.ForeverURLAddr}}
|
||||
<div class="footer-contact" aria-label="访问地址">
|
||||
<div class="footer-col-title">访问地址</div>
|
||||
{{if .appConfig.NewURLAddr}}
|
||||
<a class="footer-contact-line" href="{{.appConfig.NewURLAddr}}" target="_blank" rel="sponsored nofollow noopener noreferrer">最新地址:{{.appConfig.NewURLAddr}}</a>
|
||||
<a class="footer-contact-line" href="{{.appConfig.NewURLAddr}}" target="_blank" rel="sponsored nofollow noopener noreferrer"><span class="footer-contact-label">最新地址</span><span class="footer-contact-url">{{.appConfig.NewURLAddr}}</span></a>
|
||||
{{end}}
|
||||
{{if .appConfig.NewURLAddr1}}
|
||||
<a class="footer-contact-line" href="{{.appConfig.NewURLAddr1}}" target="_blank" rel="sponsored nofollow noopener noreferrer">备用地址:{{.appConfig.NewURLAddr1}}</a>
|
||||
<a class="footer-contact-line" href="{{.appConfig.NewURLAddr1}}" target="_blank" rel="sponsored nofollow noopener noreferrer"><span class="footer-contact-label">备用地址</span><span class="footer-contact-url">{{.appConfig.NewURLAddr1}}</span></a>
|
||||
{{end}}
|
||||
{{if .appConfig.ForeverURLAddr}}
|
||||
<a class="footer-contact-line" href="{{.appConfig.ForeverURLAddr}}" target="_blank" rel="sponsored nofollow noopener noreferrer">海外永久地址:{{.appConfig.ForeverURLAddr}}</a>
|
||||
<a class="footer-contact-line" href="{{.appConfig.ForeverURLAddr}}" target="_blank" rel="sponsored nofollow noopener noreferrer"><span class="footer-contact-label">海外永久地址</span><span class="footer-contact-url">{{.appConfig.ForeverURLAddr}}</span></a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -69,8 +70,11 @@
|
||||
{{if .footer.NavList}}
|
||||
{{with index .footer.NavList 0}}
|
||||
{{if .TranslationList}}
|
||||
<div class="footer-links footer-muted-text">
|
||||
{{template "footerNavItems" .TranslationList}}
|
||||
<div class="footer-nav-col">
|
||||
<div class="footer-col-title">帮助与支持</div>
|
||||
<nav class="footer-links footer-muted-text" aria-label="页脚导航">
|
||||
{{template "footerNavItems" .TranslationList}}
|
||||
</nav>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -144,11 +148,11 @@
|
||||
</a>
|
||||
</nav>
|
||||
<noscript>
|
||||
<div><img src="https://mc.yandex.ru/watch/112387687" style="position:absolute; left:-9999px;" alt="" /></div>
|
||||
<div><img src="https://mc.yandex.ru/watch/112967594" style="position:absolute; left:-9999px;" alt="" /></div>
|
||||
</noscript>
|
||||
{{template "scrollToTop" .}}
|
||||
{{template "downloadAppFloat" .}}
|
||||
<script defer src="/static/js/pages/footer.js?v=1"></script>
|
||||
<script defer src="/static/js/pages/footer.js?v=2"></script>
|
||||
{{template "pageConsole" .}}
|
||||
{{end}}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{{if .jsonLD}}
|
||||
<script type="application/ld+json">{{.jsonLD}}</script>
|
||||
{{end}}
|
||||
<link rel="stylesheet" href="/static/css/index.css?v=36">
|
||||
<link rel="stylesheet" href="/static/css/index.css?v=38">
|
||||
{{/* PC 需要 Swiper 样式;H5 延后按需注入,避免首屏下载与强制重排 */}}
|
||||
<link rel="stylesheet" href="/static/common/swiper-bundle.min.css" media="(min-width: 768px)">
|
||||
<link rel="preload" href="/static/common/swiper-bundle.min.js" as="script" media="(min-width: 768px)">
|
||||
@@ -156,9 +156,6 @@
|
||||
<img src="/static/images/placeholder.png?v=2" class="poster-cover-img lazy" data-src="{{coverURL .Cover .Banner}}" width="160" height="214" decoding="async" alt="{{.Title}}" title="{{.Title}}" />
|
||||
{{template "posterCornerBadges" .}}
|
||||
{{template "posterLikeBadge" .}}
|
||||
{{with episodeLabel .TotalEpisode}}
|
||||
<div class="episode-badge"><div class="text-white-xs">{{.}}</div></div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="poster-card-body">
|
||||
<div class="poster-card-title">{{.Title}}</div>
|
||||
@@ -166,6 +163,7 @@
|
||||
<div class="poster-card-meta">
|
||||
{{template "posterCardTag" .}}
|
||||
<div class="flex-spacer"></div>
|
||||
{{with episodeLabel .TotalEpisode}}<div class="poster-card-episode">{{.}}</div>{{end}}
|
||||
<div class="poster-card-heat">{{formatHeat .HeatValue}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user