web/dreamstop.openfp.net · commit
Turn the colour legend into a layer menu with real examples
parents: c663783c69
Turn the colour legend into a layer menu with real examples The front page now opens its examples with a clear ChangeLog entry from horizon-flake-parts 0.21.0, then a tab menu of the nine codepoint layers. Each layer shows a clear, an ambiguous and a nonsense example where a real sentence exists, quoted from the Quality Control Handbook 0.18.0.0 or from a real document, with its readings and what the layer's codes decide. Without JavaScript every layer is shown in turn. The intro drops the codepoint sentence, the kinds paragraph takes the owner's wording, and the manual-coverage paragraph is removed.
6 files changed
Diff
dreamstop-openfp-net-web/README.md | 12 +- dreamstop-openfp-net-web/src/Site/Content.hs | 254 +++++++++++++++++++++++---- dreamstop-openfp-net-web/src/Site/View.hs | 159 ++++++++++++----- dreamstop.css | 31 +++- nix/site.nix | 9 +- prose/front.vx | 14 +- 6 files changed, 388 insertions(+), 91 deletions(-) diff --git a/dreamstop-openfp-net-web/README.md b/dreamstop-openfp-net-web/README.md index be17a5b..10c3c2b 100644 @@ -1,9 +1,8 @@ # dreamstop-openfp-net-web The dreamstop.openfp.net website: the front page of dreamstop, a language -for disambiguating text. The page says what dreamstop is, shows the -three verdicts a sentence can get (clear, ambiguous and nonsense) with an -example of each, and teaches minimal pairs with one pair from a real +for disambiguating text. The page says what dreamstop is, shows a clear ChangeLog entry and, for each +codepoint layer, a clear, an ambiguous and a nonsense example, and teaches minimal pairs with one pair from a real ChangeLog. It links the dreamstop user manual, a PDF served at `/manual/dreamstop.pdf`. ## What it gives you @@ -12,9 +11,10 @@ The dreamstop.openfp.net page as one design-kit `Site` in Miso. - `Site.Page` is the document head: the title, the description, the icon, the stylesheets and the preview card. -- `Site.Content` is what the page says that is data: the links, the three - verdicts with their examples and the minimal pair. -- `Site.View` is the body. It holds no state and has no actions. +- `Site.Content` is what the page says that is data: the links, the ChangeLog + entry, the examples for each layer and the minimal pair. +- `Site.View` is the body. Its one state is the layer the menu shows, which + a click or the arrow, Home and End keys on a tab change. - `dreamstop-openfp-net-web-render` writes the page to stdout as `index.html` under node at build time, so the page reads in full without JavaScript. It fails, naming the node, on anything the kit's renderer diff --git a/dreamstop-openfp-net-web/src/Site/Content.hs b/dreamstop-openfp-net-web/src/Site/Content.hs index 1a7058f..381ec30 100644 @@ -1,6 +1,7 @@ +-- | What the page says that is data: its links, a clear ChangeLog entry, the +-- examples for each codepoint layer and the minimal pair. Every example is +-- quoted word for word from the OpenFP Quality Control Handbook 0.18.0.0 or +-- from a real document named in its source. -- -- @since 0.1.0.0 module Site.Content @@ -9,8 +10,15 @@ module Site.Content , manual , Reading (MkReading, readingCodes, readingGloss) , Example (MkExample, exampleLabel, exampleSentence, exampleReadings) - , verdicts - , modalities + , Entry (MkEntry, entryHeading, entrySentences, entrySource) + , entry + , Layer (Force, Mood, Aspect, Phase, Modality, Negation, Bound, Evidence, Nominalisation) + , layers + , layerName + , Verdict (Clear, Ambiguous, Nonsense) + , verdictName + , LayerExample (MkLayerExample, layerVerdict, layerExample, layerDecides, layerSource) + , layerExamples , pair , pairSlot ) where @@ -35,6 +43,7 @@ package = "https://nixlab.openfp.net/dreamstop/dreamstop" -- @since 0.1.0.0 manual :: MisoString manual = "manual/dreamstop.pdf" + -- | One reading of a sentence: its codes and a plain gloss. -- -- @since 0.2.0.0 @@ -55,37 +64,216 @@ data Example = MkExample , exampleReadings :: [Reading] } +-- | A whole ChangeLog entry: its release heading, each bullet with its one +-- reading, and where it was published. -- -verdicts :: [Example] -verdicts = - [ MkExample - "Clear" - "The shell no longer accepts unsigned commands." - [MkReading "[ASR·HAB·CSS]" "the shell accepted unsigned commands before this release and does not accept them from this release on"] - , MkExample - "Ambiguous" - "Added the review store, which moved reviews and sign-offs out of SQLite." - [storeMoves, storeMoved] - , MkExample - "Nonsense" - "Removed the legacy importer, which reads the old export format." - [] - ] +-- @since 0.3.0.0 +type Entry :: Type +data Entry = MkEntry + { entryHeading :: MisoString + , entrySentences :: [Example] + , entrySource :: MisoString + } +-- | The 0.21.0 entry of the horizon-flake-parts ChangeLog, as tag 0.46.1 +-- publishes it. Every bullet is clear under the ChangeLog kind: each clause +-- is a release action. -- -modalities :: [Example] -modalities = - [ MkExample "Required" "You must regenerate the file" [MkReading "[ASR·HAB·DEO·NEC]" "a rule requires it"] - , MkExample "Allowed" "You may edit the file" [MkReading "[ASR·HAB·DEO·POS]" "a rule allows it"] - , MkExample "Able" "The host can read a file" [MkReading "[ASR·HAB·ABL·POS]" "the host is able to"] - ] +-- @since 0.3.0.0 +entry :: Entry +entry = + MkEntry + "## 0.21.0 — 2026-04-14" + [ MkExample + "1" + "Added horizon-end-user-assurances 0.1.0 and its named required-package lists." + [MkReading "[ASR·PFV]" "the release added the package and its lists"] + , MkExample + "2" + "Added the required-package presence check to `horizon.packageSet`." + [MkReading "[ASR·PFV] {check: BSC}" "the release added the check, the procedure itself"] + , MkExample + "3" + "Added `cabal update` before the horizon-gen-nix CI job and made its cabal-install package configurable through `horizon-gen-nix.cabal`." + [MkReading "[ASR·PFV] [ASR·PFV]" "two things the release did: it added the update step and it made the package configurable"] + ] + "From the ChangeLog of horizon-flake-parts, release 0.21.0, as published in tag 0.46.1." + +-- | A codepoint layer, in the order the manual's reference table lists them. +-- +-- @since 0.3.0.0 +type Layer :: Type +data Layer + = Force + | Mood + | Aspect + | Phase + | Modality + | Negation + | Bound + | Evidence + | Nominalisation + deriving stock (Eq, Enum, Bounded) + +-- | Every layer, first to last. +-- +-- @since 0.3.0.0 +layers :: [Layer] +layers = [minBound .. maxBound] + +-- | A layer's name, which is also the class codepoints.css colours it by. +-- +-- @since 0.3.0.0 +layerName :: Layer -> MisoString +layerName = \case + Force -> "Force" + Mood -> "Mood" + Aspect -> "Aspect" + Phase -> "Phase" + Modality -> "Modality" + Negation -> "Negation" + Bound -> "Bound" + Evidence -> "Evidence" + Nominalisation -> "Nominalisation" + +-- | The verdict an example shows. +-- +-- @since 0.3.0.0 +type Verdict :: Type +data Verdict = Clear | Ambiguous | Nonsense + +-- | A verdict's label. +-- +-- @since 0.3.0.0 +verdictName :: Verdict -> MisoString +verdictName = \case + Clear -> "Clear" + Ambiguous -> "Ambiguous" + Nonsense -> "Nonsense" + +-- | One example under a layer: its verdict, the sentence with its readings, +-- what the layer's codes decide in it, and where it is quoted from. +-- +-- @since 0.3.0.0 +type LayerExample :: Type +data LayerExample = MkLayerExample + { layerVerdict :: Verdict + , layerExample :: Example + , layerDecides :: MisoString + , layerSource :: MisoString + } + +-- | A layer's clear, ambiguous and nonsense examples, each turning on that +-- layer. A verdict with no real sentence for the layer is left out. +-- +-- @since 0.3.0.0 +layerExamples :: Layer -> [LayerExample] +layerExamples = \case + Force -> + [ example Clear "This edition retires QC.DescribeCheckCoverage." + [MkReading "[DEC·PFV]" "saying it makes it so: the edition retires the rule"] + "DEC: the sentence retires the rule by being said, rather than reporting that it was retired." + "From the ChangeLog of quality-control, release 0.7.0.0." + , example Ambiguous "Split vortex-shell from the vortex repository into its own repository." + [ MkReading "[ASR·PFV]" "reports that the release moved vortex-shell into its own repository" + , MkReading "[DIR·PFV]" "tells the reader to move it" + ] + "ASR or DIR: the codes decide whether the sentence reports a change or gives an instruction." + "From the ChangeLog of vortex-shell, release 0.1.0." + , example Nonsense "Our open source" [] + "No finite verb means no clause and no force, so the button neither states anything nor asks the visitor to do anything." + "A button on the openfp.net front page." + ] + Mood -> + [ example Clear "This would have caught the dead buttons." + [MkReading "[ASR·COU·PFV]" "it did not catch them, and it would have if it had been in place"] + "COU: the event is known not to have happened." + "From the unsafePerformApocalypse estate plan." + , example Ambiguous "A local definition could replace one part of a shipped loop." + [ MkReading "[ASR·HAB·ABL·POS]" "a fact: a local definition is able to do this today" + , MkReading "[ASR·HYP·HAB·ABL·POS]" "a proposal: a local definition might do this, if it is adopted" + ] + "FAC or HYP: the codes decide whether the claim is put forward as fact or only considered." + "From the introduction of the Vortex manual." + ] + Aspect -> + [ example Clear "Added a console that preserves bindings between commands." + [MkReading "[ASR·PFV] [ASR·HAB]/rel1" "the release added the console, and preserving bindings is what the console does"] + "PFV against HAB: the adding is one event, and the preserving is standing behaviour." + "From the Quality Control Handbook, CLG.ChooseEntryForms." + , example Ambiguous "Keep branch" + [ MkReading "[DIR·PFV]" "one act: choose not to delete the branch" + , MkReading "[DIR·PRG]" "a state kept up: hold the branch in place" + ] + "PFV or PRG: the codes decide whether the button is one act or a state to maintain." + "A button in the NixLab web interface." + ] + Phase -> + [ example Clear "A project or group called `sw.js` is not yet refused." + [MkReading "[ASR·HAB·EXP]" "not refused before the release or in it, and refusal is expected later"] + "EXP: false before the release, false after it, and expected to change." + "From the ChangeLog of nixlab-shell, release 0.98.0.0." + , example Ambiguous "The forge keeps this picture now." + [ MkReading "[ASR·HAB·INC]" "the forge did not keep it before, and keeps it from now on" + , MkReading "[ASR·HAB]" "the forge keeps the picture, with nothing said about before" + ] + "INC or no phase: the codes decide whether keeping the picture is new." + "A message in the NixLab web interface." + , example Nonsense "Removed the legacy importer, which reads the old export format." [] + "The relative clause says the importer still reads the format after the release, but the same release removed it." + "From the Quality Control Handbook, CLG.DescribeAddedThingsInPresent." + ] + Modality -> + [ example Clear "Callers of `runScript` must now pass a `Charge` record." + [MkReading "[ASR·HAB·INC·DEO·NEC]" "a rule now requires callers to pass one"] + "DEO·NEC: a rule requires it." + "From the Quality Control Handbook, CLG.StateReaderObligations." + , example Ambiguous "A site's `root` may now be a package or an absolute path." + [ MkReading "[ASR·HAB·INC·DEO·POS]" "a rule now allows either" + , MkReading "[ASR·HAB·INC·ABL·POS]" "the program can now take either" + ] + "DEO or ABL: the codes decide whether a rule allows it or the program is able to do it." + "From the ChangeLog of skettis, release 0.2.60." + ] + Negation -> + [ example Clear "Maintainers must not edit the generated file by hand." + [MkReading "[ASR·HAB·DEO·NEC·NEG]" "a rule requires that they do not edit it"] + "NEG after DEO·NEC negates the edit, not the rule, so the sentence prohibits editing." + "From the Quality Control Handbook, QC.ClarifyExceptionsAndNegation." + ] + Bound -> + [ example Clear "The store now imports the SQLite review and sign-off tables once, at its first use." + [MkReading "[ASR·PFV·INC·ONE]" "a one-off import, new in this release, at the store's first use"] + "ONE: the import happens one time in the program's life." + "From the ChangeLog of nixlab-shell, release 0.122.0.0." + , example Ambiguous "`MovesNotFollowed` or `CheckpointFailed` after the import is reported once and tried again with the next to-do call." + [ MkReading "[ASR·PFV·ONE] [ASR·HAB] {import: BSC}" "the error is reported one time only" + , MkReading "[ASR·HAB] [ASR·HAB] {import: BSC}" "the error is reported once for each failure" + ] + "ONE or none: the codes decide whether the report happens one time ever or each time." + "From the deployment guide of systems/shattrath." + ] + Evidence -> + [ example Clear "Median startup time fell from 800 ms to 200 ms with a warm library cache in the recorded benchmark." + [MkReading "[ASR·PFV·PUP]" "a measured fall, which the recorded benchmark lets anyone check"] + "PUP: a record someone else can check backs the figure." + "From the Quality Control Handbook, CLG.ChooseEntryForms." + , example Ambiguous "Median startup time fell from 800 ms to 200 ms" + [ MkReading "[ASR·PFV]" "a fall, with nothing said about how it is known" + , MkReading "[ASR·PFV·OBS]" "a fall the author measured" + ] + "OBS or no evidence: the codes decide whether anyone measured the fall." + "From the Quality Control Handbook, CLG.DescribeAddedThingsInPresent." + ] + Nominalisation -> + [ example Clear "On first start the forge now imports every review from the SQLite database once." + [MkReading "[ASR·PFV·INC·ONE] {review: OBJ}" "a review here is a record, what reviewing produced"] + "OBJ: review names the record, not the act of reviewing." + "From the Quality Control Handbook, CLG.DescribeAddedThingsInPresent." + ] + where + example :: Verdict -> MisoString -> [Reading] -> MisoString -> MisoString -> LayerExample + example v s rs = MkLayerExample v (MkExample (verdictName v) s rs) -- | The handbook's contrast for CLG.DescribeAddedThingsInPresent as a -- minimal pair. diff --git a/dreamstop-openfp-net-web/src/Site/View.hs b/dreamstop-openfp-net-web/src/Site/View.hs index 72bf714..c6f0dc5 100644 @@ -1,7 +1,9 @@ +-- | The page's body: what dreamstop is, a clear ChangeLog entry, a menu of +-- examples for each codepoint layer, a minimal pair, and the manual. -- Every word is in the rendered HTML, so the page reads in full without +-- JavaScript: the render shows every layer's examples, and the stylesheet +-- shows only the selected layer once the script runs. Every sentence of +-- prose is annotated in prose/front.vx. -- -- @since 0.1.0.0 module Site.View @@ -15,44 +17,68 @@ import Data.Kind (Type) import Data.List (groupBy) import DesignKit.Brand (fontDisplay, gradientText) import DesignKit.Effects (scrollProgressBar) -import Miso (App, Effect, component) -import Miso.Html.Element (a_, blockquote_, code_, div_, footer_, h1_, - h2_, h3_, header_, li_, nav_, ol_, p_, - section_, span_, ul_) -import Miso.Html.Property (aria_, href_, id_) +import Miso (App, Effect, component, io_) +import Miso.Event.Types (KeyCode (KeyCode)) +import Miso.FFI (focus) +import Miso.Html.Element (a_, blockquote_, button_, code_, div_, + footer_, h1_, h2_, h3_, h4_, header_, li_, + nav_, ol_, p_, section_, span_, ul_) +import Miso.Html.Event (onClick, onKeyDown) +import Miso.Html.Property (aria_, href_, id_, role_, tabindex_, type_) import Miso.Property (classList) +import Miso.State (put) import Miso.String (MisoString, fromMisoString, toMisoString) import Miso.Types (View, text) -import Site.Content (Example (exampleLabel, exampleReadings, exampleSentence), +import Site.Content (Entry (entryHeading, entrySentences, entrySource), + Example (exampleLabel, exampleReadings, exampleSentence), + Layer, + LayerExample (layerDecides, layerExample, layerSource), Reading (readingCodes, readingGloss), - manual, modalities, package, pair, - pairSlot, repository, verdicts) + entry, layerExamples, layerName, layers, + manual, package, pair, pairSlot, + repository) import Site.Page (name) +-- | The layer whose examples the menu shows. -- -- @since 0.1.0.0 type Model :: Type -data Model = MkModel +newtype Model = MkModel Layer deriving stock (Eq) +-- | Selecting a layer, by a click or by a key on its tab. -- -- @since 0.1.0.0 type Action :: Type data Action + = Select Layer + | Key Layer KeyCode +-- | Rendered and hydrated with the same view, the first layer selected. -- -- @since 0.1.0.0 app :: App Model Action -app = component MkModel update (const view) +app = component (MkModel minBound) update (const view) update :: Action -> Effect parent props Model Action -update = \case {} +update = \case + Select l -> put (MkModel l) + Key l (KeyCode k) -> case k of + 37 -> go (step (-1) l) + 39 -> go (step 1 l) + 36 -> go minBound + 35 -> go maxBound + _ -> pure () + where + go :: Layer -> Effect parent props Model Action + go l = put (MkModel l) >> io_ (focus (tabId l)) + +-- | The layer @n@ places along the menu, wrapping at either end. +step :: Int -> Layer -> Layer +step n l = toEnum ((fromEnum l + n) `mod` length layers) view :: Model -> View Model Action -view _ = +view (MkModel selected) = div_ [classList ["page"]] [ scrollProgressBar @@ -78,9 +104,6 @@ view _ = [] [ "dreamstop is a language for disambiguating text. \ \It checks that a piece of writing very likely means only one thing. \ - \A program marks up every clause with three-letter codepoints that identify its grammatical meaning: \ - \whether it states something or tells you to do something, whether it is done or still happening, \ - \whether it is required or only allowed. \ \A sentence is clear when there is only one way to read it. \ \It is ambiguous when there is more than one way to read it, and it is nonsense when there is no way to read it." ] @@ -89,15 +112,28 @@ view _ = [a_ [classList ["btn"], id_ "manual", href_ manual] ["Read the manual"]] ] ] + , section_ + [classList ["band"], id_ "entry"] + [ div_ + [classList ["container"]] + [ h2_ [classList ["section-title"], fontDisplay] ["A clear ChangeLog entry"] + , div_ + [classList ["changelog"]] + [ p_ [classList ["entry-heading"]] [text (entryHeading entry)] + , ul_ [classList ["entry-bullets"]] (map bullet (entrySentences entry)) + ] + , p_ [classList ["source"]] [text (entrySource entry)] + ] + ] , section_ [classList ["band"], id_ "verdicts"] [ div_ [classList ["container"]] [ h2_ [classList ["section-title"], fontDisplay] ["Clear, ambiguous or nonsense"] - , legend - , ul_ [classList ["readings"]] (map example verdicts) - , h2_ [classList ["section-title"], fontDisplay] ["Required or only allowed"] - , ul_ [classList ["readings"]] (map example modalities) + , div_ + [classList ["tabs"], role_ "tablist", aria_ "label" "Codepoint layers"] + (map tab layers) + , div_ [classList ["panels"]] (map panel layers) ] ] , section_ @@ -112,13 +148,8 @@ view _ = , p_ [classList ["annotation"]] [text pairSlot] , p_ [] - [ "Each document kind is a set of patterns, specified by its pairs. \ - \A pattern with no pair is not part of the kind." - ] - , p_ - [] - [ "The manual covers every code, the clause positions, the verdicts, the questions, the six document kinds and how reviews use them. " - , "The dreamstop package in dreamstop/dreamstop checks every pair of a kind against its patterns." + [ "Each kind of document, such as a ChangeLog, a README or a manual, has its own rules about which sentence shapes it allows. \ + \Every rule comes with examples: a sentence that breaks it and the smallest edit that fixes it." ] ] ] @@ -143,6 +174,52 @@ view _ = wordmark :: View Model Action wordmark = a_ [classList ["wordmark"], href_ "/"] [text name] + bullet :: Example -> View Model Action + bullet e = + li_ + [] + (blockquote_ [classList ["entry"]] [text (exampleSentence e)] : readings (exampleReadings e)) + + tab :: Layer -> View Model Action + tab l = + button_ + [ type_ "button" + , role_ "tab" + , id_ (tabId l) + , aria_ "controls" (panelId l) + , aria_ "selected" (if l == selected then "true" else "false") + , tabindex_ (if l == selected then "0" else "-1") + , classList ["tab", layerClass l, if l == selected then "active" else "inactive"] + , onClick (Select l) + , onKeyDown (Key l) + ] + [text (layerName l)] + + panel :: Layer -> View Model Action + panel l = + div_ + [ role_ "tabpanel" + , id_ (panelId l) + , aria_ "labelledby" (tabId l) + , classList ["panel", if l == selected then "active" else "inactive"] + ] + [ h3_ [classList ["panel-title", layerClass l]] [text (layerName l)] + , ul_ [classList ["readings"]] (map layerCard (layerExamples l)) + ] + + layerCard :: LayerExample -> View Model Action + layerCard x = + li_ + [] + ( [ h4_ [] [text (exampleLabel (layerExample x))] + , blockquote_ [classList ["entry"]] [text (exampleSentence (layerExample x))] + ] + <> readings (exampleReadings (layerExample x)) + <> [ p_ [classList ["decides"]] [text (layerDecides x)] + , p_ [classList ["source"]] [text (layerSource x)] + ] + ) + example :: Example -> View Model Action example e = li_ @@ -165,13 +242,13 @@ view _ = reading :: Reading -> [View Model Action] reading r = [codepoints (readingCodes r), text (": " <> readingGloss r)] - legend :: View Model Action - legend = - ul_ - [classList ["legend"], aria_ "label" "Codepoint colours"] - [ li_ [classList [layerClass l]] [text l] - | l <- ["Force", "Mood", "Aspect", "Phase", "Modality", "Negation", "Bound", "Evidence", "Nominalisation"] - ] +-- | A layer's tab. +tabId :: Layer -> MisoString +tabId l = "tab-" <> layerName l + +-- | A layer's panel. +panelId :: Layer -> MisoString +panelId l = "panel-" <> layerName l -- | A reading's codes, each in its own class, which codepoints.css colours by -- the code's layer, with brackets, separators and positions in neutral grey. @@ -186,5 +263,5 @@ codepoints s = token w = span_ [classList [if length w == 3 && all isUpper w then "cp-" <> toMisoString w else "cp-mark"]] [text (toMisoString w)] -- | The CSS class of a layer. -layerClass :: MisoString -> MisoString -layerClass l = "cp-" <> l +layerClass :: Layer -> MisoString +layerClass l = "cp-" <> layerName l diff --git a/dreamstop.css b/dreamstop.css index ac4715b..91013b0 100644 @@ -126,5 +126,32 @@ ul.readings code { font-family: var(--font-mono); } * codepoints.css, printed from the layer table in nix/site.nix. */ ol.annotation { margin: .4rem 0 0; padding-left: 1.4rem; font-family: var(--font-mono); color: var(--muted); font-size: .85rem; } ol.annotation li { margin: .3rem 0; } -ul.legend { list-style: none; margin: 1rem 0 0; padding: 0; - display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-family: var(--font-mono); font-size: .85rem; font-weight: 700; } + +/* A clear ChangeLog entry: the release heading, then each bullet with its + * reading underneath. */ +.changelog { background: var(--bg); border: 1px solid var(--hair); border-radius: .6rem; padding: 1.3rem 1.5rem; } +.entry-heading { margin: 0; font-family: var(--font-mono); font-weight: 700; color: var(--title); } +ul.entry-bullets { list-style: none; margin: 0; padding: 0; } +ul.entry-bullets > li { margin: 1rem 0 0; } +ul.entry-bullets blockquote.entry { margin: 0 0 .4rem; } +p.source { margin: .6rem 0 0; color: var(--muted); font-size: .85rem; } + +/* The layer menu. Without JavaScript the tabs are hidden and every layer's + * panel shows under its own heading. With it, only the selected panel + * shows, and the tab names it. Tab colours come from codepoints.css. */ +.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.4rem 0 0; } +.tab { + font: inherit; font-family: var(--font-mono); font-weight: 700; font-size: .9rem; + background: var(--bg); border: 1px solid var(--hair); border-bottom-width: 3px; + border-radius: .5rem; padding: .45rem .8rem; cursor: pointer; +} +.tab.active { border-color: currentColor; } +.tab:hover { border-bottom-color: currentColor; } +.tab:focus-visible { outline: 2px solid var(--dk-600); outline-offset: 2px; } +.panel-title { font-family: var(--font-mono); font-size: 1.1rem; margin: 2rem 0 0; } +ul.readings h4 { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--title); + margin: .2rem 0 .4rem; } +ul.readings p.decides { color: var(--text); font-size: .9rem; } +html:not(.dk-js) .tabs { display: none; } +html.dk-js .panel.inactive { display: none; } +html.dk-js .panel-title { display: none; } diff --git a/nix/site.nix b/nix/site.nix index 596dc17..6203106 100644 @@ -198,6 +198,7 @@ local: flakeLock = ../flake.lock; horizonVx = ../horizon.vx; expect = [ + ''<div class="tabs" role="tablist" aria-label="Codepoint layers">'' ''<a class="btn" id="manual" href="manual/dreamstop.pdf">Read the manual</a>'' { absent = "Ithkuil"; } { absent = "Continuous Disambiguation"; } @@ -219,7 +220,13 @@ local: (meta "property" "og:image:type" "image/png") (meta "name" "twitter:card" "summary_large_image") ]; - nojsText = [ "Read the manual" ]; + nojsText = [ + "Read the manual" + "A clear ChangeLog entry" + "Added the required-package presence check" + "Our open source" + "On first start the forge now imports every review from the SQLite database once." + ]; }; cardCopy = pkgs.runCommand "dreamstop.openfp.net-card-copy" { } '' diff --git a/prose/front.vx b/prose/front.vx index 00fb5e5..bf40a18 100644 @@ -1,17 +1,15 @@ -- Every sentence of the dreamstop.openfp.net front page, with its dreamstop -- reading under the website kind: one clause per finite verb group, codes in -- display order, and each subordinate clause's position and parent after a +-- slash. Headings, navigation, button labels, the layer menu's tab names and +-- the sentences shown as examples, with their readings, glosses, the line +-- saying what the codes decide and their sources, are not prose and are not +-- listed. No check reads this file yet: review judges each reading. do sentence "[ASR·HAB]" "dreamstop is a language for disambiguating text." sentence "[ASR·HAB] [ASR·HAB]/comp1" "It checks that a piece of writing very likely means only one thing." - sentence "[ASR·HAB] [ASR·HAB]/rel1 [ASR·HAB]/comp2 [ASR·HAB]/comp2 [ASR·HAB]/comp2 [ASR·HAB]/comp2" "A program marks up every clause with three-letter codepoints that identify its grammatical meaning: whether it states something or tells you to do something, whether it is done or still happening, whether it is required or only allowed." sentence "[ASR·HAB] [ASR·HAB]/adv1" "A sentence is clear when there is only one way to read it." sentence "[ASR·HAB] [ASR·HAB]/adv1 [ASR·HAB] [ASR·HAB·NEG]/adv3" "It is ambiguous when there is more than one way to read it, and it is nonsense when there is no way to read it." sentence "[ASR·HAB] [ASR·HAB]/rel1 [ASR·HAB]/rel2 {edit: OBJ}" "A minimal pair is two sentences that differ by the smallest possible edit that makes the sentence clear." - sentence "[ASR·HAB]" "Each document kind is a set of patterns, specified by its pairs." - sentence "[ASR·HAB·NEG]" "A pattern with no pair is not part of the kind." - sentence "[ASR·HAB] [ASR·HAB]/comp1 {review: BSC}" "The manual covers every code, the clause positions, the verdicts, the questions, the six document kinds and how reviews use them." - sentence "[ASR·HAB]" "The dreamstop package in dreamstop/dreamstop checks every pair of a kind against its patterns." + sentence "[ASR·HAB] [ASR·HAB]/comp1" "Each kind of document, such as a ChangeLog, a README or a manual, has its own rules about which sentence shapes it allows." + sentence "[ASR·HAB] [ASR·HAB]/rel1 [ASR·HAB]/rel1 {edit: OBJ}" "Every rule comes with examples: a sentence that breaks it and the smallest edit that fixes it."