Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@
},
"dependencies": {
"@kobalte/core": "^0.13.13",
"@formisch/solid": "1.0.0",
Comment thread
sij411 marked this conversation as resolved.
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^1.0.0",
"@solidjs/start": "^2.0.0",
"nitro": "3.0.260610-beta",
"relay-runtime": "^21.0.1",
"solid-js": "^1.9.5",
"solid-relay": "1.0.0-beta.29",
"valibot": "1.4.2",
"vite": "^8.2.0"
},
"devDependencies": {
Expand Down
378 changes: 378 additions & 0 deletions packages/web/src/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,378 @@
/*
DrFed: A web-based platform for developing and debugging ActivityPub apps
Copyright (C) 2026 DrFed team

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

* {
box-sizing: border-box;
}

html {
background: var(--bg);
color: var(--ink);
font-family: var(--font-sans);
font-size: var(--text-body);
}

body {
margin: 0;
}

button,
input {
font: inherit;
}

.app-shell {
min-height: 100svh;
}

.app-header {
background: color-mix(in srgb, var(--bg) 92%, transparent);
border-bottom: 1px solid var(--line);
position: sticky;
top: 0;
z-index: 10;
}

.app-header-inner {
align-items: center;
display: flex;
height: var(--header-h);
margin: 0 auto;
max-width: var(--container);
padding: 0 var(--gutter);
}

.brand {
align-items: center;
color: var(--ink);
display: flex;
font-family: var(--font-serif);
font-size: 1.25rem;
font-weight: 700;
gap: 0.65rem;
letter-spacing: var(--tracking-heading);
text-decoration: none;
}

.brand img {
border-radius: 50%;
}

.app-nav {
align-self: stretch;
display: flex;
gap: 0.25rem;
margin-left: clamp(1.5rem, 5vw, 4rem);
}

.app-nav a,
.header-action {
align-items: center;
color: var(--ink-soft);
display: flex;
font-size: 0.9rem;
font-weight: 600;
padding: 0 0.85rem;
position: relative;
text-decoration: none;
}

.app-nav a:hover,
.header-action:hover,
.app-nav a.is-active,
.header-action.is-active {
color: var(--ink);
}

.app-nav a.is-active::after {
background: var(--accent);
bottom: -1px;
content: "";
height: 3px;
left: 0.85rem;
position: absolute;
right: 0.85rem;
}

.header-action {
border: 1px solid var(--line-strong);
border-radius: var(--radius-pill);
margin-left: auto;
min-height: 2.4rem;
}

.header-action.is-active {
background: var(--accent-tint);
border-color: var(--accent-soft);
}

.app-header a:focus-visible {
outline: 3px solid var(--accent-soft);
outline-offset: 0.2rem;
}

.app-content {
margin: 0 auto;
max-width: var(--container);
min-height: calc(100svh - var(--header-h));
padding: clamp(2rem, 5vw, 4rem) var(--gutter);
}

.app-content > main:not(.form-page) {
width: 100%;
}

.app-content > main:not(.form-page) :is(h1, h2, p) {
margin-top: 0;
}

.app-content h1,
.app-content h2 {
font-family: var(--font-serif);
letter-spacing: var(--tracking-heading);
}

.app-content h1 {
font-size: var(--text-heading-2);
line-height: var(--leading-heading);
}

.app-content p {
color: var(--ink-soft);
line-height: var(--leading-body);
}

.form-page {
align-items: center;
display: flex;
justify-content: center;
min-height: calc(100svh - var(--header-h) - clamp(4rem, 10vw, 8rem));
}

.panel {
background: var(--card);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: var(--shadow-sm);
}

.form-panel {
max-width: 28rem;
padding: clamp(1.5rem, 4vw, 2rem);
width: 100%;
}

.panel-header {
border-bottom: 1px solid var(--line);
margin: 0 calc(clamp(1.5rem, 4vw, 2rem) * -1) 1.5rem;
padding: 0 clamp(1.5rem, 4vw, 2rem) 1.5rem;
}

.panel-header h1 {
font-size: 1.65rem;
margin: 0 0 0.5rem;
}

.panel-header p {
font-size: 0.95rem;
margin: 0;
}

.form-panel form {
display: grid;
gap: 1rem;
}

.field {
display: grid;
gap: 0.5rem;
}

.field-heading {
align-items: baseline;
display: flex;
font-size: 0.9rem;
font-weight: 650;
justify-content: space-between;
}

.field-status {
color: var(--ink-faint);
font-family: var(--font-mono);
font-size: 0.68rem;
font-weight: 500;
letter-spacing: 0.04em;
text-transform: uppercase;
}

.field-status.required {
color: var(--accent-strong);
}

.field input {
background: var(--surface-2);
border: 1px solid var(--line-strong);
border-radius: var(--radius-sm);
color: var(--ink);
min-width: 0;
padding: 0.9rem 1rem;
transition:
border-color var(--duration-fast) var(--ease-standard),
box-shadow var(--duration-fast) var(--ease-standard);
}

.field input::placeholder {
color: var(--ink-faint);
}

.field input:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-tint);
outline: none;
}

.field input:read-only {
border-style: dashed;
color: var(--ink-soft);
cursor: default;
font-family: var(--font-mono);
}

.field-hint {
color: var(--ink-faint);
font-size: 0.78rem;
line-height: 1.45;
margin: 0;
}

.field-error {
color: var(--danger);
font-size: 0.78rem;
line-height: 1.45;
margin: 0;
}

.field input[aria-invalid="true"] {
border-color: var(--danger);
}

.field input[aria-invalid="true"]:focus {
border-color: var(--danger);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent);
}

.button {
align-items: center;
border: 0;
border-radius: var(--radius-sm);
cursor: pointer;
display: inline-flex;
font-weight: 700;
justify-content: center;
min-height: 2.9rem;
padding: 0.75rem 1.1rem;
}

.button:focus-visible {
outline: 3px solid var(--accent-soft);
outline-offset: 0.2rem;
}

.button.primary {
background: var(--accent);
color: var(--on-accent);
transition:
background var(--duration-fast) var(--ease-standard),
transform var(--duration-fast) var(--ease-standard);
}

.button.primary:hover:not(:disabled) {
background: var(--accent-strong);
}

.button:disabled {
cursor: wait;
opacity: 0.65;
}

.notice {
background: var(--accent-tint);
border-radius: var(--radius-sm);
color: var(--ink);
line-height: 1.5;
margin: 1.25rem 0 0;
padding: 0.85rem 1rem;
}

.notice.error {
background: color-mix(in srgb, var(--danger) 12%, var(--surface));
border-left: 3px solid var(--danger);
color: var(--danger);
}

.notice.success {
background: color-mix(in srgb, var(--success) 12%, var(--surface));
border-left: 3px solid var(--success);
color: var(--success);
}
Comment on lines +328 to +332

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Put the status rules in the imported stylesheet

When sign-in succeeds or either form renders an error, these semantic rules never run: app.tsx imports src/styles/app.css, while the routes obtain their hashed classes from styles/form.module.css, and nothing imports this new src/app.css. As a result, success still uses the module's accent-colored border and errors retain its generic background/text styling; move these rules into form.module.css or otherwise wire them into a stylesheet used by the forms.

Useful? React with 👍 / 👎.


.notice.warning {
background: color-mix(in srgb, var(--warning) 12%, var(--surface));
border-left: 3px solid var(--warning);
color: var(--warning);
}

@media (max-width: 600px) {
.app-header-inner {
padding: 0 1rem;
}

.brand span {
display: none;
}

.app-nav {
margin-left: 0.75rem;
}

.app-nav a,
.header-action {
padding-inline: 0.65rem;
}

.app-nav a.is-active::after {
left: 0.65rem;
right: 0.65rem;
}

.app-content {
padding: 1.5rem 1rem 3rem;
}

.form-page {
align-items: flex-start;
min-height: auto;
}
}

@media (prefers-reduced-motion: reduce) {
.button.primary,
.field input {
transition: none;
}
}
Loading