first commit
This commit is contained in:
454
static/css/rich-editor.css
Normal file
454
static/css/rich-editor.css
Normal file
@@ -0,0 +1,454 @@
|
||||
/* ========== Rich Editor 样式 ========== */
|
||||
|
||||
/* 工具栏 */
|
||||
.re-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
padding: 6px 8px;
|
||||
background: #f8fafc;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.re-toolbar.re-compact {
|
||||
padding: 4px 6px;
|
||||
gap: 1px;
|
||||
}
|
||||
.re-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 28px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
color: #475569;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.re-btn:hover {
|
||||
background: #e2e8f0;
|
||||
color: #1e293b;
|
||||
}
|
||||
.re-compact .re-btn {
|
||||
width: 26px;
|
||||
height: 24px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.re-bold { font-weight: 700; }
|
||||
.re-italic { font-style: italic; }
|
||||
.re-code { font-family: Consolas, monospace; font-size: 11px; }
|
||||
.re-sep {
|
||||
width: 1px;
|
||||
height: 18px;
|
||||
background: #e2e8f0;
|
||||
margin: 0 4px;
|
||||
}
|
||||
.re-dropdown-wrap {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* 面板通用 */
|
||||
.re-panel {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
background: white;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 10px 40px -4px rgba(0,0,0,0.12);
|
||||
margin-top: 4px;
|
||||
}
|
||||
/* 颜色面板 */
|
||||
.re-color-panel {
|
||||
padding: 10px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(10, 1fr);
|
||||
gap: 4px;
|
||||
width: 240px;
|
||||
}
|
||||
.re-swatch {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: transform 0.15s;
|
||||
}
|
||||
.re-swatch:hover {
|
||||
transform: scale(1.3);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
/* 字体面板 */
|
||||
.re-font-panel {
|
||||
padding: 6px;
|
||||
width: 180px;
|
||||
max-height: 320px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.re-font-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 6px 10px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
color: #334155;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
.re-font-item:hover {
|
||||
background: #f1f5f9;
|
||||
}
|
||||
|
||||
/* Emoji 面板 */
|
||||
.re-emoji-panel {
|
||||
width: 300px;
|
||||
padding: 0;
|
||||
}
|
||||
.re-emoji-tabs {
|
||||
display: flex;
|
||||
gap: 0;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
overflow-x: auto;
|
||||
padding: 0 4px;
|
||||
}
|
||||
.re-emoji-tab {
|
||||
padding: 8px 10px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
border-bottom: 2px solid transparent;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.re-emoji-tab:hover { color: #334155; }
|
||||
.re-emoji-tab.active {
|
||||
color: #3b82f6;
|
||||
border-bottom-color: #3b82f6;
|
||||
}
|
||||
.re-emoji-body {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(10, 1fr);
|
||||
gap: 2px;
|
||||
padding: 8px;
|
||||
}
|
||||
.re-emoji-item {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
background: transparent;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.re-emoji-item:hover {
|
||||
background: #f1f5f9;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
/* 数学公式面板 */
|
||||
.re-math-panel {
|
||||
width: 380px;
|
||||
padding: 0;
|
||||
max-height: 420px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.re-math-hint {
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
padding: 8px 10px 4px;
|
||||
}
|
||||
.re-math-panel .re-emoji-tabs {
|
||||
padding: 0 4px;
|
||||
}
|
||||
.re-math-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(6, 1fr);
|
||||
gap: 4px;
|
||||
padding: 8px;
|
||||
}
|
||||
.re-math-item {
|
||||
padding: 6px 4px;
|
||||
border: 1px solid #e2e8f0;
|
||||
background: white;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
color: #334155;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.re-math-item:hover {
|
||||
background: #eff6ff;
|
||||
border-color: #93c5fd;
|
||||
color: #1d4ed8;
|
||||
}
|
||||
.re-math-wrap-btn {
|
||||
display: block;
|
||||
width: calc(100% - 16px);
|
||||
margin: 0 8px 8px;
|
||||
padding: 6px;
|
||||
border: 1px dashed #93c5fd;
|
||||
background: #eff6ff;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
color: #3b82f6;
|
||||
text-align: center;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.re-math-wrap-btn:hover {
|
||||
background: #dbeafe;
|
||||
}
|
||||
.re-math-preview {
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
padding: 8px;
|
||||
margin: 0 8px 8px;
|
||||
}
|
||||
.re-math-preview-label {
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.re-math-preview-content {
|
||||
min-height: 24px;
|
||||
font-size: 14px;
|
||||
color: #334155;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* 行内代码样式 */
|
||||
.re-inline-code {
|
||||
background: #f1f5f9;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 4px;
|
||||
padding: 1px 5px;
|
||||
font-family: Consolas, 'Courier New', monospace;
|
||||
font-size: 0.9em;
|
||||
color: #e11d48;
|
||||
}
|
||||
|
||||
/* 隐藏类 */
|
||||
.re-panel.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* 实时预览面板 */
|
||||
.re-live-preview {
|
||||
border-top: 1px solid #e2e8f0;
|
||||
background: #f8fafc;
|
||||
padding: 0;
|
||||
max-height: 180px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.re-pv-label {
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
padding: 6px 10px 2px;
|
||||
font-weight: 500;
|
||||
user-select: none;
|
||||
}
|
||||
.re-pv-body {
|
||||
padding: 4px 10px 8px;
|
||||
font-size: 14px;
|
||||
color: #334155;
|
||||
line-height: 1.7;
|
||||
word-break: break-word;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.re-pv-body img {
|
||||
max-width: 100%;
|
||||
max-height: 120px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.re-pv-body strong { font-weight: 700; }
|
||||
.re-pv-body em { font-style: italic; }
|
||||
.re-pv-body .katex { font-size: 1.05em; }
|
||||
|
||||
/* ========== 数学公式编辑器弹窗 ========== */
|
||||
.re-math-editor-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,0.5);
|
||||
z-index: 9990;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
animation: reMathFadeIn 0.2s ease;
|
||||
}
|
||||
.re-math-editor-overlay.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
@keyframes reMathFadeIn {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
@keyframes reMathScaleIn {
|
||||
from { opacity: 0; transform: scale(0.92); }
|
||||
to { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
.re-math-editor-modal {
|
||||
background: white;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 20px 60px -12px rgba(0,0,0,0.25);
|
||||
width: 100%;
|
||||
max-width: 672px;
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
animation: reMathScaleIn 0.25s ease;
|
||||
}
|
||||
.re-math-editor-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
}
|
||||
.re-math-editor-close {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
border-radius: 8px;
|
||||
font-size: 20px;
|
||||
color: #94a3b8;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.re-math-editor-close:hover {
|
||||
background: #f1f5f9;
|
||||
color: #475569;
|
||||
}
|
||||
.re-math-editor-body {
|
||||
padding: 16px 20px;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
}
|
||||
.re-math-editor-input {
|
||||
width: 100%;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
font-family: Consolas, 'Courier New', monospace;
|
||||
font-size: 14px;
|
||||
color: #334155;
|
||||
resize: vertical;
|
||||
transition: border-color 0.15s;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.re-math-editor-input:focus {
|
||||
outline: none;
|
||||
border-color: #93c5fd;
|
||||
box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
|
||||
}
|
||||
.re-math-editor-preview {
|
||||
min-height: 60px;
|
||||
padding: 14px 16px;
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow-x: auto;
|
||||
font-size: 16px;
|
||||
color: #334155;
|
||||
}
|
||||
.re-math-editor-preview .katex-display {
|
||||
margin: 0;
|
||||
}
|
||||
.re-math-editor-templates {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 8px;
|
||||
}
|
||||
.re-math-editor-tpl-card {
|
||||
padding: 10px 8px;
|
||||
border: 1px solid #e2e8f0;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.re-math-editor-tpl-card:hover {
|
||||
border-color: #93c5fd;
|
||||
background: #eff6ff;
|
||||
box-shadow: 0 2px 8px rgba(59,130,246,0.1);
|
||||
}
|
||||
.re-math-editor-tpl-tex {
|
||||
font-size: 13px;
|
||||
color: #334155;
|
||||
overflow: hidden;
|
||||
min-height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.re-math-editor-tpl-tex .katex {
|
||||
font-size: 0.85em;
|
||||
}
|
||||
.re-math-editor-tpl-label {
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.re-math-editor-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
padding: 12px 20px;
|
||||
border-top: 1px solid #e2e8f0;
|
||||
}
|
||||
.re-math-editor-btn-cancel {
|
||||
padding: 8px 20px;
|
||||
border: 1px solid #e2e8f0;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
color: #64748b;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.re-math-editor-btn-cancel:hover {
|
||||
background: #f1f5f9;
|
||||
}
|
||||
.re-math-editor-btn-confirm {
|
||||
padding: 8px 20px;
|
||||
border: none;
|
||||
background: #3b82f6;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.re-math-editor-btn-confirm:hover {
|
||||
background: #2563eb;
|
||||
}
|
||||
.re-fx-btn {
|
||||
font-family: Georgia, 'Times New Roman', serif;
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
}
|
||||
184
static/css/style.css
Normal file
184
static/css/style.css
Normal file
@@ -0,0 +1,184 @@
|
||||
/* 自定义样式 */
|
||||
body {
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* 自定义滚动条 */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(148, 163, 184, 0.4);
|
||||
border-radius: 4px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: rgba(148, 163, 184, 0.7);
|
||||
}
|
||||
|
||||
/* 高级玻璃拟态效果 */
|
||||
.glass-panel {
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.6);
|
||||
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.glass-panel-dark {
|
||||
background: rgba(15, 23, 42, 0.7);
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* 高级阴影与悬浮动效 */
|
||||
.hover-card-up {
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
.hover-card-up:hover {
|
||||
transform: translateY(-4px) scale(1.01);
|
||||
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.hover-glow {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.hover-glow:hover {
|
||||
box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
|
||||
}
|
||||
|
||||
/* 文本渐变发光 */
|
||||
.text-gradient-glow {
|
||||
background-clip: text;
|
||||
-webkit-background-clip: text;
|
||||
color: transparent;
|
||||
text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
/* 渐变动画边框 */
|
||||
.animated-border {
|
||||
position: relative;
|
||||
border-radius: inherit;
|
||||
}
|
||||
.animated-border::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: -2px;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
|
||||
background-size: 200% 200%;
|
||||
animation: gradient-move 3s linear infinite;
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
.animated-border:hover::before {
|
||||
opacity: 1;
|
||||
}
|
||||
@keyframes gradient-move {
|
||||
0% { background-position: 0% 50%; }
|
||||
50% { background-position: 100% 50%; }
|
||||
100% { background-position: 0% 50%; }
|
||||
}
|
||||
|
||||
/* 背景流动网格 */
|
||||
.bg-grid-pattern {
|
||||
background-size: 40px 40px;
|
||||
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
|
||||
linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
|
||||
}
|
||||
.bg-grid-pattern-dark {
|
||||
background-size: 40px 40px;
|
||||
background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
|
||||
linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
|
||||
}
|
||||
|
||||
/* 通用过渡动画 */
|
||||
.transition-all-200 {
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
.transition-all-300 {
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
/* 拖拽排序 */
|
||||
.question-item {
|
||||
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
.question-item[draggable="true"]:hover {
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
|
||||
}
|
||||
.question-item.dragging {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.drag-handle {
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
user-select: none;
|
||||
}
|
||||
.drag-handle:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
/* 选项选中高亮 */
|
||||
.option-label:has(input:checked) {
|
||||
border-color: #3b82f6;
|
||||
background-color: #eff6ff;
|
||||
}
|
||||
|
||||
/* 计时器闪烁 */
|
||||
@keyframes timer-pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.5; }
|
||||
}
|
||||
.animate-pulse {
|
||||
animation: timer-pulse 1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
/* 题号导航按钮 */
|
||||
#nav-panel button,
|
||||
#nav-panel-mobile button {
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
/* 进度条动画 */
|
||||
#progress-bar {
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
/* 批改页面底部栏 */
|
||||
.sticky.bottom-4 {
|
||||
backdrop-filter: blur(8px);
|
||||
background-color: rgba(255,255,255,0.95);
|
||||
}
|
||||
|
||||
/* 提交列表左侧颜色条 */
|
||||
.border-l-4.border-l-green-400 {
|
||||
border-left: 4px solid #4ade80;
|
||||
}
|
||||
.border-l-4.border-l-yellow-400 {
|
||||
border-left: 4px solid #facc15;
|
||||
}
|
||||
|
||||
/* 快速给分按钮 */
|
||||
button[onclick^="quickScore"] {
|
||||
transition: all 0.1s ease;
|
||||
}
|
||||
button[onclick^="quickScore"]:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
/* 响应式优化 */
|
||||
@media (max-width: 640px) {
|
||||
.sticky.top-0 {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
#nav-panel-mobile {
|
||||
max-height: 120px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user