diff --git a/src/pages/guestbook.astro b/src/pages/guestbook.astro index c101264..48f5725 100644 --- a/src/pages/guestbook.astro +++ b/src/pages/guestbook.astro @@ -32,107 +32,114 @@ const errorMsg = errorParam ? (errorMessages[errorParam] ?? decodeURIComponent(e -
-

Leave a message

-

- Messages are reviewed before being published. Please don't include personal or - sensitive information — this is a public guestbook. -

+
+
+ + Leave a message + - {submitted && ( - - )} +
+

+ Messages are reviewed before being published. Please don't include personal or + sensitive information — this is a public guestbook. +

- {errorMsg && ( - - )} + {submitted && ( + + )} -
- - + {errorMsg && ( + + )} -
- - -
+ + + -
- - - Plain text only. Max 1000 characters. -
+
+ + +
-
- - - Only https:// links. Leave blank if you don't have one. -
+
+ + + Plain text only. Max 1000 characters. +
- +
+ + + Only https:// links. Leave blank if you don't have one. +
-
- + + +
+ +
+
- +
@@ -245,6 +252,55 @@ const errorMsg = errorParam ? (errorMessages[errorParam] ?? decodeURIComponent(e margin-bottom: var(--space-md); } + .compose { + width: 100%; + } + + .compose-toggle { + list-style: none; + cursor: pointer; + display: flex; + align-items: center; + gap: 10px; + color: var(--color-accent-bright); + font-size: 1.1rem; + font-weight: bold; + margin-bottom: var(--space-sm); + user-select: none; + } + + .compose-toggle::-webkit-details-marker { + display: none; + } + + .compose-toggle:focus-visible { + outline: 2px solid var(--color-accent); + outline-offset: 2px; + border-radius: 4px; + } + + .compose-toggle::before { + content: '+'; + display: inline-flex; + align-items: center; + justify-content: center; + width: 1.2em; + height: 1.2em; + border: 1px solid var(--color-accent); + border-radius: 4px; + color: var(--color-accent); + font-weight: normal; + line-height: 1; + } + + .compose[open] .compose-toggle::before { + content: '−'; + } + + .compose-body { + margin-top: var(--space-sm); + } + .guestbook-form { display: flex; flex-direction: column;