修改样式,增强文字功能
Vercel Deploy / deploy (push) Successful in 1m13s

This commit is contained in:
2026-04-25 14:22:18 +08:00
Unverified
parent 0773b20ed7
commit 3d463c91d8
3 changed files with 552 additions and 99 deletions
+262 -69
View File
@@ -1,8 +1,19 @@
:root {
--primary-color: #0d6efd;
--primary-hover: #0b5ed7;
--secondary-color: #6c757d;
--secondary-hover: #5c636a;
--primary-color: #0f62fe;
--primary-hover: #3b82ff;
--secondary-color: #3b485f;
--secondary-hover: #52627d;
--accent-color: #22d3ee;
--accent-soft: rgba(34, 211, 238, 0.18);
--surface-color: rgba(255, 255, 255, 0.8);
--surface-strong: rgba(255, 255, 255, 0.92);
--border-color: rgba(109, 128, 162, 0.22);
--text-color: #10203a;
--muted-text: #5e6c84;
--shadow-soft: 0 20px 45px rgba(15, 35, 95, 0.12);
--shadow-strong: 0 18px 50px rgba(15, 98, 254, 0.18);
--page-glow-1: rgba(15, 98, 254, 0.2);
--page-glow-2: rgba(34, 211, 238, 0.18);
--dark-bg: #121212;
--dark-text: #e0e0e0;
@@ -17,64 +28,132 @@
body {
margin: 0;
padding: 0;
font-family: system-ui, -apple-system, sans-serif;
font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
color: var(--text-color);
background:
radial-gradient(circle at top left, var(--page-glow-1), transparent 32%),
radial-gradient(circle at top right, var(--page-glow-2), transparent 28%),
linear-gradient(135deg, #eef5ff 0%, #f6fbff 45%, #f8f9fd 100%);
min-height: 100vh;
position: relative;
}
body::before,
body::after {
content: "";
position: fixed;
inset: auto;
width: 42vw;
height: 42vw;
border-radius: 50%;
pointer-events: none;
filter: blur(60px);
opacity: 0.45;
z-index: 0;
}
body::before {
top: -12vw;
right: -10vw;
background: rgba(15, 98, 254, 0.12);
}
body::after {
bottom: -14vw;
left: -8vw;
background: rgba(34, 211, 238, 0.1);
}
button {
padding: 0.375rem 0.75rem;
border: 1px solid var(--primary-color);
border-radius: 0.375rem;
padding: 0.5rem 0.95rem;
border: 1px solid transparent;
border-radius: 8px;
margin-bottom: 5px;
white-space: nowrap;
cursor: pointer;
font-size: 0.9rem;
font-weight: 600;
letter-spacing: 0.01em;
transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
box-shadow: 0 10px 20px rgba(16, 32, 58, 0.08);
backdrop-filter: blur(8px);
}
button:hover {
transform: translateY(-1px);
}
button:disabled {
opacity: 0.65;
cursor: not-allowed;
box-shadow: none;
}
button.primary {
color: #fff;
background-color: var(--primary-color);
background: linear-gradient(135deg, var(--primary-color), #2388ff);
box-shadow: 0 12px 24px rgba(15, 98, 254, 0.28);
}
button.primary:hover {
color: #fff;
border-color: var(--primary-hover);
background-color: var(--primary-hover);
border-color: rgba(255, 255, 255, 0.3);
background: linear-gradient(135deg, var(--primary-hover), #45c3ff);
box-shadow: 0 16px 30px rgba(15, 98, 254, 0.34);
}
button.secondary {
color: #fff;
background-color: var(--secondary-color);
border-color: var(--secondary-color);
color: var(--text-color);
background: rgba(255, 255, 255, 0.72);
border-color: rgba(109, 128, 162, 0.22);
}
button.secondary:hover {
color: #fff;
border-color: var(--secondary-hover);
background-color: var(--secondary-hover);
color: var(--text-color);
border-color: rgba(59, 72, 95, 0.24);
background: rgba(255, 255, 255, 0.95);
}
h3 {
padding-bottom: .3em;
border-bottom: 1px solid #ccc;
padding: 1.6rem 0 1rem;
margin: 0 0 1.25rem;
border-bottom: 1px solid rgba(131, 149, 186, 0.26);
text-align: center;
font-size: clamp(1.5rem, 2vw, 2rem);
font-weight: 800;
letter-spacing: 0.04em;
color: #0f1f44;
text-shadow: 0 10px 25px rgba(15, 98, 254, 0.12);
}
fieldset {
border: none;
box-shadow: 0 .5rem 0.5rem rgba(0, 0, 0, 0.2);
background-color: #f8f9fa;
padding: 10px;
margin-bottom: 16px;
border-radius: 4px;
box-shadow: var(--shadow-soft);
background: linear-gradient(180deg, var(--surface-strong), var(--surface-color));
padding: 16px 16px 12px;
margin-bottom: 18px;
border-radius: 10px;
border: 1px solid var(--border-color);
position: relative;
overflow: hidden;
}
fieldset::before {
content: "";
position: absolute;
inset: 0 auto auto 0;
width: 100%;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.65), transparent);
opacity: 0.85;
}
fieldset legend {
font-weight: bold;
color: rgba(0, 0, 255, 0.6);
color: #1862d9;
padding: 0 10px;
font-size: 0.95rem;
letter-spacing: 0.08em;
}
code {
@@ -86,49 +165,66 @@ code {
}
input[type=text],
textarea,
input[type=date],
input[type=number],
select {
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
border: 1px solid #dee2e6;
border-radius: 0.375rem;
padding: .2rem .75rem;
color: var(--text-color);
border: 1px solid rgba(121, 140, 176, 0.26);
border-radius: 6px;
padding: .45rem .85rem;
max-width: 100%;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.86);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
input[type=file] {
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
color: var(--text-color);
max-width: 100%;
}
input::file-selector-button {
font-size: 0.9rem;
font-weight: 400;
font-weight: 600;
line-height: 1.5;
border: 1px solid var(--primary-color);
border-radius: 0.375rem;
border: 1px solid rgba(121, 140, 176, 0.26);
border-radius: 8px;
cursor: pointer;
padding: 0.45rem 0.95rem;
margin-right: 10px;
color: var(--text-color);
background: rgba(255, 255, 255, 0.9);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
input::file-selector-button:hover {
transform: translateY(-1px);
box-shadow: 0 10px 20px rgba(16, 32, 58, 0.08);
}
select {
padding: .3rem 2.25rem .3rem .75rem;
padding: .45rem 2.25rem .45rem .85rem;
}
input:focus,
textarea:focus,
select:focus {
border: 1px solid #86b7fe;
box-shadow: 0 0 4px rgba(0, 120, 215, 0.8);
border: 1px solid rgba(15, 98, 254, 0.55);
box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.14);
outline: 0;
background: #fff;
}
input[type=text]:disabled,
textarea:disabled,
input[type=date]:disabled,
input[type=number]:disabled,
select:disabled {
@@ -141,27 +237,32 @@ select:disabled {
label {
margin-right: 4px;
white-space: nowrap;
color: var(--muted-text);
font-weight: 600;
}
.main {
width: 100%;
max-width: 950px;
margin: 0 auto;
padding: 0 1rem;
background: #fff;
padding: 0 1rem 1.5rem;
background: transparent;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
box-sizing: border-box;
position: relative;
z-index: 1;
}
.footer {
display: flex;
gap: 10px;
font-size: 0.8rem;
color: #666;
color: var(--muted-text);
flex-wrap: wrap;
margin: 1rem 0;
margin: 1rem 0 2rem;
justify-content: center;
}
.footer .links {
@@ -170,7 +271,7 @@ label {
}
.footer .links a {
color: #666;
color: var(--muted-text);
text-decoration: none;
position: relative;
padding: 0 8px;
@@ -188,7 +289,7 @@ label {
}
.footer a:hover {
color: #0d6efd;
color: var(--primary-color);
text-decoration: underline;
}
@@ -219,13 +320,17 @@ label {
min-height: 100px;
max-height: 300px;
margin: 0;
padding: 5px;
background: #ddd;
padding: 10px 12px;
background: linear-gradient(180deg, rgba(14, 26, 48, 0.92), rgba(20, 36, 63, 0.96));
color: #d9ecff;
overflow-y: auto;
overflow-x: hidden;
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
box-sizing: border-box;
word-break: break-word;
border-radius: 16px;
border: 1px solid rgba(77, 102, 150, 0.4);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.log-container .log-line {
@@ -239,21 +344,22 @@ label {
}
.log-container .time {
color: #333;
color: #7bdcff;
margin-right: 0.5em;
}
.log-container .action {
color: #666;
color: #95aecd;
margin-right: 0.5em;
}
.template-panel {
border: 1px solid #dee2e6;
border-radius: 0.5rem;
background: #fff;
border: 1px solid rgba(121, 140, 176, 0.22);
border-radius: 8px;
background: rgba(255, 255, 255, 0.78);
padding: 12px;
margin-bottom: 10px;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.panel-tabs {
@@ -264,20 +370,21 @@ label {
}
.panel-tab {
color: #495057;
background: #eef2f6;
border-color: #d0d7de;
color: var(--muted-text);
background: rgba(255, 255, 255, 0.7);
border-color: rgba(121, 140, 176, 0.18);
}
.panel-tab:hover {
background: #dde5ee;
border-color: #c1c9d2;
background: rgba(255, 255, 255, 0.96);
border-color: rgba(121, 140, 176, 0.26);
}
.panel-tab.active {
color: #fff;
background: var(--primary-color);
border-color: var(--primary-color);
background: linear-gradient(135deg, var(--primary-color), #1ec8ff);
border-color: transparent;
box-shadow: 0 12px 24px rgba(15, 98, 254, 0.2);
}
.panel-tab-content {
@@ -297,7 +404,7 @@ label {
}
.template-header span {
color: #666;
color: var(--muted-text);
font-size: 0.9rem;
}
@@ -317,9 +424,9 @@ label {
gap: 8px;
align-items: center;
padding: 8px;
border: 1px solid #dee2e6;
border-radius: 0.375rem;
background: #f8f9fa;
border: 1px solid rgba(121, 140, 176, 0.18);
border-radius: 6px;
background: rgba(248, 251, 255, 0.86);
}
.template-item input[type="text"] {
@@ -338,11 +445,17 @@ label {
}
.canvas-container canvas {
border: black solid 1px;
border: 1px solid rgba(37, 61, 104, 0.24);
max-width: 100%;
height: auto;
display: block;
margin: 0 auto;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.98));
border-radius: 0;
box-shadow:
0 25px 60px rgba(15, 35, 95, 0.18),
inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.canvas-container.crop-mode canvas {
@@ -353,10 +466,10 @@ label {
.status-bar {
display: none;
font-size: 85%;
color: #666;
color: var(--muted-text);
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px dotted #AAA;
border-bottom: 1px dotted rgba(121, 140, 176, 0.45);
}
canvas.text-placement-mode {
@@ -371,6 +484,15 @@ canvas.text-placement-mode {
color: var(--primary-color);
}
.canvas-container {
padding: 18px;
border-radius: 0;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(242, 248, 255, 0.84));
border: 1px solid rgba(121, 140, 176, 0.18);
box-shadow: var(--shadow-soft);
}
.canvas-tools {
margin-top: 10px;
justify-content: center;
@@ -382,6 +504,27 @@ canvas.text-placement-mode {
display: none;
}
.markdown-text-input-group {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 240px;
flex: 1 1 280px;
}
#text-input {
width: 100%;
min-height: 110px;
resize: vertical;
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
}
.markdown-text-hint {
color: var(--muted-text);
font-size: 0.82rem;
line-height: 1.4;
}
.canvas-container.brush-mode .brush-tools,
.canvas-container.text-mode .brush-tools,
.canvas-container.eraser-mode .brush-tools,
@@ -404,23 +547,25 @@ canvas.text-placement-mode {
align-items: center;
justify-content: center;
margin-right: 5px;
background-color: #f8f9fa;
border: 1px solid #dee2e6;
background: rgba(255, 255, 255, 0.86);
border: 1px solid rgba(121, 140, 176, 0.22);
border-radius: 4px;
padding: 0;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 8px 18px rgba(16, 32, 58, 0.08);
}
.tool-button:hover {
background-color: #e9ecef;
border-color: #ced4da;
background: #fff;
border-color: rgba(121, 140, 176, 0.3);
}
.tool-button.active {
background-color: var(--primary-color);
background: linear-gradient(135deg, var(--primary-color), #1ec8ff);
color: white;
border-color: var(--primary-color);
border-color: transparent;
box-shadow: 0 12px 24px rgba(15, 98, 254, 0.24);
}
.tool-button.hide {
@@ -474,6 +619,7 @@ canvas.text-placement-mode {
}
input[type=text],
textarea,
input[type=number],
select {
max-width: 100%;
@@ -491,14 +637,23 @@ body.dark-mode .main {
color: var(--dark-text);
}
body.dark-mode {
background:
radial-gradient(circle at top left, rgba(15, 98, 254, 0.16), transparent 32%),
radial-gradient(circle at bottom right, rgba(34, 211, 238, 0.14), transparent 30%),
linear-gradient(135deg, #0b1220 0%, #10192d 50%, #0c1220 100%);
}
body.dark-mode fieldset {
background-color: var(--dark-fieldset-bg);
box-shadow: 0 .5rem 0.5rem rgba(0, 0, 0, 0.5);
border: 1px solid rgba(77, 102, 150, 0.24);
}
body.dark-mode h3 {
border-bottom: 1px solid var(--dark-border);
color: var(--dark-text);
text-shadow: 0 12px 30px rgba(34, 211, 238, 0.12);
}
body.dark-mode code {
@@ -507,6 +662,7 @@ body.dark-mode code {
}
body.dark-mode input[type=text],
body.dark-mode textarea,
body.dark-mode input[type=date],
body.dark-mode input[type=number],
body.dark-mode select {
@@ -516,6 +672,7 @@ body.dark-mode select {
}
body.dark-mode input[type=text]:disabled,
body.dark-mode textarea:disabled,
body.dark-mode input[type=date]:disabled,
body.dark-mode input[type=number]:disabled,
body.dark-mode select:disabled {
@@ -597,6 +754,15 @@ body.dark-mode .template-item {
border-color: var(--dark-border);
}
body.dark-mode .canvas-container {
background: linear-gradient(180deg, rgba(23, 31, 49, 0.92), rgba(17, 24, 39, 0.95));
border-color: rgba(77, 102, 150, 0.24);
}
body.dark-mode .canvas-container canvas {
background: #f8fbff;
}
body.dark-mode .panel-tab {
color: var(--dark-text);
background-color: #2a2a2a;
@@ -617,3 +783,30 @@ body.dark-mode .panel-tab.active {
body.dark-mode .template-header span {
color: #aaa;
}
@media (prefers-reduced-motion: no-preference) {
fieldset,
.canvas-container {
animation: floatIn 0.6s ease both;
}
fieldset:nth-of-type(2) {
animation-delay: 0.06s;
}
fieldset:nth-of-type(3) {
animation-delay: 0.12s;
}
}
@keyframes floatIn {
from {
opacity: 0;
transform: translateY(16px);
}
to {
opacity: 1;
transform: translateY(0);
}
}