yandex修改,页面样式调整

This commit is contained in:
谢宇宁
2026-09-23 22:28:00 +07:00
parent 1c5df7abbb
commit e14b3863fb
7 changed files with 268 additions and 44 deletions
+177 -25
View File
@@ -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);
}
+33
View File
@@ -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;
+37
View File
@@ -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();
})();