style: 自动学习卡片重排版,状态和开始按钮放到卡片顶部,课程列表加表头

This commit is contained in:
2026-11-17 17:54:20 +08:00
parent 4d1a90c321
commit 38aa97febb
2 changed files with 276 additions and 141 deletions
+164 -53
View File
@@ -491,21 +491,6 @@ select {
color: var(--muted);
}
.panel-card-head h3 {
margin: 0;
font-size: 13px;
font-weight: 650;
color: var(--muted);
}
.panel-card-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 4px;
}
.compact-nform {
display: flex;
flex-direction: column;
@@ -651,12 +636,16 @@ select {
.start-control .day-select,
.start-control .start-time {
flex: 1 1 8.5rem;
flex: 1 1 7rem;
width: auto;
min-width: 0;
max-width: 100%;
}
.start-control .n-switch {
flex: none;
}
.start-control .start-time .n-input {
width: 100%;
}
@@ -670,6 +659,34 @@ select {
flex-wrap: wrap;
}
.pace-fields {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px 8px;
min-width: 0;
}
.pace-field {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 13px;
color: var(--muted);
}
.pace-field .n-input-number {
width: 52px;
}
.study-config-hint {
margin: 6px 0 0 132px;
max-width: 22rem;
font-size: 12px;
line-height: 1.5;
color: var(--muted);
}
.study-start-wrap {
display: inline-flex;
}
@@ -679,7 +696,7 @@ select {
flex-wrap: wrap;
align-items: center;
gap: 8px;
margin-top: 12px;
margin-top: 16px;
}
.day-warn {
@@ -688,15 +705,34 @@ select {
}
.target-unit {
flex: none;
color: var(--muted);
font-size: 13px;
white-space: nowrap;
}
.study-live-status {
.study-head {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
min-height: 32px;
gap: 8px 16px;
min-height: 28px;
}
.study-head h3 {
margin: 0;
font-size: 13px;
font-weight: 650;
color: var(--muted);
}
.study-state {
flex: 1 1 12rem;
min-width: 0;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 4px 8px;
}
.study-indicator {
@@ -730,6 +766,7 @@ select {
min-height: 0;
display: flex;
flex-direction: column;
gap: 12px;
}
.study-card.is-busy {
@@ -742,7 +779,8 @@ select {
grid-template-columns: minmax(0, 30rem) minmax(0, 1fr);
gap: 16px 32px;
align-items: start;
padding-top: 12px;
padding-top: 16px;
border-top: 1px solid var(--line);
}
.study-card.is-busy .study-card-body {
@@ -765,7 +803,7 @@ select {
min-width: 0;
display: flex;
flex-direction: column;
gap: 12px;
gap: 20px;
padding-left: 24px;
border-left: 1px solid var(--line);
}
@@ -778,7 +816,6 @@ select {
display: flex;
flex-direction: column;
gap: 8px;
max-width: 28rem;
}
.study-progress-meta {
@@ -802,6 +839,40 @@ select {
color: var(--muted);
}
.study-courses {
--course-cols: minmax(7rem, 1.4fr) minmax(4rem, 1fr) 56px 88px 56px 8px;
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
gap: 10px;
}
.study-courses.no-countdown {
--course-cols: minmax(7rem, 1.4fr) minmax(4rem, 1fr) 56px 88px 8px;
}
.study-course-head,
.study-worker {
display: grid;
grid-template-columns: var(--course-cols);
align-items: center;
column-gap: 12px;
min-width: 0;
}
.study-course-head {
padding-bottom: 8px;
border-bottom: 1px solid var(--line);
font-size: 12px;
color: var(--muted);
white-space: nowrap;
}
.study-course-head .num {
text-align: right;
}
.study-workers {
list-style: none;
margin: 0;
@@ -814,15 +885,7 @@ select {
gap: 10px;
}
.study-worker {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.study-worker-title {
flex: 1 1 9rem;
min-width: 0;
font-size: 13px;
overflow: hidden;
@@ -831,8 +894,7 @@ select {
}
.study-worker-bar {
flex: 1 1 10rem;
min-width: 72px;
min-width: 0;
}
.study-worker-bar .n-progress {
@@ -840,28 +902,16 @@ select {
}
.study-worker-pct,
.study-worker-count {
flex: none;
text-align: right;
font-variant-numeric: tabular-nums;
font-size: 12px;
}
.study-worker-pct {
width: 4.6em;
}
.study-worker-count {
min-width: 3.75em;
color: var(--muted);
}
.study-worker-count,
.study-heartbeat {
flex: none;
width: 2.75em;
text-align: right;
font-variant-numeric: tabular-nums;
font-size: 12px;
white-space: nowrap;
}
.study-worker-count,
.study-heartbeat {
color: var(--muted);
}
@@ -869,7 +919,6 @@ select {
width: 8px;
height: 8px;
border-radius: 50%;
flex: none;
}
.study-dot.up {
@@ -1305,11 +1354,73 @@ select {
.study-live {
padding-left: 0;
border-left: 0;
padding-top: 12px;
padding-top: 16px;
border-top: 1px solid var(--line);
}
}
@media (max-width: 560px) {
.study-config .compact-nform .n-form-item {
grid-template-areas:
"label"
"blank"
"feedback";
grid-template-columns: minmax(0, 1fr);
}
.study-config .compact-nform .n-form-item .n-form-item-label {
min-height: 0;
padding: 0 0 4px;
}
.study-config .target-control {
flex-wrap: nowrap;
}
.study-config .heartbeat-control {
flex-wrap: wrap;
}
.study-config .target-control .n-input-number,
.study-config .worker-select {
flex: none;
width: 132px;
}
.study-config-hint {
margin-left: 0;
}
.study-courses {
--course-cols: minmax(0, 1fr) 52px 76px 52px 8px;
}
.study-courses.no-countdown {
--course-cols: minmax(0, 1fr) 52px 76px 8px;
}
.study-course-head,
.study-worker {
column-gap: 8px;
}
.study-worker {
row-gap: 2px;
}
.study-worker-title {
grid-column: 1 / -1;
}
.study-worker-bar {
visibility: hidden;
}
.study-course-head span:nth-child(2) {
display: none;
}
}
@media (max-width: 800px) {
.page {
padding: 16px 12px;