Port original CSS/JS/assets, rebuild home as four sections with feed fragments, expand schema (boards/notices/rooms/topics), and add page.chrome HTML overrides plus invoke html returns so Marqdo can render Django-class chrome without json glue. Co-authored-by: Cursor <cursoragent@cursor.com>
455 lines
11 KiB
CSS
455 lines
11 KiB
CSS
/**
|
||
* 暗恋见君 — 登录/注册/发帖/评论 共用表单样式(粉色毛玻璃主题)
|
||
*/
|
||
|
||
:root {
|
||
--anlian-accent: #fdbbdb;
|
||
--anlian-accent-deep: #f0a8c4;
|
||
--anlian-accent-text: #a85878;
|
||
--anlian-accent-muted: #c97a96;
|
||
--anlian-glass-bg: rgba(255, 255, 255, 0.38);
|
||
--anlian-glass-border: rgba(255, 255, 255, 0.52);
|
||
--anlian-text: #222;
|
||
--anlian-text-muted: #666;
|
||
--anlian-radius: 14px;
|
||
--anlian-radius-pill: 999px;
|
||
--anlian-transition: 0.2s ease;
|
||
}
|
||
|
||
/* ---------- 页面布局 ---------- */
|
||
.anlian-page {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
width: 100%;
|
||
max-width: 520px;
|
||
margin: 0 auto;
|
||
padding: 1.5rem 1rem 2.5rem;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.anlian-page-wide {
|
||
max-width: 800px;
|
||
}
|
||
|
||
.anlian-page-title {
|
||
margin: 0 0 1.25rem;
|
||
font-size: 1.75rem;
|
||
font-weight: 700;
|
||
color: var(--anlian-text);
|
||
text-align: center;
|
||
}
|
||
|
||
.anlian-page-lead {
|
||
margin: -0.5rem 0 1.25rem;
|
||
font-size: 0.9rem;
|
||
color: var(--anlian-text-muted);
|
||
text-align: center;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
/* ---------- 表单卡片 ---------- */
|
||
.anlian-form-card {
|
||
width: 100%;
|
||
padding: 2rem 1.75rem;
|
||
border-radius: 24px;
|
||
background: var(--anlian-glass-bg);
|
||
backdrop-filter: blur(18px);
|
||
-webkit-backdrop-filter: blur(18px);
|
||
border: 1px solid var(--anlian-glass-border);
|
||
box-shadow: 0 12px 40px rgba(253, 189, 219, 0.15);
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.anlian-form-card .form-group,
|
||
.anlian-form-card .anlian-field {
|
||
margin-bottom: 1.25rem;
|
||
}
|
||
|
||
.anlian-form-card .anlian-field:last-child,
|
||
.anlian-form-card .form-group:last-of-type {
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
/* ---------- 标签与输入框 ---------- */
|
||
.anlian-field-label,
|
||
.anlian-form-card label:not(.anlian-pill-label):not(.anlian-switch) {
|
||
display: block;
|
||
margin-bottom: 0.45rem;
|
||
font-size: 0.875rem;
|
||
font-weight: 600;
|
||
color: var(--anlian-accent-text);
|
||
}
|
||
|
||
.anlian-form-card input[type="text"],
|
||
.anlian-form-card input[type="email"],
|
||
.anlian-form-card input[type="password"],
|
||
.anlian-form-card input[type="search"],
|
||
.anlian-form-card input[type="number"],
|
||
.anlian-form-card input.anlian-input,
|
||
.anlian-form-card .form-control,
|
||
.anlian-form-card textarea,
|
||
.anlian-form-card select {
|
||
display: block;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
padding: 0.7rem 0.95rem;
|
||
font-size: 1rem;
|
||
line-height: 1.4;
|
||
color: var(--anlian-text);
|
||
background: rgba(255, 255, 255, 0.55);
|
||
border: 1px solid rgba(253, 189, 219, 0.35);
|
||
border-radius: 12px;
|
||
transition: border-color var(--anlian-transition), box-shadow var(--anlian-transition),
|
||
background var(--anlian-transition);
|
||
}
|
||
|
||
.anlian-form-card input::placeholder,
|
||
.anlian-form-card textarea::placeholder {
|
||
color: #999;
|
||
}
|
||
|
||
.anlian-form-card input:focus,
|
||
.anlian-form-card textarea:focus,
|
||
.anlian-form-card select:focus {
|
||
outline: none;
|
||
border-color: var(--anlian-accent-deep);
|
||
background: rgba(255, 255, 255, 0.72);
|
||
box-shadow: 0 0 0 3px rgba(253, 189, 219, 0.28);
|
||
}
|
||
|
||
.anlian-form-card select {
|
||
cursor: pointer;
|
||
appearance: none;
|
||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a85878' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
|
||
background-repeat: no-repeat;
|
||
background-position: right 0.95rem center;
|
||
padding-right: 2.25rem;
|
||
}
|
||
|
||
.anlian-form-card textarea {
|
||
min-height: 100px;
|
||
resize: vertical;
|
||
}
|
||
|
||
/* ---------- 记住我(自定义勾选,替代原生 checkbox) ---------- */
|
||
.anlian-field-remember {
|
||
margin-bottom: 1.25rem;
|
||
}
|
||
|
||
.anlian-switch {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 0.65rem;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
}
|
||
|
||
.anlian-switch-input {
|
||
position: absolute;
|
||
width: 1px;
|
||
height: 1px;
|
||
padding: 0;
|
||
margin: -1px;
|
||
overflow: hidden;
|
||
clip: rect(0, 0, 0, 0);
|
||
white-space: nowrap;
|
||
border: 0;
|
||
}
|
||
|
||
.anlian-switch-box {
|
||
position: relative;
|
||
flex-shrink: 0;
|
||
width: 1.35rem;
|
||
height: 1.35rem;
|
||
border-radius: 8px;
|
||
background: rgba(255, 255, 255, 0.5);
|
||
border: 1px solid rgba(253, 189, 219, 0.5);
|
||
box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
|
||
transition: background var(--anlian-transition), border-color var(--anlian-transition),
|
||
box-shadow var(--anlian-transition);
|
||
}
|
||
|
||
.anlian-switch-box::after {
|
||
content: '';
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 45%;
|
||
width: 0.3rem;
|
||
height: 0.55rem;
|
||
margin-left: -0.2rem;
|
||
margin-top: -0.38rem;
|
||
border: solid #fff;
|
||
border-width: 0 2px 2px 0;
|
||
transform: rotate(45deg) scale(0);
|
||
opacity: 0;
|
||
transition: transform 0.15s ease, opacity 0.15s ease;
|
||
}
|
||
|
||
.anlian-switch-input:checked + .anlian-switch-box {
|
||
background: linear-gradient(135deg, rgba(253, 189, 219, 0.85), rgba(240, 168, 196, 0.9));
|
||
border-color: rgba(240, 168, 196, 0.85);
|
||
box-shadow: 0 2px 8px rgba(253, 189, 219, 0.35);
|
||
}
|
||
|
||
.anlian-switch-input:checked + .anlian-switch-box::after {
|
||
transform: rotate(45deg) scale(1);
|
||
opacity: 1;
|
||
}
|
||
|
||
.anlian-switch-input:focus-visible + .anlian-switch-box {
|
||
outline: none;
|
||
box-shadow: 0 0 0 3px rgba(253, 189, 219, 0.35);
|
||
}
|
||
|
||
.anlian-switch-text {
|
||
font-size: 0.875rem;
|
||
font-weight: 500;
|
||
color: var(--anlian-accent-text);
|
||
line-height: 1.3;
|
||
}
|
||
|
||
.anlian-switch:hover .anlian-switch-box {
|
||
border-color: var(--anlian-accent-deep);
|
||
background: rgba(255, 255, 255, 0.62);
|
||
}
|
||
|
||
.anlian-switch:hover .anlian-switch-input:checked + .anlian-switch-box {
|
||
background: linear-gradient(135deg, rgba(253, 189, 219, 0.95), rgba(240, 168, 196, 0.95));
|
||
}
|
||
|
||
/* ---------- 匿名:分段切换 ---------- */
|
||
.anlian-field-anon {
|
||
margin-top: 0.25rem;
|
||
}
|
||
|
||
.anlian-pill-toggle {
|
||
position: relative;
|
||
}
|
||
|
||
.anlian-pill-input {
|
||
position: absolute;
|
||
width: 1px;
|
||
height: 1px;
|
||
padding: 0;
|
||
margin: -1px;
|
||
overflow: hidden;
|
||
clip: rect(0, 0, 0, 0);
|
||
white-space: nowrap;
|
||
border: 0;
|
||
}
|
||
|
||
.anlian-pill-label {
|
||
position: relative;
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
align-items: center;
|
||
min-height: 2.5rem;
|
||
padding: 4px;
|
||
border-radius: var(--anlian-radius-pill);
|
||
background: rgba(255, 255, 255, 0.32);
|
||
border: 1px solid rgba(253, 189, 219, 0.45);
|
||
cursor: pointer;
|
||
user-select: none;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.anlian-pill-thumb {
|
||
position: absolute;
|
||
top: 4px;
|
||
left: 4px;
|
||
width: calc(50% - 4px);
|
||
height: calc(100% - 8px);
|
||
border-radius: var(--anlian-radius-pill);
|
||
background: linear-gradient(135deg, rgba(253, 189, 219, 0.65), rgba(240, 168, 196, 0.75));
|
||
box-shadow: 0 2px 10px rgba(253, 189, 219, 0.25);
|
||
transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
|
||
pointer-events: none;
|
||
}
|
||
|
||
.anlian-pill-input:checked + .anlian-pill-label .anlian-pill-thumb {
|
||
transform: translateX(100%);
|
||
}
|
||
|
||
.anlian-pill-option {
|
||
position: relative;
|
||
z-index: 1;
|
||
text-align: center;
|
||
font-size: 0.8125rem;
|
||
font-weight: 600;
|
||
color: var(--anlian-text-muted);
|
||
padding: 0.35rem 0.5rem;
|
||
transition: color var(--anlian-transition);
|
||
}
|
||
|
||
.anlian-pill-input:not(:checked) + .anlian-pill-label .anlian-pill-option:first-child,
|
||
.anlian-pill-input:checked + .anlian-pill-label .anlian-pill-option:last-child {
|
||
color: var(--anlian-accent-text);
|
||
}
|
||
|
||
.anlian-field-hint {
|
||
margin: 0.4rem 0 0;
|
||
font-size: 0.75rem;
|
||
color: var(--anlian-text-muted);
|
||
line-height: 1.4;
|
||
}
|
||
|
||
/* ---------- 验证码行 ---------- */
|
||
.anlian-code-row {
|
||
display: flex;
|
||
gap: 0.5rem;
|
||
align-items: stretch;
|
||
}
|
||
|
||
.anlian-code-row input {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.anlian-btn-send-code {
|
||
flex-shrink: 0;
|
||
align-self: stretch;
|
||
padding: 0 1rem;
|
||
border: 1px solid rgba(253, 189, 219, 0.5);
|
||
border-radius: 12px;
|
||
background: rgba(253, 189, 219, 0.32);
|
||
color: var(--anlian-accent-text);
|
||
font-size: 0.8125rem;
|
||
font-weight: 600;
|
||
cursor: pointer;
|
||
white-space: nowrap;
|
||
transition: background var(--anlian-transition), transform var(--anlian-transition);
|
||
}
|
||
|
||
.anlian-btn-send-code:hover:not(:disabled) {
|
||
background: rgba(253, 189, 219, 0.48);
|
||
}
|
||
|
||
.anlian-btn-send-code:disabled {
|
||
opacity: 0.55;
|
||
cursor: not-allowed;
|
||
}
|
||
|
||
/* ---------- 主按钮 ---------- */
|
||
.anlian-btn-primary,
|
||
.anlian-form-card .anlian-btn-submit,
|
||
.anlian-form-card #login-btn,
|
||
.anlian-form-card #submit-btn,
|
||
.anlian-form-card #submit-comment-btn {
|
||
display: block;
|
||
width: 100%;
|
||
margin-top: 1.25rem;
|
||
padding: 0.75rem 1.25rem;
|
||
font-size: 1rem;
|
||
font-weight: 600;
|
||
color: var(--anlian-accent-text);
|
||
background: linear-gradient(135deg, rgba(253, 189, 219, 0.55), rgba(240, 168, 196, 0.65));
|
||
border: 1px solid rgba(240, 168, 196, 0.75);
|
||
border-radius: var(--anlian-radius-pill);
|
||
cursor: pointer;
|
||
transition: transform var(--anlian-transition), box-shadow var(--anlian-transition),
|
||
background var(--anlian-transition);
|
||
box-shadow: 0 4px 16px rgba(253, 189, 219, 0.22);
|
||
}
|
||
|
||
.anlian-btn-primary:hover,
|
||
.anlian-form-card .anlian-btn-submit:hover,
|
||
.anlian-form-card #login-btn:hover,
|
||
.anlian-form-card #submit-btn:hover,
|
||
.anlian-form-card #submit-comment-btn:hover {
|
||
background: linear-gradient(135deg, rgba(253, 189, 219, 0.68), rgba(240, 168, 196, 0.78));
|
||
box-shadow: 0 6px 22px rgba(253, 189, 219, 0.32);
|
||
transform: translateY(-1px);
|
||
}
|
||
|
||
/* ---------- 提示与链接 ---------- */
|
||
.anlian-alert {
|
||
padding: 0.85rem 1rem;
|
||
margin-bottom: 1rem;
|
||
border-radius: 12px;
|
||
font-size: 0.875rem;
|
||
line-height: 1.45;
|
||
}
|
||
|
||
.anlian-alert-danger {
|
||
background: rgba(220, 80, 100, 0.12);
|
||
border: 1px solid rgba(220, 80, 100, 0.28);
|
||
color: #9e3a4a;
|
||
}
|
||
|
||
.anlian-alert p {
|
||
margin: 0;
|
||
}
|
||
|
||
.anlian-field-error {
|
||
display: block;
|
||
margin-top: 0.35rem;
|
||
font-size: 0.8125rem;
|
||
color: #b33a4d;
|
||
}
|
||
|
||
.anlian-form-links {
|
||
display: flex;
|
||
justify-content: center;
|
||
gap: 1rem;
|
||
margin-top: 1.25rem;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.anlian-form-links a {
|
||
font-size: 0.875rem;
|
||
font-weight: 500;
|
||
color: var(--anlian-accent-text);
|
||
text-decoration: none;
|
||
}
|
||
|
||
.anlian-form-links a:hover {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
/* ---------- 富文本编辑器 ---------- */
|
||
.anlian-editor-wrap {
|
||
border-radius: 12px;
|
||
overflow: hidden;
|
||
border: 1px solid rgba(253, 189, 219, 0.35);
|
||
background: rgba(255, 255, 255, 0.45);
|
||
}
|
||
|
||
.anlian-editor-wrap #editor {
|
||
min-height: 360px;
|
||
}
|
||
|
||
.anlian-editor-wrap .w-e-toolbar {
|
||
background: rgba(255, 255, 255, 0.65) !important;
|
||
border-bottom: 1px solid rgba(253, 189, 219, 0.3) !important;
|
||
}
|
||
|
||
.anlian-editor-wrap .w-e-text-container {
|
||
background: rgba(255, 255, 255, 0.35) !important;
|
||
}
|
||
|
||
/* ---------- 评论表单区块 ---------- */
|
||
.anlian-comment-form.anlian-form-card {
|
||
margin-bottom: 2rem;
|
||
}
|
||
|
||
@media (max-width: 576px) {
|
||
.anlian-form-card {
|
||
padding: 1.35rem 1.15rem;
|
||
border-radius: 18px;
|
||
}
|
||
|
||
.anlian-page-title {
|
||
font-size: 1.5rem;
|
||
}
|
||
|
||
.anlian-code-row {
|
||
flex-direction: column;
|
||
}
|
||
|
||
.anlian-btn-send-code {
|
||
width: 100%;
|
||
padding: 0.65rem;
|
||
}
|
||
}
|