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 = " pub const shared_css = "
* { margin: 0; padding: 0; box-sizing: border-box; } * { margin: 0; padding: 0; box-sizing: border-box; }
:root { :root {
--bg-primary: #0d1117; --bg: #0d1117;
--bg-secondary: #161b22; --bg2: #161b22;
--bg-tertiary: #21262d; --bg3: #21262d;
--text-primary: #e6edf3; --fg: #e6edf3;
--text-secondary: #8b949e; --dim: #8b949e;
--accent: #58a6ff; --accent: #58a6ff;
--accent-hover: #79c0ff; --green: #238636;
--success: #238636;
--success-hover: #2ea043;
--warning: #d29922;
--border: #30363d; --border: #30363d;
--radius: 12px; --mono: 'JetBrains Mono', monospace;
--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;
} }
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; } header { text-align: center; margin-bottom: 40px; }
.tagline { .logo { font-size: 2.5rem; font-weight: 700; color: var(--accent); }
color: var(--text-secondary); .tagline { color: var(--dim); margin-top: 8px; }
font-size: 1rem; .card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 32px; }
margin-top: 8px; textarea, .paste-content, .share-url input, input[readonly] {
font-weight: 500; 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);
.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;
} }
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; } .actions.center { justify-content: center; }
button, .btn-primary { button, .btn-primary {
background: var(--success); background: var(--green); color: #fff; border: none; padding: 12px 24px;
color: white; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
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;
} }
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; } button:disabled { opacity: 0.5; cursor: not-allowed; }
.notice { .notice { background: rgba(210,153,34,.15); border: 1px solid #d29922; border-radius: 6px; padding: 16px; margin-bottom: 24px; }
background: rgba(210, 153, 34, 0.15); .notice strong { color: #d29922; }
border: 1px solid var(--warning); .notice.warning { background: rgba(248,81,73,.15); border-color: #f85149; }
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.warning strong { color: #f85149; } .notice.warning strong { color: #f85149; }
.paste-content { .error { background: rgba(248,81,73,.15); border: 1px solid #f85149; border-radius: 6px; padding: 16px; color: #f85149; }
background: var(--bg-tertiary); footer { text-align: center; padding: 20px; color: var(--dim); font-size: 13px; margin-top: 20px; }
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;
}
.centered { text-align: center; padding: 40px; } .centered { text-align: center; padding: 40px; }
.centered .logo { margin-bottom: 40px; } .centered .logo { margin-bottom: 40px; }
.centered .card { max-width: 500px; margin: 0 auto; } .centered .card { max-width: 500px; margin: 0 auto; }
.centered .btn-primary { .centered .btn-primary { background: transparent; color: var(--fg); border: 1px solid var(--border); font-weight: 500; }
background: transparent; .centered .btn-primary:hover { background: var(--bg3); border-color: var(--accent); }
color: var(--text-primary); .centered p { color: var(--dim); margin-bottom: 24px; }
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); }
h2 { font-size: 1.5rem; margin-bottom: 16px; } h2 { font-size: 1.5rem; margin-bottom: 16px; }
.centered p { color: var(--text-secondary); margin-bottom: 24px; } .share-url { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
input[readonly] { .share-url label { color: var(--dim); font-size: 14px; font-weight: 500; }
background: var(--bg-tertiary); #loading { text-align: center; padding: 40px; color: var(--dim); }
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;
}
.hidden { display: none; } .hidden { display: none; }
.error { .mascot { display: inline-flex; vertical-align: middle; margin-left: 4px; }
background: rgba(248, 81, 73, 0.15); .mascot svg { height: 1em; width: auto; display: block; }
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;
}
" "