check / check (push) Waiting to run
script-src and style-src now allow only 'self'. The generator page's two inline onclick handlers, which selected the generated URL and copied it, move into internal/static/generator.js and are attached with addEventListener. The bundled Tailwind script, which built styles in the browser and injected them at runtime, is replaced by a small hand-written internal/static/style.css holding only the rules the login and generator pages use; the templates carry a few plain class names in place of Tailwind's. No build step. The pages keep their layout, not every pixel of it. Model: opus-5-5
191 lines
2.9 KiB
CSS
191 lines
2.9 KiB
CSS
/* The login and generator pages. */
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
background: #f3f4f6;
|
|
font-family: system-ui, sans-serif;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
h1 {
|
|
margin: 0;
|
|
font-size: 1.5rem;
|
|
line-height: 2rem;
|
|
font-weight: 700;
|
|
color: #1f2937;
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
margin-bottom: 0.25rem;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
color: #374151;
|
|
}
|
|
|
|
input,
|
|
select {
|
|
width: 100%;
|
|
padding: 0.5rem 0.75rem;
|
|
border: 1px solid #d1d5db;
|
|
border-radius: 0.375rem;
|
|
box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
|
|
font: inherit;
|
|
}
|
|
|
|
input:focus,
|
|
select:focus {
|
|
outline: none;
|
|
border-color: #3b82f6;
|
|
box-shadow: 0 0 0 2px #3b82f6;
|
|
}
|
|
|
|
button {
|
|
width: 100%;
|
|
padding: 0.5rem 1rem;
|
|
border: none;
|
|
border-radius: 0.375rem;
|
|
background: #2563eb;
|
|
color: #fff;
|
|
font: inherit;
|
|
cursor: pointer;
|
|
transition: background-color 0.15s;
|
|
}
|
|
|
|
button:hover {
|
|
background: #1d4ed8;
|
|
}
|
|
|
|
button:focus {
|
|
outline: 2px solid #3b82f6;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
form > * + * {
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.card {
|
|
padding: 1.5rem;
|
|
border-radius: 0.5rem;
|
|
background: #fff;
|
|
box-shadow:
|
|
0 4px 6px -1px rgb(0 0 0 / 10%),
|
|
0 2px 4px -2px rgb(0 0 0 / 10%);
|
|
}
|
|
|
|
.error {
|
|
margin-bottom: 1rem;
|
|
padding: 0.75rem 1rem;
|
|
border: 1px solid #f87171;
|
|
border-radius: 0.25rem;
|
|
background: #fee2e2;
|
|
color: #b91c1c;
|
|
}
|
|
|
|
/* Login page: the card centred on the screen. */
|
|
|
|
.login {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.login .card {
|
|
width: 100%;
|
|
max-width: 28rem;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.login h1 {
|
|
margin-bottom: 1.5rem;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Generator page. */
|
|
|
|
.page {
|
|
max-width: 42rem;
|
|
margin: 0 auto;
|
|
padding: 2rem 1rem;
|
|
}
|
|
|
|
header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
header a {
|
|
font-size: 0.875rem;
|
|
color: #4b5563;
|
|
}
|
|
|
|
header a:hover {
|
|
color: #1f2937;
|
|
}
|
|
|
|
.result {
|
|
margin-bottom: 1.5rem;
|
|
padding: 1rem;
|
|
border: 1px solid #bbf7d0;
|
|
border-radius: 0.5rem;
|
|
background: #f0fdf4;
|
|
}
|
|
|
|
.result h2 {
|
|
margin: 0 0 0.5rem;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
color: #166534;
|
|
}
|
|
|
|
.result div {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.result input {
|
|
flex: 1;
|
|
border-color: #86efac;
|
|
box-shadow: none;
|
|
font-family: ui-monospace, monospace;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.result button {
|
|
width: auto;
|
|
padding: 0.5rem 0.75rem;
|
|
background: #16a34a;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.result button:hover {
|
|
background: #15803d;
|
|
}
|
|
|
|
.result p {
|
|
margin: 0.5rem 0 0;
|
|
font-size: 0.75rem;
|
|
color: #16a34a;
|
|
}
|
|
|
|
.columns {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 1rem;
|
|
}
|
|
|
|
.note {
|
|
margin-top: 1rem;
|
|
font-size: 0.75rem;
|
|
color: #6b7280;
|
|
text-align: center;
|
|
}
|