docs: add a feature carousel to the landing page#157
Open
vito wants to merge 1 commit into
Open
Conversation
Add a carousel to the docs landing page that cycles through short, distinctive-feature examples — prototype objects, multi-field selection, copy-on-write, null tracking, optional parens, expression-oriented case, and built-in assert — inspired by the feature reel on rhombus-lang.org. Each slide renders as a regular \dang-literate block, so it reuses the existing snippet template, styling, baked build-time output, and client-side editor rather than introducing a parallel mechanism. Slides must stay independent — each redeclares its own types — so a slide evaluates in its own fresh session and carries data-dang-literate-chain; playground.js now scopes a literate chain to its nearest such ancestor, defaulting to the whole page as before. carousel.js is progressive enhancement only: a tab strip, prev/next controls, and arrow keys over the slides, which otherwise stack and read fine without JavaScript. Signed-off-by: Alex Suraci <[email protected]>
Deploying dang with
|
| Latest commit: |
6f2cc2a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e67a201d.dang-3kk.pages.dev |
| Branch Preview URL: | https://docs-feature-carousel.dang-3kk.pages.dev |
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 free
to 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.
Adds a feature carousel to the docs landing page — a quick reel cycling through Dang's distinctive features, inspired by the one on rhombus-lang.org.
What's in it
Seven slides, each a short example shown with its real, build-time-evaluated output:
typedeclares a type and its constructor.{{ … }}(against a schema, one query with fields resolved in parallel)StringvsString!with flow narrowingcaseyields a valueassertwith no frameworkReuse over reinvention
Each slide renders as a regular
\dang-literateblock, so it reuses the existing snippet template, styling, baked output, and client-side editor — the slides are editable and runnable, and a broken example fails the docs build like any other literate block.The only evaluation-side change is independence: slides each redeclare their own types, so they can't share the page's literate session. A slide evaluates in its own fresh session and carries
data-dang-literate-chain, andplayground.jsnow scopes a literate chain to its nearest such ancestor, defaulting to the whole page (existing pages are unaffected).carousel.jsis pure progressive enhancement — a tab strip of feature names, prev/next controls, and arrow keys — over slides that otherwise stack and read fine without JavaScript.Notes for review
Preview with
cd docs && ./build.sh -s 3001.