forked from wangziqi/gongxue-base
style: tighten legacy complex H5 surfaces
This commit is contained in:
@@ -773,3 +773,154 @@
|
||||
grid-column: span 2;
|
||||
}
|
||||
}
|
||||
|
||||
/* Complex legacy platform pages: denser tenant, billing, and permission surfaces. */
|
||||
.platform-section .platform-section {
|
||||
margin-top: 14px;
|
||||
padding: 14px;
|
||||
border-style: dashed;
|
||||
background: #fbfdff;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.platform-section .platform-section .platform-section-title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.platform-list {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.platform-section > .platform-list.compact,
|
||||
.platform-list.compact {
|
||||
gap: 0;
|
||||
border: 1px solid #f1f5f9;
|
||||
border-radius: 16px;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.platform-list.compact .platform-row {
|
||||
border-width: 0 0 1px;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.platform-list.compact .platform-row:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.platform-section > .platform-form + .platform-form,
|
||||
.platform-section > .platform-form + .platform-actions,
|
||||
.platform-section > .platform-list + .platform-list,
|
||||
.platform-section > .platform-grid + .platform-list {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.platform-row {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.platform-row::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
bottom: 14px;
|
||||
left: 0;
|
||||
width: 4px;
|
||||
border-radius: 0 999px 999px 0;
|
||||
background: #2563eb;
|
||||
}
|
||||
|
||||
.platform-row:nth-child(4n + 2)::before {
|
||||
background: #10b981;
|
||||
}
|
||||
|
||||
.platform-row:nth-child(4n + 3)::before {
|
||||
background: #f59e0b;
|
||||
}
|
||||
|
||||
.platform-row:nth-child(4n)::before {
|
||||
background: #64748b;
|
||||
}
|
||||
|
||||
.platform-row.active,
|
||||
.platform-row.selected {
|
||||
border-color: #bfdbfe;
|
||||
background: #eff6ff;
|
||||
}
|
||||
|
||||
.platform-form.compact {
|
||||
align-items: end;
|
||||
margin-top: 0;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.platform-form.compact .platform-input {
|
||||
height: 40px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.platform-form.compact .platform-field-label {
|
||||
margin-bottom: 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.platform-actions {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.platform-row-actions {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.platform-permission-panel {
|
||||
border-style: dashed;
|
||||
}
|
||||
|
||||
.platform-permission-header .platform-row-main {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.platform-chip-list.compact,
|
||||
.platform-row .platform-chip-list.compact {
|
||||
margin-top: 10px;
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid #f1f5f9;
|
||||
}
|
||||
|
||||
.platform-empty {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.platform-grid + .platform-grid,
|
||||
.platform-grid + .platform-form,
|
||||
.platform-form + .platform-grid {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.platform-metric {
|
||||
border-left: 4px solid #2563eb;
|
||||
}
|
||||
|
||||
.platform-metric:nth-child(4n + 2) {
|
||||
border-left-color: #10b981;
|
||||
}
|
||||
|
||||
.platform-metric:nth-child(4n + 3) {
|
||||
border-left-color: #f59e0b;
|
||||
}
|
||||
|
||||
.platform-metric:nth-child(4n) {
|
||||
border-left-color: #64748b;
|
||||
}
|
||||
|
||||
@media (min-width: 980px) {
|
||||
.platform-form.compact {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.platform-section .platform-section {
|
||||
padding: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2306,3 +2306,275 @@
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Legacy student complex pages: old question-bank practice and report rhythm. */
|
||||
.practice-page,
|
||||
.reports-page,
|
||||
.profile-page {
|
||||
background:
|
||||
linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
|
||||
linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
|
||||
#f4f6f9;
|
||||
background-size: 40px 40px;
|
||||
}
|
||||
|
||||
.practice-page .student-topbar,
|
||||
.reports-page .student-topbar,
|
||||
.profile-page .student-topbar {
|
||||
margin-bottom: 18px;
|
||||
padding: 22px;
|
||||
border: 1px solid #f1f5f9;
|
||||
border-radius: 18px;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.practice-page .student-kicker,
|
||||
.reports-page .student-kicker,
|
||||
.profile-page .student-kicker {
|
||||
font-size: 13px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.practice-page .student-title,
|
||||
.reports-page .student-title,
|
||||
.profile-page .student-title {
|
||||
font-size: 28px;
|
||||
font-weight: 950;
|
||||
}
|
||||
|
||||
.practice-page .student-subtitle,
|
||||
.reports-page .student-subtitle,
|
||||
.profile-page .student-subtitle {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.practice-page .quiet-panel,
|
||||
.reports-page .quiet-panel,
|
||||
.profile-page .quiet-panel,
|
||||
.practice-page .report-panel,
|
||||
.reports-page .report-panel,
|
||||
.profile-page .report-panel,
|
||||
.profile-page .profile-card,
|
||||
.profile-page .trend-chart {
|
||||
border-color: #f1f5f9;
|
||||
border-radius: 16px;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.practice-page > .quiet-panel:first-of-type,
|
||||
.reports-page .report-panel {
|
||||
border-left: 5px solid #1152d4;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.practice-page .list-stack,
|
||||
.reports-page .list-stack,
|
||||
.profile-page .list-stack {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.practice-page .list-row,
|
||||
.reports-page .list-row,
|
||||
.profile-page .list-row {
|
||||
position: relative;
|
||||
padding: 16px 18px 16px 20px;
|
||||
border-color: #f1f5f9;
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.practice-page .list-row::before,
|
||||
.reports-page .list-row::before,
|
||||
.profile-page .list-row::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
bottom: 12px;
|
||||
left: 0;
|
||||
width: 4px;
|
||||
border-radius: 0 999px 999px 0;
|
||||
background: #2563eb;
|
||||
}
|
||||
|
||||
.practice-page .list-row:nth-child(3n + 2)::before,
|
||||
.reports-page .list-row:nth-child(3n + 2)::before,
|
||||
.profile-page .list-row:nth-child(3n + 2)::before {
|
||||
background: #10b981;
|
||||
}
|
||||
|
||||
.practice-page .list-row:nth-child(3n)::before,
|
||||
.reports-page .list-row:nth-child(3n)::before,
|
||||
.profile-page .list-row:nth-child(3n)::before {
|
||||
background: #f59e0b;
|
||||
}
|
||||
|
||||
.practice-page .list-row.active {
|
||||
border-color: #bfdbfe;
|
||||
background: #eff6ff;
|
||||
box-shadow: 0 3px 10px rgba(17, 82, 212, 0.08);
|
||||
}
|
||||
|
||||
.practice-page .option-line {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.practice-page .option-prefix {
|
||||
flex-basis: 36px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 10px;
|
||||
font-size: 18px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.practice-page .list-row.active .option-prefix {
|
||||
background: #1152d4;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.practice-page .answer-detail,
|
||||
.reports-page .answer-detail {
|
||||
margin-top: 12px;
|
||||
padding: 13px 14px;
|
||||
border-color: #e5e7eb;
|
||||
border-radius: 12px;
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
.practice-page .answer-detail-label,
|
||||
.reports-page .answer-detail-label {
|
||||
margin-bottom: 6px;
|
||||
font-size: 13px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.practice-page .composite-subquestion {
|
||||
border-left: 5px solid #10b981;
|
||||
}
|
||||
|
||||
.practice-page .sub-option-list {
|
||||
gap: 8px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.practice-page .sub-explanation,
|
||||
.reports-page .sub-explanation {
|
||||
margin-top: 12px;
|
||||
padding-top: 10px;
|
||||
border-top-color: #e5e7eb;
|
||||
}
|
||||
|
||||
.reports-page .report-sub-result {
|
||||
margin-top: 10px;
|
||||
padding: 10px 12px;
|
||||
border: 1px dashed #e5e7eb;
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.answer-sheet {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.student-page > .answer-sheet,
|
||||
.quiet-panel + .answer-sheet {
|
||||
padding: 14px;
|
||||
border-color: #f1f5f9;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.answer-card {
|
||||
height: 44px;
|
||||
border-radius: 10px;
|
||||
font-size: 15px;
|
||||
line-height: 44px;
|
||||
}
|
||||
|
||||
.answer-card.current {
|
||||
border-color: #1152d4;
|
||||
background: #1152d4;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.answer-card.answered:not(.current) {
|
||||
border-color: #bbf7d0;
|
||||
background: #ecfdf5;
|
||||
}
|
||||
|
||||
.answer-card.wrong:not(.current) {
|
||||
border-color: #fecaca;
|
||||
background: #fff1f2;
|
||||
}
|
||||
|
||||
.profile-page .learning-report-panel {
|
||||
border-left: 5px solid #1152d4;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.profile-page .trend-chart {
|
||||
gap: 7px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.profile-page .trend-value {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.profile-page .trend-bar-track {
|
||||
height: 96px;
|
||||
margin-top: 6px;
|
||||
background: #eef2f7;
|
||||
}
|
||||
|
||||
.profile-page .trend-bar-fill {
|
||||
max-width: 20px;
|
||||
background: #1152d4;
|
||||
}
|
||||
|
||||
.profile-page .trend-label {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.profile-page .avatar-choice,
|
||||
.profile-page .metric {
|
||||
border-color: #f1f5f9;
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.practice-page .row-main,
|
||||
.reports-page .row-main,
|
||||
.profile-page .row-main {
|
||||
font-size: 17px;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
.practice-page .row-meta,
|
||||
.reports-page .row-meta,
|
||||
.profile-page .row-meta,
|
||||
.practice-page .metric-label,
|
||||
.reports-page .metric-label,
|
||||
.profile-page .metric-label {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.practice-page .metric-value,
|
||||
.reports-page .metric-value,
|
||||
.profile-page .metric-value {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
@media (min-width: 900px) {
|
||||
.practice-page,
|
||||
.reports-page,
|
||||
.profile-page {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.answer-sheet {
|
||||
grid-template-columns: repeat(10, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -880,3 +880,156 @@
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
/* Complex legacy admin pages: table-like rows and compact import/detail blocks. */
|
||||
.admin-list.compact {
|
||||
gap: 6px;
|
||||
border: 1px solid #f1f5f9;
|
||||
border-radius: 16px;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.admin-list.compact .admin-row {
|
||||
margin: 0;
|
||||
border-width: 0 0 1px;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.admin-list.compact .admin-row:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.admin-section > .admin-list + .admin-list {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.admin-section > .admin-grid + .admin-list,
|
||||
.admin-section > .admin-list + .admin-grid {
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.admin-row {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.admin-row::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
bottom: 14px;
|
||||
left: 0;
|
||||
width: 4px;
|
||||
border-radius: 0 999px 999px 0;
|
||||
background: #2563eb;
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.admin-row:nth-child(4n + 2)::before {
|
||||
background: #10b981;
|
||||
}
|
||||
|
||||
.admin-row:nth-child(4n + 3)::before {
|
||||
background: #f59e0b;
|
||||
}
|
||||
|
||||
.admin-row:nth-child(4n)::before {
|
||||
background: #64748b;
|
||||
}
|
||||
|
||||
.admin-list.compact .admin-row::before,
|
||||
.admin-row.nested::before {
|
||||
top: 10px;
|
||||
bottom: 10px;
|
||||
}
|
||||
|
||||
.admin-row.nested {
|
||||
margin-top: 10px;
|
||||
padding: 12px 14px 12px 18px;
|
||||
border-style: dashed;
|
||||
background: #f8fbff;
|
||||
}
|
||||
|
||||
.admin-row.nested .admin-row-main {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.admin-row.nested .admin-row-meta {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.admin-actions.compact {
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.admin-actions.compact .admin-button,
|
||||
.admin-actions.compact .admin-mini-button {
|
||||
min-width: 82px;
|
||||
}
|
||||
|
||||
.admin-form-grid + .admin-actions.compact,
|
||||
.admin-textarea + .admin-actions.compact,
|
||||
.admin-empty + .admin-actions.compact {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.admin-form-grid .admin-field,
|
||||
.admin-form-grid .admin-input,
|
||||
.admin-form-grid .admin-textarea {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.admin-textarea,
|
||||
.break-line {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
|
||||
}
|
||||
|
||||
.break-line {
|
||||
margin-top: 8px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 10px;
|
||||
background: #f8fafc;
|
||||
color: #334155;
|
||||
font-size: 12px;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.admin-empty {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.admin-section .admin-metric-grid,
|
||||
.admin-section .admin-grid {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.admin-section .admin-metric {
|
||||
border-left: 4px solid #2563eb;
|
||||
}
|
||||
|
||||
.admin-section .admin-metric:nth-child(4n + 2) {
|
||||
border-left-color: #10b981;
|
||||
}
|
||||
|
||||
.admin-section .admin-metric:nth-child(4n + 3) {
|
||||
border-left-color: #f59e0b;
|
||||
}
|
||||
|
||||
.admin-section .admin-metric:nth-child(4n) {
|
||||
border-left-color: #64748b;
|
||||
}
|
||||
|
||||
@media (min-width: 980px) {
|
||||
.admin-form-grid {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.admin-form-grid .admin-textarea,
|
||||
.admin-form-grid .admin-field.wide {
|
||||
grid-column: span 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,8 +36,12 @@ function redirectToAuthUrl(url: string) {
|
||||
|
||||
export function currentPagePath() {
|
||||
if (isH5Runtime() && typeof window !== 'undefined') {
|
||||
const hashPath = (window.location.hash || '').replace(/^#!?/, '').split('?')[0];
|
||||
if (hashPath.startsWith('/pages/')) return hashPath;
|
||||
if (hashPath.startsWith('pages/')) return `/${hashPath}`;
|
||||
const pathname = window.location.pathname || '';
|
||||
if (pathname.startsWith('/pages/')) return pathname;
|
||||
const pageIndex = pathname.indexOf('/pages/');
|
||||
if (pageIndex >= 0) return pathname.slice(pageIndex).split('?')[0];
|
||||
if (!pathname || pathname === '/' || pathname.endsWith('/index.html')) return landingPath();
|
||||
}
|
||||
const instance = Taro.getCurrentInstance();
|
||||
|
||||
Reference in New Issue
Block a user