No GeoCities page was complete without a guestbook — a little corner of the internet where visitors could leave their mark, say hi from AOL, and promise to return.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/retro-webpage/llms.txt
Use this file to discover all available pages before exploring further.
GuestbookForm and GuestbookEntries work as a pair to recreate this experience: the form collects a name and message inside a pink beveled panel, while the entries list renders each submission as a cheerful yellow sticky-note card with a VT323 timestamp.
GuestbookForm
GuestbookForm is a controlled React form component. It manages its own name and message input state, validates both fields on submit, constructs a timestamped entry object, and hands it upward to the parent via the onAddEntry callback — leaving storage and rendering entirely to the parent’s discretion.
Props
Callback invoked when the user submits the form with both fields filled. Receives a single entry object containing:
name— the value from the Name / Handle inputmessage— the value from the Message textareadate— the submission date formatted asMM/DD/YYYY(e.g."07/04/2025") vianew Date().toLocaleDateString('en-US', { month: '2-digit', day: '2-digit', year: 'numeric' })
onAddEntry, the form resets both fields to empty strings.Usage
Behavior Notes
- Validation — The
onSubmithandler guards against empty fields with an earlyreturnbefore callingonAddEntry. Both thenameandmessageinputs also carry the HTMLrequiredattribute for native browser validation as a first line of defense. - Date format — Dates are generated client-side at the moment of submission using
toLocaleDateString('en-US', ...), producing zero-paddedMM/DD/YYYYstrings (e.g.07/04/2025). - Reset on submit — Both controlled inputs are reset to
""immediately afteronAddEntryis called, clearing the form for the next visitor. - Submit button — The form’s submit button is labelled
'Sign It!'and usesfont-pixelwith thebevel-outsetstyle, matching the site’s retro aesthetic. - BeveledPanel wrapper — The entire form is rendered inside
<BeveledPanel title="Sign My Guestbook!" variant="pink">, applying the site’s beveled-border aesthetic and pink color variant automatically.
Focus styles switch the input and textarea borders from
border-gray-400 to border-retro-pink. Ensure retro-pink is defined in your Tailwind theme for the focus highlight to appear.GuestbookEntries
GuestbookEntries is a pure display component. It receives the array of entry objects managed by the parent and renders them as a stacked list of yellow sticky-note cards beneath a dotted-border “Previous Visitors” heading.
Props
Array of entry objects to display. Each object must have:
name— displayed in bold blue (text-blue-800) at the top-left of the carddate— displayed in VT323 font at the top-right of the cardmessage— rendered as a paragraph withfont-comicandwhitespace-pre-wrapto preserve any line breaks the visitor typed
[] to show the empty-state prompt.Usage
Behavior Notes
- Empty state — When
entries.length === 0, a centered italic paragraph reading"No entries yet. Be the first to sign!"is rendered in place of the card list. This usesfont-comicandtext-gray-500styling. - Card styling — Each entry card uses
bg-[#ffffcc] border border-[#cccc99]with a subtlebox-shadowoffset (2px 2px 0px rgba(0,0,0,0.1)) to simulate a physical sticky note pinned to the page. - Card layout — The name and date sit on a flex row separated by a dashed bottom border (
border-dashed border-[#cccc99]). The message text below useswhitespace-pre-wrapso newlines entered in the textarea are preserved in the display. - Key prop — Entries are keyed by array index (
rin the source). If you support entry deletion or reordering, switch to a stable unique ID (e.g. a UUID generated at submission time) to avoid reconciliation issues.