400 lines
9.3 KiB
CSS
400 lines
9.3 KiB
CSS
:root {
|
||
font-family:
|
||
'Hiragino Sans GB',
|
||
'PingFang SC',
|
||
'Noto Sans SC',
|
||
sans-serif;
|
||
color: #000000;
|
||
background: #ffffff;
|
||
--dashboard-width: 1072px;
|
||
--dashboard-height: 1448px;
|
||
--dashboard-aspect: 1072 / 1448;
|
||
--ink: #000000;
|
||
--muted-ink: #4c4c4c;
|
||
--paper: #ffffff;
|
||
--panel-background: #ffffff;
|
||
--page-background: #ffffff;
|
||
--frame-stroke: #8b6b47;
|
||
--frame-stroke-strong: #6f5235;
|
||
--frame-muted: rgba(139, 107, 71, 0.35);
|
||
--badge-fill: #faf6ef;
|
||
--display-font: 'Iowan Old Style', 'Baskerville', serif;
|
||
--title-font: 'Hiragino Sans GB', 'PingFang SC', 'Noto Sans SC', sans-serif;
|
||
--card-radius: 2rem;
|
||
--panel-radius: 1.25rem;
|
||
font-synthesis: none;
|
||
text-rendering: optimizeLegibility;
|
||
-webkit-font-smoothing: antialiased;
|
||
-moz-osx-font-smoothing: grayscale;
|
||
}
|
||
|
||
* {
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
html,
|
||
body,
|
||
#app {
|
||
margin: 0;
|
||
width: 100%;
|
||
min-height: 100%;
|
||
background: #ffffff;
|
||
}
|
||
|
||
body {
|
||
min-height: 100vh;
|
||
font-family: var(--body-font, 'Hiragino Sans GB', 'PingFang SC', 'Noto Sans SC', sans-serif);
|
||
}
|
||
|
||
img {
|
||
display: block;
|
||
}
|
||
|
||
.page-shell {
|
||
min-height: 100vh;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 1.1rem;
|
||
background: var(--page-background);
|
||
}
|
||
|
||
.page-shell--clock-face {
|
||
background: var(--page-background);
|
||
}
|
||
|
||
.page-shell--background {
|
||
padding: 0;
|
||
width: var(--dashboard-width);
|
||
height: var(--dashboard-height);
|
||
min-height: 0;
|
||
align-items: stretch;
|
||
justify-content: flex-start;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.page-stack {
|
||
display: grid;
|
||
gap: 0.9rem;
|
||
justify-items: center;
|
||
width: 100%;
|
||
}
|
||
|
||
.page-shell--background .page-stack {
|
||
gap: 0;
|
||
width: var(--dashboard-width);
|
||
height: var(--dashboard-height);
|
||
justify-items: stretch;
|
||
}
|
||
|
||
.preview-toolbar {
|
||
display: inline-flex;
|
||
flex-wrap: wrap;
|
||
justify-content: center;
|
||
gap: 0.75rem;
|
||
padding: 0.65rem 0.8rem;
|
||
border: 1.5px solid var(--frame-stroke);
|
||
border-radius: 999px;
|
||
background: var(--paper);
|
||
}
|
||
|
||
.preview-toolbar__field {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 0.45rem;
|
||
}
|
||
|
||
.preview-toolbar__label {
|
||
font-family: var(--title-font);
|
||
font-size: calc(0.88rem * var(--theme-font-scale, 1));
|
||
color: var(--muted-ink);
|
||
}
|
||
|
||
.preview-toolbar__select {
|
||
min-width: 9.2rem;
|
||
padding: 0.36rem 0.7rem;
|
||
border: 1.5px solid var(--frame-stroke);
|
||
border-radius: 999px;
|
||
background: var(--paper);
|
||
color: var(--ink);
|
||
font: inherit;
|
||
font-size: calc(1rem * var(--theme-font-scale, 1));
|
||
}
|
||
|
||
.dashboard-frame {
|
||
width: min(100vw, var(--dashboard-width));
|
||
aspect-ratio: var(--dashboard-aspect);
|
||
background: var(--paper);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.page-shell--background .dashboard-frame {
|
||
width: var(--dashboard-width);
|
||
height: var(--dashboard-height);
|
||
aspect-ratio: auto;
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.dashboard-grid {
|
||
display: grid;
|
||
gap: 1.15rem;
|
||
height: 100%;
|
||
padding: 1.3rem;
|
||
align-content: start;
|
||
align-items: stretch;
|
||
}
|
||
|
||
.dashboard-grid--portrait {
|
||
grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
|
||
grid-template-rows: minmax(0, 1fr) 168px;
|
||
}
|
||
|
||
.dashboard-grid--portrait .dashboard-grid__quote {
|
||
grid-column: 1 / -1;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait {
|
||
/* default 纵版给底部额外留出 32px,避免鸡汤卡片继续贴底溢出。 */
|
||
gap: 1rem;
|
||
padding: 1.3rem 1.3rem 32px;
|
||
grid-template-rows: minmax(0, 1fr) 232px;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .calendar-card {
|
||
/* 顶部日历区整体压紧一点,把高度让给底部鸡汤。 */
|
||
gap: 32px;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .calendar-card__hero {
|
||
grid-template-columns: minmax(0, 1fr) 272px;
|
||
gap: 0;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .calendar-card__day {
|
||
font-size: calc(5.9rem * var(--theme-font-scale, 1));
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .calendar-card__lunar-day,
|
||
.page-shell--default .dashboard-grid--portrait .calendar-card__weekday {
|
||
font-size: calc(1.64rem * var(--theme-font-scale, 1));
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .calendar-card__clock-wrap {
|
||
width: 272px;
|
||
height: 272px;
|
||
align-self: center;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .calendar-card__clock-wrap :is(.analog-clock) {
|
||
transform: scale(1.2363636364);
|
||
transform-origin: top left;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .weather-card {
|
||
/* 纵版天气卡压缩预报和指标区,给底部鸡汤腾空间。 */
|
||
grid-template-rows: auto minmax(0, 1.08fr) minmax(0, 0.72fr) minmax(0, 0.82fr);
|
||
gap: 0.54rem;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .weather-card__hero {
|
||
gap: 0.62rem;
|
||
padding: 0.7rem 0.78rem;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .weather-card__forecast {
|
||
gap: 0.28rem;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .forecast-pill {
|
||
padding: 0.26rem 0.1rem;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .forecast-pill__label {
|
||
font-size: calc(0.82rem * var(--theme-font-scale, 1) * var(--forecast-pill-scale, 1));
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .forecast-pill__temp {
|
||
font-size: calc(1rem * var(--theme-font-scale, 1) * var(--forecast-pill-scale, 1));
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .weather-card__fact-icon,
|
||
.page-shell--default .dashboard-grid--portrait .metric-pill__icon {
|
||
width: 2rem;
|
||
height: 2rem;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--portrait .quote-card__icon {
|
||
width: 1.8rem;
|
||
height: 1.8rem;
|
||
}
|
||
|
||
.page-shell--default .weather-card__hero-main .glyph--large {
|
||
width: 5.6rem;
|
||
height: 5.6rem;
|
||
}
|
||
|
||
.dashboard-grid--landscape {
|
||
grid-template-columns: minmax(0, 1.24fr) minmax(21rem, 0.76fr);
|
||
grid-template-rows: minmax(0, 1fr) 216px;
|
||
}
|
||
|
||
.dashboard-grid--landscape .dashboard-grid__calendar {
|
||
grid-column: 1;
|
||
grid-row: 1 / span 2;
|
||
}
|
||
|
||
.dashboard-grid--landscape .dashboard-grid__weather {
|
||
grid-column: 2;
|
||
grid-row: 1;
|
||
}
|
||
|
||
.dashboard-grid--landscape .dashboard-grid__quote {
|
||
grid-column: 2;
|
||
grid-row: 2;
|
||
}
|
||
|
||
.card {
|
||
min-height: 0;
|
||
border-radius: var(--card-radius);
|
||
background: var(--paper);
|
||
border: 2px solid var(--frame-stroke);
|
||
box-shadow: none;
|
||
}
|
||
|
||
.clock-face-stage {
|
||
display: grid;
|
||
place-items: center;
|
||
width: min(100%, 320px);
|
||
aspect-ratio: 1;
|
||
}
|
||
|
||
.dashboard-grid--landscape .calendar-card {
|
||
gap: 0.82rem;
|
||
}
|
||
|
||
.dashboard-grid--landscape .calendar-card__day {
|
||
font-size: calc(6.2rem * var(--theme-font-scale, 1));
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--landscape .calendar-card {
|
||
/* default 横版顶部整体下压,避开 Kindle 右上角状态栏遮罩。 */
|
||
gap: 32px;
|
||
padding-top: 0;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--landscape .calendar-card__hero {
|
||
grid-template-columns: minmax(0, 1fr) 320px;
|
||
align-items: end;
|
||
gap: 40px;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--landscape .calendar-card__headline {
|
||
padding-left: 48px;
|
||
gap: 0.5rem;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--landscape .calendar-card__day {
|
||
font-size: calc(9rem * var(--theme-font-scale, 1));
|
||
line-height: 0.78;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--landscape .calendar-card__lunar-day,
|
||
.page-shell--default .dashboard-grid--landscape .calendar-card__weekday {
|
||
font-size: calc(2.75rem * var(--theme-font-scale, 1));
|
||
line-height: 1;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--landscape .calendar-card__clock-wrap {
|
||
width: 320px;
|
||
height: 320px;
|
||
align-self: center;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--landscape .calendar-card__clock-wrap :is(.analog-clock) {
|
||
transform: scale(1.4545454545);
|
||
transform-origin: top left;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--landscape .weather-card__fact-icon,
|
||
.page-shell--default .dashboard-grid--landscape .metric-pill__icon {
|
||
width: 2rem;
|
||
height: 2rem;
|
||
}
|
||
|
||
.page-shell--default .dashboard-grid--landscape .quote-card__icon {
|
||
width: 1.8rem;
|
||
height: 1.8rem;
|
||
}
|
||
|
||
.dashboard-grid--landscape .weather-card {
|
||
grid-template-rows: auto minmax(0, 1fr) minmax(0, 0.86fr) minmax(0, 0.9fr);
|
||
gap: 0.58rem;
|
||
}
|
||
|
||
.dashboard-grid--landscape .weather-card__title {
|
||
font-size: calc(1.92rem * var(--theme-font-scale, 1));
|
||
}
|
||
|
||
.dashboard-grid--landscape .weather-card__subtitle {
|
||
font-size: calc(1rem * var(--theme-font-scale, 1));
|
||
}
|
||
|
||
.dashboard-grid--landscape .weather-card__temperature {
|
||
font-size: calc(2.4rem * var(--theme-font-scale, 1));
|
||
}
|
||
|
||
.dashboard-grid--landscape .weather-card__condition {
|
||
font-size: calc(1.2rem * var(--theme-font-scale, 1));
|
||
}
|
||
|
||
.dashboard-grid--landscape .weather-card__forecast {
|
||
gap: 0.36rem;
|
||
}
|
||
|
||
.dashboard-grid--landscape .forecast-pill {
|
||
padding: 0.32rem 0.12rem;
|
||
}
|
||
|
||
.dashboard-grid--landscape .forecast-pill__label {
|
||
font-size: calc(0.92rem * var(--theme-font-scale, 1) * var(--forecast-pill-scale, 1));
|
||
}
|
||
|
||
.dashboard-grid--landscape .forecast-pill__temp {
|
||
font-size: calc(1.1rem * var(--theme-font-scale, 1) * var(--forecast-pill-scale, 1));
|
||
}
|
||
|
||
.dashboard-grid--landscape .quote-card {
|
||
gap: 0.5rem;
|
||
padding: 0.92rem 1rem;
|
||
}
|
||
|
||
@media (max-width: 1100px) {
|
||
.page-shell {
|
||
padding: 0.75rem;
|
||
}
|
||
}
|
||
|
||
@media (max-width: 860px) {
|
||
.dashboard-frame {
|
||
aspect-ratio: auto;
|
||
}
|
||
|
||
.dashboard-grid {
|
||
grid-template-columns: 1fr;
|
||
grid-template-rows: none;
|
||
padding: 0.9rem;
|
||
}
|
||
|
||
.dashboard-grid--portrait .dashboard-grid__quote,
|
||
.dashboard-grid--landscape .dashboard-grid__calendar,
|
||
.dashboard-grid--landscape .dashboard-grid__weather,
|
||
.dashboard-grid--landscape .dashboard-grid__quote {
|
||
grid-column: auto;
|
||
grid-row: auto;
|
||
}
|
||
|
||
.page-shell {
|
||
align-items: stretch;
|
||
}
|
||
}
|