Files
wordpress-theme-aksrt/assets/css/frontend/header-components/dark-theme.css
T
kate522 397231ca75 fix(hero): align header slider title/search stack with zibll
Put hero main title/subtitle in search before_html (document flow),
move the search overlay outside the swiper as a sibling, and reset
search/slide-text positioning to zibll tops so title and search no
longer overlap.
2026-07-17 23:00:33 +08:00

304 lines
7.8 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* Dark theme */
.theme-dark .header-components-search__form,
html.dark .header-components-search__form,
body.dark-theme .header-components-search__form {
background: rgba(30, 30, 30, 0.9);
}
.theme-dark .header-components-search__input,
html.dark .header-components-search__input,
body.dark-theme .header-components-search__input {
color: #eee;
}
/* ============================================================
* Layer 3: 图标卡片(模仿 zibll — 骑在 hero 底部边界线上)
*
* 关键技术:卡片在 DOM 中位于轮播之后,
* 使用 margin-top: -40px 向上拉,使其骑在 hero 底部边界线上
* ============================================================ */
.header-components-card {
position: relative;
z-index: 1;
margin-top: -40px;
}
.header-components-card__container {
max-width: var(--container, 1280px);
margin: 0 auto;
padding: 0 16px;
}
/* 卡片行:flex 水平排列 */
.header-components-card__row {
display: flex;
gap: 10px;
padding-top: 4px; /* 为 hover 上浮留出空间 */
}
/* 每个卡片项等宽 */
.header-components-card__item {
flex: 1;
min-width: 0;
}
/* 共享背景模式:一个大卡片包裹 */
.header-components-card__wrap--shared {
background: var(--surface-page);
border-radius: 8px;
padding: 10px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
border: 1px solid var(--color-line);
}
/* 独立背景模式:每个卡片有自己的背景 */
.header-components-card__item-bg {
background: var(--surface-page);
border-radius: 8px;
padding: 12px 14px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
border: 1px solid var(--color-line);
height: 100%;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.header-components-card__item-bg:hover {
transform: none;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
/* 毛玻璃效果 */
.filter-blur .header-components-card__wrap--shared,
.filter-blur .header-components-card__item-bg {
background: rgba(255, 255, 255, 0.75);
backdrop-filter: saturate(3) blur(20px);
-webkit-backdrop-filter: saturate(3) blur(20px);
border-color: rgba(255, 255, 255, 0.3);
}
.theme-dark .filter-blur .header-components-card__wrap--shared,
html.dark .filter-blur .header-components-card__wrap--shared,
body.dark-theme .filter-blur .header-components-card__wrap--shared,
.theme-dark .filter-blur .header-components-card__item-bg,
html.dark .filter-blur .header-components-card__item-bg,
body.dark-theme .filter-blur .header-components-card__item-bg {
background: rgba(30, 30, 30, 0.75);
border-color: rgba(255, 255, 255, 0.1);
}
/* ============================================================
* 单个图标卡片样式(模仿 zibll icon-cover-card)
* 结构:左侧圆形图标 + 右侧标题/描述
* ============================================================ */
.icon-cover-card {
display: flex;
align-items: center;
gap: 10px;
padding: 8px;
border-radius: 6px;
text-decoration: none;
color: var(--color-ink);
transition: background 0.15s ease;
}
a.icon-cover-card:hover {
background: var(--surface-3);
text-decoration: none;
color: var(--color-ink);
}
/* 图标容器 — 圆形 */
.icon-cover-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
min-width: 40px;
border-radius: 50%;
font-size: 18px;
flex-shrink: 0;
}
/* 方形图标 */
.icon-cover-icon.radius4 {
border-radius: 6px;
}
/* 图标颜色类(模仿 zibll 的调色板) */
.icon-cover-icon.c-blue {
background: rgba(66, 133, 244, 0.12);
color: #4285f4;
}
.icon-cover-icon.c-yellow {
background: rgba(251, 188, 4, 0.12);
color: #fbbc04;
}
.icon-cover-icon.c-green {
background: rgba(52, 168, 83, 0.12);
color: #34a853;
}
.icon-cover-icon.c-red {
background: rgba(234, 67, 53, 0.12);
color: #ea4335;
}
.icon-cover-icon.c-orange {
background: rgba(255, 152, 0, 0.12);
color: #ff9800;
}
.icon-cover-icon.c-cyan {
background: rgba(0, 188, 212, 0.12);
color: #00bcd4;
}
.icon-cover-icon.c-pink {
background: rgba(233, 30, 99, 0.12);
color: #e91e63;
}
/* 渐变图标背景 */
.icon-cover-icon.jb-cyan {
background: linear-gradient(135deg, #4facfe, #00f2fe);
color: #fff;
}
.icon-cover-icon.jb-green {
background: linear-gradient(135deg, #43e97b, #38f9d7);
color: #fff;
}
.icon-cover-icon.jb-orange {
background: linear-gradient(135deg, #fa709a, #fee140);
color: #fff;
}
/* 文字区 */
.icon-cover-desc {
flex: 1;
min-width: 0;
overflow: hidden;
}
.icon-cover-title {
font-size: 13px;
font-weight: 600;
line-height: 1.3;
color: var(--color-ink);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.icon-cover-subtitle {
font-size: 11px;
color: var(--color-ink-4);
margin-top: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.3;
}
/* ============================================================
* 响应式
* ============================================================ */
@media (max-width: 767px) {
.header-components-card {
margin-top: -35px;
}
.header-components-card__row {
flex-wrap: wrap;
gap: 6px;
}
/* 移动端 2 列 */
.header-components-card__item {
flex: 0 0 calc(50% - 3px);
}
.header-components-card__item-bg {
padding: 10px;
}
.header-components-card__wrap--shared {
padding: 6px;
}
.icon-cover-card {
gap: 6px;
padding: 6px;
}
.icon-cover-icon {
width: 32px;
height: 32px;
min-width: 32px;
font-size: 14px;
}
.icon-cover-title {
font-size: 12px;
}
.icon-cover-subtitle {
display: none;
}
}
@media (max-width: 480px) {
.icon-cover-card {
gap: 4px;
padding: 2px;
}
.icon-cover-icon {
width: 28px;
height: 28px;
min-width: 28px;
font-size: 12px;
}
}
/* ============================================================
* Container-level blur: PC/Mobile split (colors only; no top offsets)
* ============================================================ */
@media (min-width: 768px) {
.has-blur-pc .header-components-card__wrap--shared,
.has-blur-pc .header-components-card__item-bg {
background: rgba(255, 255, 255, 0.75);
backdrop-filter: saturate(3) blur(20px);
-webkit-backdrop-filter: saturate(3) blur(20px);
border-color: rgba(255, 255, 255, 0.3);
}
.has-blur-pc .header-components-search .line-form,
.has-blur-pc .header-slider-search .line-form {
background: rgba(255, 255, 255, 0.75);
}
.theme-dark .has-blur-pc .header-components-card__wrap--shared,
html.dark .has-blur-pc .header-components-card__wrap--shared,
.theme-dark .has-blur-pc .header-components-card__item-bg,
html.dark .has-blur-pc .header-components-card__item-bg {
background: rgba(30, 30, 30, 0.75);
border-color: rgba(255, 255, 255, 0.1);
}
}
@media (max-width: 767px) {
.has-blur-mobile .header-components-card__wrap--shared,
.has-blur-mobile .header-components-card__item-bg {
background: rgba(255, 255, 255, 0.75);
backdrop-filter: saturate(3) blur(20px);
-webkit-backdrop-filter: saturate(3) blur(20px);
border-color: rgba(255, 255, 255, 0.3);
}
.has-blur-mobile .header-components-search .line-form,
.has-blur-mobile .header-slider-search .line-form {
background: rgba(255, 255, 255, 0.75);
}
.theme-dark .has-blur-mobile .header-components-card__wrap--shared,
html.dark .has-blur-mobile .header-components-card__wrap--shared,
.theme-dark .has-blur-mobile .header-components-card__item-bg,
html.dark .has-blur-mobile .header-components-card__item-bg {
background: rgba(30, 30, 30, 0.75);
border-color: rgba(255, 255, 255, 0.1);
}
}