Uh oh!
There was an error while loading. Please reload this page.
feat: build the site shell and render its pages - #7
Merged
Conversation
The shell carries the navigation, locale and theme selection, and the
project index and detail views. Pages declared by the API drive the
navigation, and a splat route renders any of them from
`/v1/pages/{slug}`, with the home page served at the root.
Sections render in declaration order with a divider between each pair.
The response is validated against the published contract, and a section
type this client does not render is skipped so the rest of the page
still renders.A hero renders its headline, subheadline, calls to action and portrait. The measured dimensions drive an aspect-ratio box, so the image reserves its space before it loads. Actions render as links, routing when the API gives a path and opening a new tab when it gives a URL. The site title and tagline no longer open the home page; they carry the document title and meta description, and the hero carries the claim.
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The site shell, and the pages rendered inside it.
Shell
Navigation, locale and theme selection, the project index and the project detail view. Locale is resolved server-side and carried on the response, so no locale prefix appears in the path.
Pages
Pages declared by the API drive the navigation. A splat route renders any of them from
/v1/pages/{slug}; the page claiminghomeis served at the root.Sections render in declaration order with an Astryx
Dividerbetween each pair — never before the first or after the last. A page with nothing to render shows an empty state.Contract handling
Every response is validated against the published contract before it reaches a component. Section types are validated leniently: a type this client does not render is skipped, so the rest of the page — and the navigation around it — still renders. In development, a skipped section and any page slug a file route would shadow are reported to the console.
Requires the typed-sections and pages support in Folio, and the page declarations in DotFolio.