refactor: new css

This commit is contained in:
2026-03-01 11:41:45 +01:00
parent c60900efb5
commit 77fbc2e0bb

View File

@@ -3,199 +3,55 @@
pub const shared_css = "
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
--bg-primary: #0d1117;
--bg-secondary: #161b22;
--bg-tertiary: #21262d;
--text-primary: #e6edf3;
--text-secondary: #8b949e;
--bg: #0d1117;
--bg2: #161b22;
--bg3: #21262d;
--fg: #e6edf3;
--dim: #8b949e;
--accent: #58a6ff;
--accent-hover: #79c0ff;
--success: #238636;
--success-hover: #2ea043;
--warning: #d29922;
--green: #238636;
--border: #30363d;
--radius: 12px;
--radius-sm: 6px;
}
body {
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
line-height: 1.6;
}
.container {
max-width: 900px;
margin: 0 auto;
padding: 40px 20px;
--mono: 'JetBrains Mono', monospace;
}
body { font-family: system-ui, sans-serif; background: var(--bg); color: var(--fg); min-height: 100vh; line-height: 1.6; }
.container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
header { text-align: center; margin-bottom: 40px; }
.tagline {
color: var(--text-secondary);
font-size: 1rem;
margin-top: 8px;
font-weight: 500;
}
.logo {
font-size: 2.5rem;
font-weight: 700;
letter-spacing: -0.02em;
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.card {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 32px;
}
textarea {
width: 100%;
min-height: 300px;
background: var(--bg-tertiary);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 16px;
font-family: 'JetBrains Mono', monospace;
font-size: 14px;
color: var(--text-primary);
resize: vertical;
transition: border-color 0.2s;
}
textarea:focus { outline: none; border-color: var(--accent); }
textarea::placeholder { color: var(--text-secondary); }
.actions {
margin-top: 24px;
display: flex;
justify-content: flex-end;
gap: 12px;
.logo { font-size: 2.5rem; font-weight: 700; color: var(--accent); }
.tagline { color: var(--dim); margin-top: 8px; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 32px; }
textarea, .paste-content, .share-url input, input[readonly] {
width: 100%; background: var(--bg3); border: 1px solid var(--border);
border-radius: 6px; padding: 14px; font-family: var(--mono); font-size: 14px; color: var(--fg);
}
textarea { min-height: 300px; resize: vertical; }
textarea:focus, .share-url input:focus { outline: none; border-color: var(--accent); }
textarea::placeholder { color: var(--dim); }
.paste-content pre { font-family: var(--mono); font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; margin: 0; }
.actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 12px; }
.actions.center { justify-content: center; }
button, .btn-primary {
background: var(--success);
color: white;
border: none;
padding: 12px 24px;
border-radius: var(--radius-sm);
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
text-decoration: none;
display: inline-block;
background: var(--green); color: #fff; border: none; padding: 12px 24px;
border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover:not(:disabled), .btn-primary:hover { background: var(--success-hover); }
button:hover:not(:disabled), .btn-primary:hover { filter: brightness(1.15); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.notice {
background: rgba(210, 153, 34, 0.15);
border: 1px solid var(--warning);
border-radius: var(--radius-sm);
padding: 16px;
margin-bottom: 24px;
}
.notice strong { color: var(--warning); }
.notice.warning {
background: rgba(248, 81, 73, 0.15);
border-color: #f85149;
}
.notice { background: rgba(210,153,34,.15); border: 1px solid #d29922; border-radius: 6px; padding: 16px; margin-bottom: 24px; }
.notice strong { color: #d29922; }
.notice.warning { background: rgba(248,81,73,.15); border-color: #f85149; }
.notice.warning strong { color: #f85149; }
.paste-content {
background: var(--bg-tertiary);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 20px;
}
.paste-content pre {
font-family: 'JetBrains Mono', monospace;
font-size: 14px;
line-height: 1.6;
color: var(--text-primary);
white-space: pre-wrap;
word-wrap: break-word;
margin: 0;
}
footer {
text-align: center;
padding: 20px;
color: var(--text-secondary);
font-size: 13px;
margin-top: 20px;
}
.error { background: rgba(248,81,73,.15); border: 1px solid #f85149; border-radius: 6px; padding: 16px; color: #f85149; }
footer { text-align: center; padding: 20px; color: var(--dim); font-size: 13px; margin-top: 20px; }
.centered { text-align: center; padding: 40px; }
.centered .logo { margin-bottom: 40px; }
.centered .card { max-width: 500px; margin: 0 auto; }
.centered .btn-primary {
background: transparent;
color: var(--text-primary);
border: 1px solid var(--border);
padding: 12px 24px;
border-radius: var(--radius-sm);
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: inline-block;
transition: background 0.2s, border-color 0.2s;
}
.centered .btn-primary:hover { background: var(--bg-tertiary); border-color: var(--accent); }
.centered .btn-primary { background: transparent; color: var(--fg); border: 1px solid var(--border); font-weight: 500; }
.centered .btn-primary:hover { background: var(--bg3); border-color: var(--accent); }
.centered p { color: var(--dim); margin-bottom: 24px; }
h2 { font-size: 1.5rem; margin-bottom: 16px; }
.centered p { color: var(--text-secondary); margin-bottom: 24px; }
input[readonly] {
background: var(--bg-tertiary);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 12px 16px;
font-family: 'JetBrains Mono', monospace;
font-size: 13px;
color: var(--text-primary);
flex: 1;
}
.share-url { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.share-url label { color: var(--dim); font-size: 14px; font-weight: 500; }
#loading { text-align: center; padding: 40px; color: var(--dim); }
.hidden { display: none; }
.error {
background: rgba(248, 81, 73, 0.15);
border: 1px solid #f85149;
border-radius: var(--radius-sm);
padding: 16px;
color: #f85149;
}
.share-url {
margin-bottom: 24px;
display: flex;
flex-direction: column;
gap: 8px;
}
.share-url label {
color: var(--text-secondary);
font-size: 14px;
font-weight: 500;
}
.share-url input {
width: 100%;
background: var(--bg-tertiary);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 12px 16px;
font-family: 'JetBrains Mono', monospace;
font-size: 13px;
color: var(--text-primary);
cursor: text;
}
.share-url input:focus { outline: none; border-color: var(--accent); }
#loading {
text-align: center;
padding: 40px;
color: var(--text-secondary);
}
.mascot {
display: inline-flex;
vertical-align: middle;
margin-left: 4px;
}
.mascot svg {
height: 1em;
width: auto;
display: block;
}
.mascot { display: inline-flex; vertical-align: middle; margin-left: 4px; }
.mascot svg { height: 1em; width: auto; display: block; }
"