feat(web): split and compact home layouts (#71)
- commit
- f347d8a69e70ff6b308c481c06d53962c1e83692
- author
- brice · · 2026-10-18 17:39 UTC
- committer
- bnema · · 2026-10-18 17:39 UTC
- parent
- cdeae08
- signature
- SSH Unverified
SHA256:VOCA5lYARHcbKDZ7GhTV45VmcjWnJ6ZQIBazj17LivAThe key is unknown
50 files · +926 -250
M internal/adapters/web/ASSETS.md +2 -1
| @@ -8,6 +8,7 @@ content-hashed names. Nothing is fetched at runtime. | |||
| 8 | 8 | | `static/js/htmx.min.js` | htmx 4.0.0 (BSD Zero Clause, `static/js/htmx-LICENSE`) | `mockups/assets/htmx/htmx.min.js` of the design | `e484d9171a9db30a39c8f16e3d709d4137f3211c659f8e6125816635033d593f` | | |
| 9 | 9 | | `static/js/hx-live.min.js` | htmx 4 `hx-live` extension | `mockups/assets/htmx/ext/hx-live.min.js` | `adf9b90949d57baf20dc2eaf1d1fd46c81347ac82c090a5e2912ce6b37726734` | | |
| 10 | 10 | | `static/js/hx-sse.min.js` | htmx 4 `hx-sse` extension | `mockups/assets/htmx/ext/hx-sse.min.js` | `8a834680c4000a9034d79228872372a92e140c810a075cb6d4a76690dfc13085` | | |
| 11 | + | | `static/js/store.js` | the localStorage client of the scripts: preferences such as the home layout and the single-key shortcuts (`window.ermiteStore`, tested in Node by `jstest/store.test.mjs`) | written here | | | |
| 11 | 12 | | `static/js/ermite.js` | key sequences to `k-*` events, the functions the keys and inputs call (`window.ermite`), the live fragments (`ermiteLive`), the diff table of contents observer | `mockups/d/js/ermite.js`, extended here | | | |
| 12 | 13 | | `static/js/log.js` | the live log of a running job (`window.ermiteLog`, tested in Node by `jstest/log.test.mjs`) | written here | | | |
| 13 | 14 | | `static/js/files.js` | the Files view: a tree whose directories open in place and walk by keyboard (`window.ermiteTree`, tested in Node by `jstest/tree.test.mjs`), the fuzzy file finder and the palette's file hits (`window.ermiteFinder`; its core is tested in Node by `jstest/files.test.mjs`) | written here | | | |
| @@ -16,7 +17,7 @@ content-hashed names. Nothing is fetched at runtime. | |||
| 16 | 17 | | `static/css/*.css` | native CSS, served as one stylesheet in name order; relative `url(fonts/…)` and `url(icons/…)` become hashed URLs | written here | | | |
| 17 | 18 | | `static/fonts/atkinson-next.woff2`, `atkinson-next-italic.woff2` | Atkinson Hyperlegible Next, variable weight, latin subset (SIL OFL 1.1, `static/fonts/OFL-next.txt`) | Google Fonts | `18b2a1a39a2fa298b0ba5390aca68462669826c90925656f1c1f6796e0e1bbaf`, `4a5037bfaf6680f40147407407ec09fa42925774bde809a579283d27f9f08106` | | |
| 18 | 19 | | `static/fonts/atkinson-mono.woff2` | Atkinson Hyperlegible Mono, variable weight, latin subset (SIL OFL 1.1, `static/fonts/OFL-mono.txt`) | Google Fonts | `2706b1ee4f452e744ea91f7e4908cbde9c5d35521bf5ffffc71a382a2de89613` | | |
| 19 | - | | `static/icons/*.svg` | interface icons, used as CSS masks; `brand.svg` is a grey picture shown as is. Only the icons in use are copied, one file each: `branch`, `search`, `tag`, `file`, `chevron`, `user`, `key`, `log-in`, `log-out` are Lucide 1.8 (`git-branch`, `search`, `tag`, `file-text`, `chevron-down`, `user-round`, `key-round`, `log-in`, `log-out`; ISC, https://lucide.dev/license) | Lucide; `brand.svg` written here | | | |
| 20 | + | | `static/icons/*.svg` | interface icons, used as CSS masks; `brand.svg` is a grey picture shown as is. Only the icons in use are copied, one file each: `branch`, `search`, `tag`, `file`, `chevron`, `user`, `key`, `log-in`, `log-out`, `cards`, `split`, `compact` are Lucide 1.8 (`git-branch`, `search`, `tag`, `file-text`, `chevron-down`, `user-round`, `key-round`, `log-in`, `log-out`, `rows-2`, `columns-2`, `list`; ISC, https://lucide.dev/license) | Lucide; `brand.svg` written here | | | |
| 20 | 21 | | `static/app/*.png` | icons of the installed web app (manifest, `apple-touch-icon`), rendered from `brand.svg` with resvg; the maskable and Apple icons have the picture in the safe zone on `#181818` | generated here | | | |
| 21 | 22 | | `static/sw.js` | the service worker of the installed app: a network-only passthrough (no cache), served at `/-/sw.js` with `Service-Worker-Allowed: /` and revalidated on each check (not a hashed asset) | written here | | | |
| 22 | 23 | | `static/rules.json` | speculation rules: prefetch the light same-origin pages on hover (`Speculation-Rules` header); the heavy ones (tree, blob, commit, commits, compare, refs, raw, MR "since") are excluded, each costs several Git reads on the server | written here | | | |
| @@ -8,6 +8,7 @@ content-hashed names. Nothing is fetched at runtime. | |||||
| 8 | | `static/js/htmx.min.js` | htmx 4.0.0 (BSD Zero Clause, `static/js/htmx-LICENSE`) | `mockups/assets/htmx/htmx.min.js` of the design | `e484d9171a9db30a39c8f16e3d709d4137f3211c659f8e6125816635033d593f` | | 8 | | `static/js/htmx.min.js` | htmx 4.0.0 (BSD Zero Clause, `static/js/htmx-LICENSE`) | `mockups/assets/htmx/htmx.min.js` of the design | `e484d9171a9db30a39c8f16e3d709d4137f3211c659f8e6125816635033d593f` | | ||
| 9 | | `static/js/hx-live.min.js` | htmx 4 `hx-live` extension | `mockups/assets/htmx/ext/hx-live.min.js` | `adf9b90949d57baf20dc2eaf1d1fd46c81347ac82c090a5e2912ce6b37726734` | | 9 | | `static/js/hx-live.min.js` | htmx 4 `hx-live` extension | `mockups/assets/htmx/ext/hx-live.min.js` | `adf9b90949d57baf20dc2eaf1d1fd46c81347ac82c090a5e2912ce6b37726734` | | ||
| 10 | | `static/js/hx-sse.min.js` | htmx 4 `hx-sse` extension | `mockups/assets/htmx/ext/hx-sse.min.js` | `8a834680c4000a9034d79228872372a92e140c810a075cb6d4a76690dfc13085` | | 10 | | `static/js/hx-sse.min.js` | htmx 4 `hx-sse` extension | `mockups/assets/htmx/ext/hx-sse.min.js` | `8a834680c4000a9034d79228872372a92e140c810a075cb6d4a76690dfc13085` | | ||
| 11 | + | | `static/js/store.js` | the localStorage client of the scripts: preferences such as the home layout and the single-key shortcuts (`window.ermiteStore`, tested in Node by `jstest/store.test.mjs`) | written here | | | |||
| 11 | | `static/js/ermite.js` | key sequences to `k-*` events, the functions the keys and inputs call (`window.ermite`), the live fragments (`ermiteLive`), the diff table of contents observer | `mockups/d/js/ermite.js`, extended here | | | 12 | | `static/js/ermite.js` | key sequences to `k-*` events, the functions the keys and inputs call (`window.ermite`), the live fragments (`ermiteLive`), the diff table of contents observer | `mockups/d/js/ermite.js`, extended here | | | ||
| 12 | | `static/js/log.js` | the live log of a running job (`window.ermiteLog`, tested in Node by `jstest/log.test.mjs`) | written here | | | 13 | | `static/js/log.js` | the live log of a running job (`window.ermiteLog`, tested in Node by `jstest/log.test.mjs`) | written here | | | ||
| 13 | | `static/js/files.js` | the Files view: a tree whose directories open in place and walk by keyboard (`window.ermiteTree`, tested in Node by `jstest/tree.test.mjs`), the fuzzy file finder and the palette's file hits (`window.ermiteFinder`; its core is tested in Node by `jstest/files.test.mjs`) | written here | | | 14 | | `static/js/files.js` | the Files view: a tree whose directories open in place and walk by keyboard (`window.ermiteTree`, tested in Node by `jstest/tree.test.mjs`), the fuzzy file finder and the palette's file hits (`window.ermiteFinder`; its core is tested in Node by `jstest/files.test.mjs`) | written here | | | ||
| @@ -16,7 +17,7 @@ content-hashed names. Nothing is fetched at runtime. | |||||
| 16 | | `static/css/*.css` | native CSS, served as one stylesheet in name order; relative `url(fonts/…)` and `url(icons/…)` become hashed URLs | written here | | | 17 | | `static/css/*.css` | native CSS, served as one stylesheet in name order; relative `url(fonts/…)` and `url(icons/…)` become hashed URLs | written here | | | ||
| 17 | | `static/fonts/atkinson-next.woff2`, `atkinson-next-italic.woff2` | Atkinson Hyperlegible Next, variable weight, latin subset (SIL OFL 1.1, `static/fonts/OFL-next.txt`) | Google Fonts | `18b2a1a39a2fa298b0ba5390aca68462669826c90925656f1c1f6796e0e1bbaf`, `4a5037bfaf6680f40147407407ec09fa42925774bde809a579283d27f9f08106` | | 18 | | `static/fonts/atkinson-next.woff2`, `atkinson-next-italic.woff2` | Atkinson Hyperlegible Next, variable weight, latin subset (SIL OFL 1.1, `static/fonts/OFL-next.txt`) | Google Fonts | `18b2a1a39a2fa298b0ba5390aca68462669826c90925656f1c1f6796e0e1bbaf`, `4a5037bfaf6680f40147407407ec09fa42925774bde809a579283d27f9f08106` | | ||
| 18 | | `static/fonts/atkinson-mono.woff2` | Atkinson Hyperlegible Mono, variable weight, latin subset (SIL OFL 1.1, `static/fonts/OFL-mono.txt`) | Google Fonts | `2706b1ee4f452e744ea91f7e4908cbde9c5d35521bf5ffffc71a382a2de89613` | | 19 | | `static/fonts/atkinson-mono.woff2` | Atkinson Hyperlegible Mono, variable weight, latin subset (SIL OFL 1.1, `static/fonts/OFL-mono.txt`) | Google Fonts | `2706b1ee4f452e744ea91f7e4908cbde9c5d35521bf5ffffc71a382a2de89613` | | ||
| 19 | - | | `static/icons/*.svg` | interface icons, used as CSS masks; `brand.svg` is a grey picture shown as is. Only the icons in use are copied, one file each: `branch`, `search`, `tag`, `file`, `chevron`, `user`, `key`, `log-in`, `log-out` are Lucide 1.8 (`git-branch`, `search`, `tag`, `file-text`, `chevron-down`, `user-round`, `key-round`, `log-in`, `log-out`; ISC, https://lucide.dev/license) | Lucide; `brand.svg` written here | | | 20 | + | | `static/icons/*.svg` | interface icons, used as CSS masks; `brand.svg` is a grey picture shown as is. Only the icons in use are copied, one file each: `branch`, `search`, `tag`, `file`, `chevron`, `user`, `key`, `log-in`, `log-out`, `cards`, `split`, `compact` are Lucide 1.8 (`git-branch`, `search`, `tag`, `file-text`, `chevron-down`, `user-round`, `key-round`, `log-in`, `log-out`, `rows-2`, `columns-2`, `list`; ISC, https://lucide.dev/license) | Lucide; `brand.svg` written here | | |
| 20 | | `static/app/*.png` | icons of the installed web app (manifest, `apple-touch-icon`), rendered from `brand.svg` with resvg; the maskable and Apple icons have the picture in the safe zone on `#181818` | generated here | | | 21 | | `static/app/*.png` | icons of the installed web app (manifest, `apple-touch-icon`), rendered from `brand.svg` with resvg; the maskable and Apple icons have the picture in the safe zone on `#181818` | generated here | | | ||
| 21 | | `static/sw.js` | the service worker of the installed app: a network-only passthrough (no cache), served at `/-/sw.js` with `Service-Worker-Allowed: /` and revalidated on each check (not a hashed asset) | written here | | | 22 | | `static/sw.js` | the service worker of the installed app: a network-only passthrough (no cache), served at `/-/sw.js` with `Service-Worker-Allowed: /` and revalidated on each check (not a hashed asset) | written here | | | ||
| 22 | | `static/rules.json` | speculation rules: prefetch the light same-origin pages on hover (`Speculation-Rules` header); the heavy ones (tree, blob, commit, commits, compare, refs, raw, MR "since") are excluded, each costs several Git reads on the server | written here | | | 23 | | `static/rules.json` | speculation rules: prefetch the light same-origin pages on hover (`Speculation-Rules` header); the heavy ones (tree, blob, commit, commits, compare, refs, raw, MR "since") are excluded, each costs several Git reads on the server | written here | | | ||
M internal/adapters/web/assets.go +2 -1
| @@ -24,7 +24,7 @@ const StaticPrefix = "/-/static/" | |||
| 24 | 24 | // Assets are the URLs of the assets a page loads. Their names carry a hash of | |
| 25 | 25 | // the content, so they can be cached for ever. | |
| 26 | 26 | type Assets struct { | |
| 27 | - | CSS, HTMX, Live, SSE, App, Files, Passkey, Log, MR, Icon string | |
| 27 | + | CSS, HTMX, Live, SSE, Store, App, Files, Passkey, Log, MR, Icon string | |
| 28 | 28 | // Manifest is the web app manifest (install on a phone's home screen), | |
| 29 | 29 | // AppleIcon the home screen icon iOS reads from a link instead. | |
| 30 | 30 | Manifest, AppleIcon string | |
| @@ -59,6 +59,7 @@ var scripts = []struct { | |||
| 59 | 59 | {"htmx.min.js", func(a *Assets, u string) { a.HTMX = u }}, | |
| 60 | 60 | {"hx-live.min.js", func(a *Assets, u string) { a.Live = u }}, | |
| 61 | 61 | {"hx-sse.min.js", func(a *Assets, u string) { a.SSE = u }}, | |
| 62 | + | {"store.js", func(a *Assets, u string) { a.Store = u }}, | |
| 62 | 63 | {"ermite.js", func(a *Assets, u string) { a.App = u }}, | |
| 63 | 64 | {"files.js", func(a *Assets, u string) { a.Files = u }}, | |
| 64 | 65 | {"passkey.js", func(a *Assets, u string) { a.Passkey = u }}, | |
| @@ -24,7 +24,7 @@ const StaticPrefix = "/-/static/" | |||||
| 24 | // Assets are the URLs of the assets a page loads. Their names carry a hash of | 24 | // Assets are the URLs of the assets a page loads. Their names carry a hash of | ||
| 25 | // the content, so they can be cached for ever. | 25 | // the content, so they can be cached for ever. | ||
| 26 | type Assets struct { | 26 | type Assets struct { | ||
| 27 | - | CSS, HTMX, Live, SSE, App, Files, Passkey, Log, MR, Icon string | 27 | + | CSS, HTMX, Live, SSE, Store, App, Files, Passkey, Log, MR, Icon string |
| 28 | // Manifest is the web app manifest (install on a phone's home screen), | 28 | // Manifest is the web app manifest (install on a phone's home screen), | ||
| 29 | // AppleIcon the home screen icon iOS reads from a link instead. | 29 | // AppleIcon the home screen icon iOS reads from a link instead. | ||
| 30 | Manifest, AppleIcon string | 30 | Manifest, AppleIcon string | ||
| @@ -59,6 +59,7 @@ var scripts = []struct { | |||||
| 59 | {"htmx.min.js", func(a *Assets, u string) { a.HTMX = u }}, | 59 | {"htmx.min.js", func(a *Assets, u string) { a.HTMX = u }}, | ||
| 60 | {"hx-live.min.js", func(a *Assets, u string) { a.Live = u }}, | 60 | {"hx-live.min.js", func(a *Assets, u string) { a.Live = u }}, | ||
| 61 | {"hx-sse.min.js", func(a *Assets, u string) { a.SSE = u }}, | 61 | {"hx-sse.min.js", func(a *Assets, u string) { a.SSE = u }}, | ||
| 62 | + | {"store.js", func(a *Assets, u string) { a.Store = u }}, | |||
| 62 | {"ermite.js", func(a *Assets, u string) { a.App = u }}, | 63 | {"ermite.js", func(a *Assets, u string) { a.App = u }}, | ||
| 63 | {"files.js", func(a *Assets, u string) { a.Files = u }}, | 64 | {"files.js", func(a *Assets, u string) { a.Files = u }}, | ||
| 64 | {"passkey.js", func(a *Assets, u string) { a.Passkey = u }}, | 65 | {"passkey.js", func(a *Assets, u string) { a.Passkey = u }}, | ||
M internal/adapters/web/components.templ +1 -1
| @@ -74,7 +74,7 @@ templ HomeRowView(r HomeRow) { | |||
| 74 | 74 | <div><dt>commits</dt><dd>{ s.Commits }</dd></div> | |
| 75 | 75 | <div><dt>last 30 days</dt><dd>{ s.Recent }</dd></div> | |
| 76 | 76 | } | |
| 77 | - | <div> | |
| 77 | + | <div class="rs-active"> | |
| 78 | 78 | <dt>last activity</dt> | |
| 79 | 79 | if r.ActiveAt != "" { | |
| 80 | 80 | <dd><time datetime={ r.ActiveAt } title={ r.ActiveAt }>{ r.Active }</time></dd> | |
| @@ -74,7 +74,7 @@ templ HomeRowView(r HomeRow) { | |||||
| 74 | <div><dt>commits</dt><dd>{ s.Commits }</dd></div> | 74 | <div><dt>commits</dt><dd>{ s.Commits }</dd></div> | ||
| 75 | <div><dt>last 30 days</dt><dd>{ s.Recent }</dd></div> | 75 | <div><dt>last 30 days</dt><dd>{ s.Recent }</dd></div> | ||
| 76 | } | 76 | } | ||
| 77 | - | <div> | 77 | + | <div class="rs-active"> |
| 78 | <dt>last activity</dt> | 78 | <dt>last activity</dt> | ||
| 79 | if r.ActiveAt != "" { | 79 | if r.ActiveAt != "" { | ||
| 80 | <dd><time datetime={ r.ActiveAt } title={ r.ActiveAt }>{ r.Active }</time></dd> | 80 | <dd><time datetime={ r.ActiveAt } title={ r.ActiveAt }>{ r.Active }</time></dd> | ||
M internal/adapters/web/components_templ.go +1 -1 generated file: collapsed
M internal/adapters/web/home_test.go +24 -0
| @@ -320,3 +320,27 @@ func TestHomeRowsAreBoundedAndOrdered(t *testing.T) { | |||
| 320 | 320 | assert.LessOrEqual(t, int(peak.Load()), homeWorkers) | |
| 321 | 321 | assert.Greater(t, int(peak.Load()), 1, "the reads overlap") | |
| 322 | 322 | } | |
| 323 | + | ||
| 324 | + | // The page starts in the cards layout (a script applies the stored choice) and | |
| 325 | + | // offers the three layouts, "cards" pressed; the store loads before the app. | |
| 326 | + | func TestHomeOffersTheLayouts(t *testing.T) { | |
| 327 | + | t.Parallel() | |
| 328 | + | browse := homeBrowse(t) | |
| 329 | + | browse.EXPECT().ListCommits(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(ports.HistoryPage{Commits: homeCommits(t, 2)}, nil) | |
| 330 | + | srv := newTestServer(t, Config{Repos: reposServing(t, pushedRepo(t, "proj")), Browse: browse}) | |
| 331 | + | ||
| 332 | + | rec := httptest.NewRecorder() | |
| 333 | + | srv.ServeHTTP(rec, httptest.NewRequest(http.MethodGet, "/", nil)) | |
| 334 | + | require.Equal(t, http.StatusOK, rec.Code) | |
| 335 | + | body := rec.Body.String() | |
| 336 | + | assert.Contains(t, body, `<div class="home" data-layout="cards">`) | |
| 337 | + | assert.Contains(t, body, `<div class="layout-switch" role="group" aria-label="Layout" data-js>`) | |
| 338 | + | for layout, pressed := range map[string]string{"cards": "true", "split": "false", "compact": "false"} { | |
| 339 | + | assert.Contains(t, body, `data-set-layout="`+layout+`" aria-pressed="`+pressed+`"`) | |
| 340 | + | assert.Contains(t, body, `class="ico i-`+layout+`"`) | |
| 341 | + | } | |
| 342 | + | store := strings.Index(body, "/js/store.") | |
| 343 | + | app := strings.Index(body, "/js/ermite.") | |
| 344 | + | require.NotEqual(t, -1, store) | |
| 345 | + | assert.Less(t, store, app, "the store loads before the app script") | |
| 346 | + | } | |
| @@ -320,3 +320,27 @@ func TestHomeRowsAreBoundedAndOrdered(t *testing.T) { | |||||
| 320 | assert.LessOrEqual(t, int(peak.Load()), homeWorkers) | 320 | assert.LessOrEqual(t, int(peak.Load()), homeWorkers) | ||
| 321 | assert.Greater(t, int(peak.Load()), 1, "the reads overlap") | 321 | assert.Greater(t, int(peak.Load()), 1, "the reads overlap") | ||
| 322 | } | 322 | } | ||
| 323 | + | ||||
| 324 | + | // The page starts in the cards layout (a script applies the stored choice) and | |||
| 325 | + | // offers the three layouts, "cards" pressed; the store loads before the app. | |||
| 326 | + | func TestHomeOffersTheLayouts(t *testing.T) { | |||
| 327 | + | t.Parallel() | |||
| 328 | + | browse := homeBrowse(t) | |||
| 329 | + | browse.EXPECT().ListCommits(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(ports.HistoryPage{Commits: homeCommits(t, 2)}, nil) | |||
| 330 | + | srv := newTestServer(t, Config{Repos: reposServing(t, pushedRepo(t, "proj")), Browse: browse}) | |||
| 331 | + | ||||
| 332 | + | rec := httptest.NewRecorder() | |||
| 333 | + | srv.ServeHTTP(rec, httptest.NewRequest(http.MethodGet, "/", nil)) | |||
| 334 | + | require.Equal(t, http.StatusOK, rec.Code) | |||
| 335 | + | body := rec.Body.String() | |||
| 336 | + | assert.Contains(t, body, `<div class="home" data-layout="cards">`) | |||
| 337 | + | assert.Contains(t, body, `<div class="layout-switch" role="group" aria-label="Layout" data-js>`) | |||
| 338 | + | for layout, pressed := range map[string]string{"cards": "true", "split": "false", "compact": "false"} { | |||
| 339 | + | assert.Contains(t, body, `data-set-layout="`+layout+`" aria-pressed="`+pressed+`"`) | |||
| 340 | + | assert.Contains(t, body, `class="ico i-`+layout+`"`) | |||
| 341 | + | } | |||
| 342 | + | store := strings.Index(body, "/js/store.") | |||
| 343 | + | app := strings.Index(body, "/js/ermite.") | |||
| 344 | + | require.NotEqual(t, -1, store) | |||
| 345 | + | assert.Less(t, store, app, "the store loads before the app script") | |||
| 346 | + | } | |||
M internal/adapters/web/jstest/a11y.test.mjs +17 -1
| @@ -49,13 +49,15 @@ doc.querySelectorAll = () => []; // the page-wide queries of the top of ermite.j | |||
| 49 | 49 | doc.querySelector = () => null; | |
| 50 | 50 | ||
| 51 | 51 | const store = new Map(); | |
| 52 | - | globalThis.localStorage = { getItem: (k) => store.get(k) ?? null, setItem: (k, v) => store.set(k, String(v)) }; | |
| 52 | + | globalThis.localStorage = { getItem: (k) => store.get(k) ?? null, setItem: (k, v) => store.set(k, String(v)), removeItem: (k) => store.delete(k) }; | |
| 53 | 53 | const listeners = {}; | |
| 54 | 54 | globalThis.addEventListener = (type, f) => (listeners[type] ||= []).push(f); | |
| 55 | + | globalThis.removeEventListener = (type, f) => { listeners[type] = (listeners[type] || []).filter((g) => g !== f); }; | |
| 55 | 56 | globalThis.scrollTo = () => {}; | |
| 56 | 57 | globalThis.fetch = async () => ({ ok: true, json: async () => ({ paths: ['cmd/main.go', 'README.md'] }) }); | |
| 57 | 58 | ||
| 58 | 59 | await import('../static/js/files.js'); | |
| 60 | + | await import('../static/js/store.js'); // loaded before ermite.js, as in the page | |
| 59 | 61 | await import('../static/js/ermite.js'); | |
| 60 | 62 | doc.querySelectorAll = query.all; | |
| 61 | 63 | doc.querySelector = query.one; | |
| @@ -304,6 +306,20 @@ test('shortcuts off: the checkbox, the note and the palette action show the stat | |||
| 304 | 306 | doc.querySelector = find; | |
| 305 | 307 | }); | |
| 306 | 308 | ||
| 309 | + | test('shortcuts off: another tab\'s change applies here', () => { | |
| 310 | + | // The browser has written the value before the event comes. | |
| 311 | + | const storage = (newValue) => { | |
| 312 | + | if (newValue === null) store.delete('keys-off'); else store.set('keys-off', newValue); | |
| 313 | + | listeners.storage.forEach((f) => f({ key: 'keys-off', newValue })); | |
| 314 | + | }; | |
| 315 | + | storage('1'); | |
| 316 | + | assert.equal(K.off(), true); | |
| 317 | + | storage(''); | |
| 318 | + | assert.equal(K.off(), false); | |
| 319 | + | storage(null); | |
| 320 | + | assert.equal(K.off(), false, 'removed: on'); | |
| 321 | + | }); | |
| 322 | + | ||
| 307 | 323 | test('the preference is read from storage when the page loads', async () => { | |
| 308 | 324 | store.set('keys-off', '1'); | |
| 309 | 325 | listeners.keydown = []; | |
| @@ -49,13 +49,15 @@ doc.querySelectorAll = () => []; // the page-wide queries of the top of ermite.j | |||||
| 49 | doc.querySelector = () => null; | 49 | doc.querySelector = () => null; | ||
| 50 | 50 | ||||
| 51 | const store = new Map(); | 51 | const store = new Map(); | ||
| 52 | - | globalThis.localStorage = { getItem: (k) => store.get(k) ?? null, setItem: (k, v) => store.set(k, String(v)) }; | 52 | + | globalThis.localStorage = { getItem: (k) => store.get(k) ?? null, setItem: (k, v) => store.set(k, String(v)), removeItem: (k) => store.delete(k) }; |
| 53 | const listeners = {}; | 53 | const listeners = {}; | ||
| 54 | globalThis.addEventListener = (type, f) => (listeners[type] ||= []).push(f); | 54 | globalThis.addEventListener = (type, f) => (listeners[type] ||= []).push(f); | ||
| 55 | + | globalThis.removeEventListener = (type, f) => { listeners[type] = (listeners[type] || []).filter((g) => g !== f); }; | |||
| 55 | globalThis.scrollTo = () => {}; | 56 | globalThis.scrollTo = () => {}; | ||
| 56 | globalThis.fetch = async () => ({ ok: true, json: async () => ({ paths: ['cmd/main.go', 'README.md'] }) }); | 57 | globalThis.fetch = async () => ({ ok: true, json: async () => ({ paths: ['cmd/main.go', 'README.md'] }) }); | ||
| 57 | 58 | ||||
| 58 | await import('../static/js/files.js'); | 59 | await import('../static/js/files.js'); | ||
| 60 | + | await import('../static/js/store.js'); // loaded before ermite.js, as in the page | |||
| 59 | await import('../static/js/ermite.js'); | 61 | await import('../static/js/ermite.js'); | ||
| 60 | doc.querySelectorAll = query.all; | 62 | doc.querySelectorAll = query.all; | ||
| 61 | doc.querySelector = query.one; | 63 | doc.querySelector = query.one; | ||
| @@ -304,6 +306,20 @@ test('shortcuts off: the checkbox, the note and the palette action show the stat | |||||
| 304 | doc.querySelector = find; | 306 | doc.querySelector = find; | ||
| 305 | }); | 307 | }); | ||
| 306 | 308 | ||||
| 309 | + | test('shortcuts off: another tab\'s change applies here', () => { | |||
| 310 | + | // The browser has written the value before the event comes. | |||
| 311 | + | const storage = (newValue) => { | |||
| 312 | + | if (newValue === null) store.delete('keys-off'); else store.set('keys-off', newValue); | |||
| 313 | + | listeners.storage.forEach((f) => f({ key: 'keys-off', newValue })); | |||
| 314 | + | }; | |||
| 315 | + | storage('1'); | |||
| 316 | + | assert.equal(K.off(), true); | |||
| 317 | + | storage(''); | |||
| 318 | + | assert.equal(K.off(), false); | |||
| 319 | + | storage(null); | |||
| 320 | + | assert.equal(K.off(), false, 'removed: on'); | |||
| 321 | + | }); | |||
| 322 | + | ||||
| 307 | test('the preference is read from storage when the page loads', async () => { | 323 | test('the preference is read from storage when the page loads', async () => { | ||
| 308 | store.set('keys-off', '1'); | 324 | store.set('keys-off', '1'); | ||
| 309 | listeners.keydown = []; | 325 | listeners.keydown = []; | ||
A internal/adapters/web/jstest/layout.test.mjs +139 -0
| @@ -0,0 +1,139 @@ | |||
| 1 | + | // Tests of the home page layout of static/js/ermite.js (window.ermiteLayout) | |
| 2 | + | // with store.js, on the small DOM of dom.mjs. Only the ermiteLayout block is | |
| 3 | + | // evaluated: the rest needs a page. Run with | |
| 4 | + | // node --test 'internal/adapters/web/jstest/*.test.mjs' | |
| 5 | + | import assert from 'node:assert/strict'; | |
| 6 | + | import { readFileSync } from 'node:fs'; | |
| 7 | + | import { beforeEach, test } from 'node:test'; | |
| 8 | + | import { el, installDom } from './dom.mjs'; | |
| 9 | + | ||
| 10 | + | const read = (f) => readFileSync(new URL('../static/js/' + f, import.meta.url), 'utf8'); | |
| 11 | + | const ermite = read('ermite.js'); | |
| 12 | + | const start = ermite.indexOf(' window.ermiteLayout = '); | |
| 13 | + | const block = ermite.slice(start, ermite.indexOf(' })();', start) + ' })();'.length); | |
| 14 | + | const storeSrc = read('store.js'); | |
| 15 | + | ||
| 16 | + | const doc = installDom(); | |
| 17 | + | let listeners; | |
| 18 | + | let storage; | |
| 19 | + | let fits; | |
| 20 | + | let home; | |
| 21 | + | let buttons; | |
| 22 | + | ||
| 23 | + | // A page: .home and the switch, with "cards" pressed as the server renders it. | |
| 24 | + | // Then store.js and the block are evaluated, as a page load does. | |
| 25 | + | function load({ stored, storageObj } = {}) { | |
| 26 | + | listeners = {}; | |
| 27 | + | fits = 0; | |
| 28 | + | storage = storageObj ?? new Map(stored ? Object.entries(stored) : []); | |
| 29 | + | globalThis.localStorage = storageObj ?? { | |
| 30 | + | getItem: (k) => (storage.has(k) ? storage.get(k) : null), | |
| 31 | + | setItem: (k, v) => { storage.set(k, String(v)); }, | |
| 32 | + | removeItem: (k) => { storage.delete(k); }, | |
| 33 | + | }; | |
| 34 | + | globalThis.addEventListener = (type, f) => (listeners[type] ||= []).push(f); | |
| 35 | + | globalThis.removeEventListener = (type, f) => { listeners[type] = (listeners[type] || []).filter((g) => g !== f); }; | |
| 36 | + | home = el('div', { cls: 'home', attrs: { 'data-layout': 'cards' } }); | |
| 37 | + | buttons = ['cards', 'split', 'compact'].map((v) => el('button', { | |
| 38 | + | cls: 'btn icon', attrs: { type: 'button', 'data-set-layout': v, 'aria-pressed': String(v === 'cards') }, | |
| 39 | + | })); | |
| 40 | + | const sw = el('div', { cls: 'layout-switch', attrs: { role: 'group', 'data-js': '' } }, ...buttons); | |
| 41 | + | doc.body.replaceChildren(sw, home); | |
| 42 | + | window.ermiteFit = { all: () => { fits++; } }; | |
| 43 | + | new Function(storeSrc)(); | |
| 44 | + | new Function(block)(); | |
| 45 | + | return window.ermiteLayout; | |
| 46 | + | } | |
| 47 | + | ||
| 48 | + | const pressed = () => buttons.map((b) => b.getAttribute('aria-pressed')); | |
| 49 | + | const click = (target) => listeners.click.forEach((f) => f({ target })); | |
| 50 | + | ||
| 51 | + | beforeEach(() => { delete globalThis.localStorage; }); | |
| 52 | + | ||
| 53 | + | test('with nothing stored the layout is cards, and the page is as rendered', () => { | |
| 54 | + | const L = load(); | |
| 55 | + | assert.equal(L.get(), 'cards'); | |
| 56 | + | assert.deepEqual(L.values, ['cards', 'split', 'compact']); | |
| 57 | + | assert.equal(home.getAttribute('data-layout'), 'cards'); | |
| 58 | + | assert.deepEqual(pressed(), ['true', 'false', 'false']); | |
| 59 | + | }); | |
| 60 | + | ||
| 61 | + | test('the stored layout is applied when the page loads', () => { | |
| 62 | + | const L = load({ stored: { 'home-layout': 'compact' } }); | |
| 63 | + | assert.equal(L.get(), 'compact'); | |
| 64 | + | assert.equal(home.getAttribute('data-layout'), 'compact'); | |
| 65 | + | assert.deepEqual(pressed(), ['false', 'false', 'true']); | |
| 66 | + | assert.ok(fits > 0, 'the chips are fitted again'); | |
| 67 | + | }); | |
| 68 | + | ||
| 69 | + | test('a stored value that is not a layout falls back to cards', () => { | |
| 70 | + | const L = load({ stored: { 'home-layout': 'grid' } }); | |
| 71 | + | assert.equal(L.get(), 'cards'); | |
| 72 | + | assert.equal(home.getAttribute('data-layout'), 'cards'); | |
| 73 | + | assert.deepEqual(pressed(), ['true', 'false', 'false']); | |
| 74 | + | }); | |
| 75 | + | ||
| 76 | + | test('set stores the layout, shows it and fits the chips again', () => { | |
| 77 | + | const L = load(); | |
| 78 | + | fits = 0; | |
| 79 | + | L.set('split'); | |
| 80 | + | assert.equal(storage.get('home-layout'), 'split'); | |
| 81 | + | assert.equal(home.getAttribute('data-layout'), 'split'); | |
| 82 | + | assert.deepEqual(pressed(), ['false', 'true', 'false']); | |
| 83 | + | assert.equal(fits, 1); | |
| 84 | + | L.set('nope'); | |
| 85 | + | assert.equal(L.get(), 'split', 'an unknown layout is ignored'); | |
| 86 | + | assert.equal(storage.get('home-layout'), 'split'); | |
| 87 | + | }); | |
| 88 | + | ||
| 89 | + | test('pressing a layout button sets it; other clicks do nothing', () => { | |
| 90 | + | const L = load(); | |
| 91 | + | click(buttons[2]); | |
| 92 | + | assert.equal(L.get(), 'compact'); | |
| 93 | + | assert.equal(home.getAttribute('data-layout'), 'compact'); | |
| 94 | + | assert.deepEqual(pressed(), ['false', 'false', 'true']); | |
| 95 | + | click(home); | |
| 96 | + | click({ closest: undefined }); | |
| 97 | + | assert.equal(L.get(), 'compact'); | |
| 98 | + | // a child of the button (an icon) counts as the button | |
| 99 | + | const icon = el('svg'); | |
| 100 | + | buttons[1].append(icon); | |
| 101 | + | click(icon); | |
| 102 | + | assert.equal(L.get(), 'split'); | |
| 103 | + | }); | |
| 104 | + | ||
| 105 | + | test("another tab's change applies live", () => { | |
| 106 | + | const L = load(); | |
| 107 | + | storage.set('home-layout', 'split'); | |
| 108 | + | listeners.storage.forEach((f) => f({ key: 'home-layout', newValue: 'split', storageArea: localStorage })); | |
| 109 | + | assert.equal(L.get(), 'split'); | |
| 110 | + | assert.equal(home.getAttribute('data-layout'), 'split'); | |
| 111 | + | assert.deepEqual(pressed(), ['false', 'true', 'false']); | |
| 112 | + | storage.delete('home-layout'); | |
| 113 | + | listeners.storage.forEach((f) => f({ key: 'home-layout', newValue: null, storageArea: localStorage })); | |
| 114 | + | assert.equal(home.getAttribute('data-layout'), 'cards', 'removed: back to the default'); | |
| 115 | + | listeners.storage.forEach((f) => f({ key: 'keys-off', newValue: '1', storageArea: localStorage })); | |
| 116 | + | assert.equal(home.getAttribute('data-layout'), 'cards'); | |
| 117 | + | }); | |
| 118 | + | ||
| 119 | + | test('a page without .home or without ermiteFit still works', () => { | |
| 120 | + | const L = load(); | |
| 121 | + | doc.body.replaceChildren(); | |
| 122 | + | delete window.ermiteFit; | |
| 123 | + | L.set('split'); | |
| 124 | + | assert.equal(L.get(), 'split'); | |
| 125 | + | L.apply(); | |
| 126 | + | }); | |
| 127 | + | ||
| 128 | + | test('without usable storage the choice holds for the page', () => { | |
| 129 | + | const refusing = { | |
| 130 | + | getItem: () => { throw new Error('denied'); }, | |
| 131 | + | setItem: () => { throw new Error('quota'); }, | |
| 132 | + | removeItem: () => { throw new Error('denied'); }, | |
| 133 | + | }; | |
| 134 | + | const L = load({ storageObj: refusing }); | |
| 135 | + | assert.equal(L.get(), 'cards'); | |
| 136 | + | click(buttons[1]); | |
| 137 | + | assert.equal(L.get(), 'split'); | |
| 138 | + | assert.equal(home.getAttribute('data-layout'), 'split'); | |
| 139 | + | }); | |
| @@ -0,0 +1,139 @@ | |||||
| 1 | + | // Tests of the home page layout of static/js/ermite.js (window.ermiteLayout) | |||
| 2 | + | // with store.js, on the small DOM of dom.mjs. Only the ermiteLayout block is | |||
| 3 | + | // evaluated: the rest needs a page. Run with | |||
| 4 | + | // node --test 'internal/adapters/web/jstest/*.test.mjs' | |||
| 5 | + | import assert from 'node:assert/strict'; | |||
| 6 | + | import { readFileSync } from 'node:fs'; | |||
| 7 | + | import { beforeEach, test } from 'node:test'; | |||
| 8 | + | import { el, installDom } from './dom.mjs'; | |||
| 9 | + | ||||
| 10 | + | const read = (f) => readFileSync(new URL('../static/js/' + f, import.meta.url), 'utf8'); | |||
| 11 | + | const ermite = read('ermite.js'); | |||
| 12 | + | const start = ermite.indexOf(' window.ermiteLayout = '); | |||
| 13 | + | const block = ermite.slice(start, ermite.indexOf(' })();', start) + ' })();'.length); | |||
| 14 | + | const storeSrc = read('store.js'); | |||
| 15 | + | ||||
| 16 | + | const doc = installDom(); | |||
| 17 | + | let listeners; | |||
| 18 | + | let storage; | |||
| 19 | + | let fits; | |||
| 20 | + | let home; | |||
| 21 | + | let buttons; | |||
| 22 | + | ||||
| 23 | + | // A page: .home and the switch, with "cards" pressed as the server renders it. | |||
| 24 | + | // Then store.js and the block are evaluated, as a page load does. | |||
| 25 | + | function load({ stored, storageObj } = {}) { | |||
| 26 | + | listeners = {}; | |||
| 27 | + | fits = 0; | |||
| 28 | + | storage = storageObj ?? new Map(stored ? Object.entries(stored) : []); | |||
| 29 | + | globalThis.localStorage = storageObj ?? { | |||
| 30 | + | getItem: (k) => (storage.has(k) ? storage.get(k) : null), | |||
| 31 | + | setItem: (k, v) => { storage.set(k, String(v)); }, | |||
| 32 | + | removeItem: (k) => { storage.delete(k); }, | |||
| 33 | + | }; | |||
| 34 | + | globalThis.addEventListener = (type, f) => (listeners[type] ||= []).push(f); | |||
| 35 | + | globalThis.removeEventListener = (type, f) => { listeners[type] = (listeners[type] || []).filter((g) => g !== f); }; | |||
| 36 | + | home = el('div', { cls: 'home', attrs: { 'data-layout': 'cards' } }); | |||
| 37 | + | buttons = ['cards', 'split', 'compact'].map((v) => el('button', { | |||
| 38 | + | cls: 'btn icon', attrs: { type: 'button', 'data-set-layout': v, 'aria-pressed': String(v === 'cards') }, | |||
| 39 | + | })); | |||
| 40 | + | const sw = el('div', { cls: 'layout-switch', attrs: { role: 'group', 'data-js': '' } }, ...buttons); | |||
| 41 | + | doc.body.replaceChildren(sw, home); | |||
| 42 | + | window.ermiteFit = { all: () => { fits++; } }; | |||
| 43 | + | new Function(storeSrc)(); | |||
| 44 | + | new Function(block)(); | |||
| 45 | + | return window.ermiteLayout; | |||
| 46 | + | } | |||
| 47 | + | ||||
| 48 | + | const pressed = () => buttons.map((b) => b.getAttribute('aria-pressed')); | |||
| 49 | + | const click = (target) => listeners.click.forEach((f) => f({ target })); | |||
| 50 | + | ||||
| 51 | + | beforeEach(() => { delete globalThis.localStorage; }); | |||
| 52 | + | ||||
| 53 | + | test('with nothing stored the layout is cards, and the page is as rendered', () => { | |||
| 54 | + | const L = load(); | |||
| 55 | + | assert.equal(L.get(), 'cards'); | |||
| 56 | + | assert.deepEqual(L.values, ['cards', 'split', 'compact']); | |||
| 57 | + | assert.equal(home.getAttribute('data-layout'), 'cards'); | |||
| 58 | + | assert.deepEqual(pressed(), ['true', 'false', 'false']); | |||
| 59 | + | }); | |||
| 60 | + | ||||
| 61 | + | test('the stored layout is applied when the page loads', () => { | |||
| 62 | + | const L = load({ stored: { 'home-layout': 'compact' } }); | |||
| 63 | + | assert.equal(L.get(), 'compact'); | |||
| 64 | + | assert.equal(home.getAttribute('data-layout'), 'compact'); | |||
| 65 | + | assert.deepEqual(pressed(), ['false', 'false', 'true']); | |||
| 66 | + | assert.ok(fits > 0, 'the chips are fitted again'); | |||
| 67 | + | }); | |||
| 68 | + | ||||
| 69 | + | test('a stored value that is not a layout falls back to cards', () => { | |||
| 70 | + | const L = load({ stored: { 'home-layout': 'grid' } }); | |||
| 71 | + | assert.equal(L.get(), 'cards'); | |||
| 72 | + | assert.equal(home.getAttribute('data-layout'), 'cards'); | |||
| 73 | + | assert.deepEqual(pressed(), ['true', 'false', 'false']); | |||
| 74 | + | }); | |||
| 75 | + | ||||
| 76 | + | test('set stores the layout, shows it and fits the chips again', () => { | |||
| 77 | + | const L = load(); | |||
| 78 | + | fits = 0; | |||
| 79 | + | L.set('split'); | |||
| 80 | + | assert.equal(storage.get('home-layout'), 'split'); | |||
| 81 | + | assert.equal(home.getAttribute('data-layout'), 'split'); | |||
| 82 | + | assert.deepEqual(pressed(), ['false', 'true', 'false']); | |||
| 83 | + | assert.equal(fits, 1); | |||
| 84 | + | L.set('nope'); | |||
| 85 | + | assert.equal(L.get(), 'split', 'an unknown layout is ignored'); | |||
| 86 | + | assert.equal(storage.get('home-layout'), 'split'); | |||
| 87 | + | }); | |||
| 88 | + | ||||
| 89 | + | test('pressing a layout button sets it; other clicks do nothing', () => { | |||
| 90 | + | const L = load(); | |||
| 91 | + | click(buttons[2]); | |||
| 92 | + | assert.equal(L.get(), 'compact'); | |||
| 93 | + | assert.equal(home.getAttribute('data-layout'), 'compact'); | |||
| 94 | + | assert.deepEqual(pressed(), ['false', 'false', 'true']); | |||
| 95 | + | click(home); | |||
| 96 | + | click({ closest: undefined }); | |||
| 97 | + | assert.equal(L.get(), 'compact'); | |||
| 98 | + | // a child of the button (an icon) counts as the button | |||
| 99 | + | const icon = el('svg'); | |||
| 100 | + | buttons[1].append(icon); | |||
| 101 | + | click(icon); | |||
| 102 | + | assert.equal(L.get(), 'split'); | |||
| 103 | + | }); | |||
| 104 | + | ||||
| 105 | + | test("another tab's change applies live", () => { | |||
| 106 | + | const L = load(); | |||
| 107 | + | storage.set('home-layout', 'split'); | |||
| 108 | + | listeners.storage.forEach((f) => f({ key: 'home-layout', newValue: 'split', storageArea: localStorage })); | |||
| 109 | + | assert.equal(L.get(), 'split'); | |||
| 110 | + | assert.equal(home.getAttribute('data-layout'), 'split'); | |||
| 111 | + | assert.deepEqual(pressed(), ['false', 'true', 'false']); | |||
| 112 | + | storage.delete('home-layout'); | |||
| 113 | + | listeners.storage.forEach((f) => f({ key: 'home-layout', newValue: null, storageArea: localStorage })); | |||
| 114 | + | assert.equal(home.getAttribute('data-layout'), 'cards', 'removed: back to the default'); | |||
| 115 | + | listeners.storage.forEach((f) => f({ key: 'keys-off', newValue: '1', storageArea: localStorage })); | |||
| 116 | + | assert.equal(home.getAttribute('data-layout'), 'cards'); | |||
| 117 | + | }); | |||
| 118 | + | ||||
| 119 | + | test('a page without .home or without ermiteFit still works', () => { | |||
| 120 | + | const L = load(); | |||
| 121 | + | doc.body.replaceChildren(); | |||
| 122 | + | delete window.ermiteFit; | |||
| 123 | + | L.set('split'); | |||
| 124 | + | assert.equal(L.get(), 'split'); | |||
| 125 | + | L.apply(); | |||
| 126 | + | }); | |||
| 127 | + | ||||
| 128 | + | test('without usable storage the choice holds for the page', () => { | |||
| 129 | + | const refusing = { | |||
| 130 | + | getItem: () => { throw new Error('denied'); }, | |||
| 131 | + | setItem: () => { throw new Error('quota'); }, | |||
| 132 | + | removeItem: () => { throw new Error('denied'); }, | |||
| 133 | + | }; | |||
| 134 | + | const L = load({ storageObj: refusing }); | |||
| 135 | + | assert.equal(L.get(), 'cards'); | |||
| 136 | + | click(buttons[1]); | |||
| 137 | + | assert.equal(L.get(), 'split'); | |||
| 138 | + | assert.equal(home.getAttribute('data-layout'), 'split'); | |||
| 139 | + | }); | |||
A internal/adapters/web/jstest/store.test.mjs +183 -0
| @@ -0,0 +1,183 @@ | |||
| 1 | + | // Tests of static/js/store.js (window.ermiteStore): the localStorage client, | |
| 2 | + | // evaluated alone against a fake storage. Run with | |
| 3 | + | // node --test 'internal/adapters/web/jstest/*.test.mjs' | |
| 4 | + | import assert from 'node:assert/strict'; | |
| 5 | + | import { readFileSync } from 'node:fs'; | |
| 6 | + | import { test } from 'node:test'; | |
| 7 | + | ||
| 8 | + | const src = readFileSync(new URL('../static/js/store.js', import.meta.url), 'utf8'); | |
| 9 | + | ||
| 10 | + | // load evaluates the file on a page whose storage is the given object (a | |
| 11 | + | // Map-backed one by default) and answers the store and the "storage" listeners. | |
| 12 | + | function load(storage = fakeStorage()) { | |
| 13 | + | const listeners = new Set(); | |
| 14 | + | const g = globalThis; | |
| 15 | + | g.window = g; | |
| 16 | + | if (storage === 'missing') delete g.localStorage; | |
| 17 | + | else g.localStorage = storage; | |
| 18 | + | g.addEventListener = (type, f) => { if (type === 'storage') listeners.add(f); }; | |
| 19 | + | g.removeEventListener = (type, f) => { if (type === 'storage') listeners.delete(f); }; | |
| 20 | + | new Function(src)(); | |
| 21 | + | const emit = (e) => [...listeners].forEach((f) => f({ storageArea: g.localStorage, ...e })); | |
| 22 | + | return { store: g.ermiteStore, listeners, emit }; | |
| 23 | + | } | |
| 24 | + | ||
| 25 | + | function fakeStorage() { | |
| 26 | + | const m = new Map(); | |
| 27 | + | return { | |
| 28 | + | m, | |
| 29 | + | getItem: (k) => (m.has(k) ? m.get(k) : null), | |
| 30 | + | setItem: (k, v) => { m.set(k, String(v)); }, | |
| 31 | + | removeItem: (k) => { m.delete(k); }, | |
| 32 | + | }; | |
| 33 | + | } | |
| 34 | + | ||
| 35 | + | const refusing = () => ({ | |
| 36 | + | getItem: () => { throw new Error('denied'); }, | |
| 37 | + | setItem: () => { throw new Error('quota'); }, | |
| 38 | + | removeItem: () => { throw new Error('denied'); }, | |
| 39 | + | }); | |
| 40 | + | ||
| 41 | + | test('get answers the stored value, else the fallback (null by default)', () => { | |
| 42 | + | const st = fakeStorage(); | |
| 43 | + | const { store } = load(st); | |
| 44 | + | assert.equal(store.get('k'), null); | |
| 45 | + | assert.equal(store.get('k', 'x'), 'x'); | |
| 46 | + | st.m.set('k', 'v'); | |
| 47 | + | assert.equal(store.get('k', 'x'), 'v'); | |
| 48 | + | st.m.set('k', ''); | |
| 49 | + | assert.equal(store.get('k', 'x'), '', 'an empty string is a value'); | |
| 50 | + | }); | |
| 51 | + | ||
| 52 | + | test('set stores strings; null and undefined remove; remove forgets', () => { | |
| 53 | + | const st = fakeStorage(); | |
| 54 | + | const { store } = load(st); | |
| 55 | + | store.set('k', 'v'); | |
| 56 | + | assert.equal(st.m.get('k'), 'v'); | |
| 57 | + | store.set('n', 3); | |
| 58 | + | assert.equal(st.m.get('n'), '3'); | |
| 59 | + | store.set('k', null); | |
| 60 | + | assert.equal(st.m.has('k'), false); | |
| 61 | + | store.set('k', 'v'); | |
| 62 | + | store.set('k', undefined); | |
| 63 | + | assert.equal(st.m.has('k'), false); | |
| 64 | + | store.remove('n'); | |
| 65 | + | assert.equal(store.get('n'), null); | |
| 66 | + | store.remove('nothing'); // no error | |
| 67 | + | }); | |
| 68 | + | ||
| 69 | + | test('without storage nothing throws and the value holds for the page', () => { | |
| 70 | + | const { store } = load('missing'); | |
| 71 | + | assert.equal(store.get('k', 'x'), 'x'); | |
| 72 | + | store.set('k', 'v'); | |
| 73 | + | assert.equal(store.get('k', 'x'), 'v'); | |
| 74 | + | store.remove('k'); | |
| 75 | + | assert.equal(store.get('k', 'x'), 'x'); | |
| 76 | + | }); | |
| 77 | + | ||
| 78 | + | test('a storage that refuses reads and writes does not throw either', () => { | |
| 79 | + | const { store } = load(refusing()); | |
| 80 | + | assert.equal(store.get('k', 'x'), 'x'); | |
| 81 | + | store.set('k', 'v'); | |
| 82 | + | assert.equal(store.get('k', 'x'), 'v', 'held in memory'); | |
| 83 | + | store.remove('k'); | |
| 84 | + | assert.equal(store.get('k', 'x'), 'x', 'removed for the page'); | |
| 85 | + | }); | |
| 86 | + | ||
| 87 | + | test('a quota error on write keeps the value for the page; a later write that works wins', () => { | |
| 88 | + | const st = fakeStorage(); | |
| 89 | + | const { store } = load(st); | |
| 90 | + | let full = true; | |
| 91 | + | st.setItem = (k, v) => { if (full) throw new Error('quota'); st.m.set(k, v); }; | |
| 92 | + | store.set('k', 'a'); | |
| 93 | + | assert.equal(store.get('k'), 'a'); | |
| 94 | + | assert.equal(st.m.has('k'), false); | |
| 95 | + | full = false; | |
| 96 | + | store.set('k', 'b'); | |
| 97 | + | assert.equal(st.m.get('k'), 'b'); | |
| 98 | + | st.m.set('k', 'c'); // changed elsewhere: the held value is gone | |
| 99 | + | assert.equal(store.get('k'), 'c'); | |
| 100 | + | }); | |
| 101 | + | ||
| 102 | + | test('a getter of localStorage that throws (sandboxed frame) is survived', () => { | |
| 103 | + | const { store } = load('missing'); | |
| 104 | + | Object.defineProperty(globalThis, 'localStorage', { get() { throw new Error('SecurityError'); }, configurable: true }); | |
| 105 | + | try { | |
| 106 | + | assert.equal(store.get('k', 'x'), 'x'); | |
| 107 | + | store.set('k', 'v'); | |
| 108 | + | assert.equal(store.get('k'), 'v'); | |
| 109 | + | } finally { | |
| 110 | + | delete globalThis.localStorage; | |
| 111 | + | } | |
| 112 | + | }); | |
| 113 | + | ||
| 114 | + | test('watch calls back with the new value of its key only, and stops when told', () => { | |
| 115 | + | const { store, emit, listeners } = load(); | |
| 116 | + | const seen = []; | |
| 117 | + | const stop = store.watch('k', (v) => seen.push(v)); | |
| 118 | + | emit({ key: 'other', newValue: 'z' }); | |
| 119 | + | emit({ key: 'k', newValue: 'v' }); | |
| 120 | + | emit({ key: 'k', newValue: null }); | |
| 121 | + | emit({ key: null, newValue: null }); // the other tab cleared everything | |
| 122 | + | assert.deepEqual(seen, ['v', null, null]); | |
| 123 | + | stop(); | |
| 124 | + | assert.equal(listeners.size, 0); | |
| 125 | + | emit({ key: 'k', newValue: 'w' }); | |
| 126 | + | assert.deepEqual(seen, ['v', null, null]); | |
| 127 | + | }); | |
| 128 | + | ||
| 129 | + | test('watch ignores the events of another storage area (sessionStorage)', () => { | |
| 130 | + | const { store, emit } = load(); | |
| 131 | + | const seen = []; | |
| 132 | + | store.watch('k', (v) => seen.push(v)); | |
| 133 | + | emit({ key: 'k', newValue: 'v', storageArea: {} }); | |
| 134 | + | assert.deepEqual(seen, []); | |
| 135 | + | }); | |
| 136 | + | ||
| 137 | + | test('an event from another tab replaces a value held for this page', () => { | |
| 138 | + | const { store, emit } = load(refusing()); | |
| 139 | + | store.set('k', 'mine'); | |
| 140 | + | store.watch('k', () => {}); | |
| 141 | + | emit({ key: 'k', newValue: 'theirs', storageArea: undefined }); | |
| 142 | + | assert.equal(store.get('k'), null, 'the held value is dropped; storage is the truth'); | |
| 143 | + | }); | |
| 144 | + | ||
| 145 | + | test('pref answers only values of its list, else the fallback', () => { | |
| 146 | + | const st = fakeStorage(); | |
| 147 | + | const { store } = load(st); | |
| 148 | + | const p = store.pref('layout', { values: ['a', 'b'], fallback: 'a' }); | |
| 149 | + | assert.equal(p.get(), 'a', 'nothing stored'); | |
| 150 | + | p.set('b'); | |
| 151 | + | assert.equal(st.m.get('layout'), 'b'); | |
| 152 | + | assert.equal(p.get(), 'b'); | |
| 153 | + | p.set('zzz'); // not allowed: ignored | |
| 154 | + | assert.equal(p.get(), 'b'); | |
| 155 | + | st.m.set('layout', 'old-value'); | |
| 156 | + | assert.equal(p.get(), 'a', 'an invalid stored value falls back'); | |
| 157 | + | }); | |
| 158 | + | ||
| 159 | + | test('pref works with the empty string as a value (keys-off)', () => { | |
| 160 | + | const st = fakeStorage(); | |
| 161 | + | const { store } = load(st); | |
| 162 | + | const p = store.pref('keys-off', { values: ['1', ''], fallback: '' }); | |
| 163 | + | assert.equal(p.get(), ''); | |
| 164 | + | p.set('1'); | |
| 165 | + | assert.equal(st.m.get('keys-off'), '1'); | |
| 166 | + | p.set(''); | |
| 167 | + | assert.equal(st.m.get('keys-off'), ''); | |
| 168 | + | assert.equal(p.get(), ''); | |
| 169 | + | }); | |
| 170 | + | ||
| 171 | + | test('pref.watch gives validated values', () => { | |
| 172 | + | const { store, emit } = load(); | |
| 173 | + | const p = store.pref('layout', { values: ['a', 'b'], fallback: 'a' }); | |
| 174 | + | const seen = []; | |
| 175 | + | const stop = p.watch((v) => seen.push(v)); | |
| 176 | + | emit({ key: 'layout', newValue: 'b' }); | |
| 177 | + | emit({ key: 'layout', newValue: 'junk' }); | |
| 178 | + | emit({ key: 'layout', newValue: null }); | |
| 179 | + | assert.deepEqual(seen, ['b', 'a', 'a']); | |
| 180 | + | stop(); | |
| 181 | + | emit({ key: 'layout', newValue: 'b' }); | |
| 182 | + | assert.equal(seen.length, 3); | |
| 183 | + | }); | |
| @@ -0,0 +1,183 @@ | |||||
| 1 | + | // Tests of static/js/store.js (window.ermiteStore): the localStorage client, | |||
| 2 | + | // evaluated alone against a fake storage. Run with | |||
| 3 | + | // node --test 'internal/adapters/web/jstest/*.test.mjs' | |||
| 4 | + | import assert from 'node:assert/strict'; | |||
| 5 | + | import { readFileSync } from 'node:fs'; | |||
| 6 | + | import { test } from 'node:test'; | |||
| 7 | + | ||||
| 8 | + | const src = readFileSync(new URL('../static/js/store.js', import.meta.url), 'utf8'); | |||
| 9 | + | ||||
| 10 | + | // load evaluates the file on a page whose storage is the given object (a | |||
| 11 | + | // Map-backed one by default) and answers the store and the "storage" listeners. | |||
| 12 | + | function load(storage = fakeStorage()) { | |||
| 13 | + | const listeners = new Set(); | |||
| 14 | + | const g = globalThis; | |||
| 15 | + | g.window = g; | |||
| 16 | + | if (storage === 'missing') delete g.localStorage; | |||
| 17 | + | else g.localStorage = storage; | |||
| 18 | + | g.addEventListener = (type, f) => { if (type === 'storage') listeners.add(f); }; | |||
| 19 | + | g.removeEventListener = (type, f) => { if (type === 'storage') listeners.delete(f); }; | |||
| 20 | + | new Function(src)(); | |||
| 21 | + | const emit = (e) => [...listeners].forEach((f) => f({ storageArea: g.localStorage, ...e })); | |||
| 22 | + | return { store: g.ermiteStore, listeners, emit }; | |||
| 23 | + | } | |||
| 24 | + | ||||
| 25 | + | function fakeStorage() { | |||
| 26 | + | const m = new Map(); | |||
| 27 | + | return { | |||
| 28 | + | m, | |||
| 29 | + | getItem: (k) => (m.has(k) ? m.get(k) : null), | |||
| 30 | + | setItem: (k, v) => { m.set(k, String(v)); }, | |||
| 31 | + | removeItem: (k) => { m.delete(k); }, | |||
| 32 | + | }; | |||
| 33 | + | } | |||
| 34 | + | ||||
| 35 | + | const refusing = () => ({ | |||
| 36 | + | getItem: () => { throw new Error('denied'); }, | |||
| 37 | + | setItem: () => { throw new Error('quota'); }, | |||
| 38 | + | removeItem: () => { throw new Error('denied'); }, | |||
| 39 | + | }); | |||
| 40 | + | ||||
| 41 | + | test('get answers the stored value, else the fallback (null by default)', () => { | |||
| 42 | + | const st = fakeStorage(); | |||
| 43 | + | const { store } = load(st); | |||
| 44 | + | assert.equal(store.get('k'), null); | |||
| 45 | + | assert.equal(store.get('k', 'x'), 'x'); | |||
| 46 | + | st.m.set('k', 'v'); | |||
| 47 | + | assert.equal(store.get('k', 'x'), 'v'); | |||
| 48 | + | st.m.set('k', ''); | |||
| 49 | + | assert.equal(store.get('k', 'x'), '', 'an empty string is a value'); | |||
| 50 | + | }); | |||
| 51 | + | ||||
| 52 | + | test('set stores strings; null and undefined remove; remove forgets', () => { | |||
| 53 | + | const st = fakeStorage(); | |||
| 54 | + | const { store } = load(st); | |||
| 55 | + | store.set('k', 'v'); | |||
| 56 | + | assert.equal(st.m.get('k'), 'v'); | |||
| 57 | + | store.set('n', 3); | |||
| 58 | + | assert.equal(st.m.get('n'), '3'); | |||
| 59 | + | store.set('k', null); | |||
| 60 | + | assert.equal(st.m.has('k'), false); | |||
| 61 | + | store.set('k', 'v'); | |||
| 62 | + | store.set('k', undefined); | |||
| 63 | + | assert.equal(st.m.has('k'), false); | |||
| 64 | + | store.remove('n'); | |||
| 65 | + | assert.equal(store.get('n'), null); | |||
| 66 | + | store.remove('nothing'); // no error | |||
| 67 | + | }); | |||
| 68 | + | ||||
| 69 | + | test('without storage nothing throws and the value holds for the page', () => { | |||
| 70 | + | const { store } = load('missing'); | |||
| 71 | + | assert.equal(store.get('k', 'x'), 'x'); | |||
| 72 | + | store.set('k', 'v'); | |||
| 73 | + | assert.equal(store.get('k', 'x'), 'v'); | |||
| 74 | + | store.remove('k'); | |||
| 75 | + | assert.equal(store.get('k', 'x'), 'x'); | |||
| 76 | + | }); | |||
| 77 | + | ||||
| 78 | + | test('a storage that refuses reads and writes does not throw either', () => { | |||
| 79 | + | const { store } = load(refusing()); | |||
| 80 | + | assert.equal(store.get('k', 'x'), 'x'); | |||
| 81 | + | store.set('k', 'v'); | |||
| 82 | + | assert.equal(store.get('k', 'x'), 'v', 'held in memory'); | |||
| 83 | + | store.remove('k'); | |||
| 84 | + | assert.equal(store.get('k', 'x'), 'x', 'removed for the page'); | |||
| 85 | + | }); | |||
| 86 | + | ||||
| 87 | + | test('a quota error on write keeps the value for the page; a later write that works wins', () => { | |||
| 88 | + | const st = fakeStorage(); | |||
| 89 | + | const { store } = load(st); | |||
| 90 | + | let full = true; | |||
| 91 | + | st.setItem = (k, v) => { if (full) throw new Error('quota'); st.m.set(k, v); }; | |||
| 92 | + | store.set('k', 'a'); | |||
| 93 | + | assert.equal(store.get('k'), 'a'); | |||
| 94 | + | assert.equal(st.m.has('k'), false); | |||
| 95 | + | full = false; | |||
| 96 | + | store.set('k', 'b'); | |||
| 97 | + | assert.equal(st.m.get('k'), 'b'); | |||
| 98 | + | st.m.set('k', 'c'); // changed elsewhere: the held value is gone | |||
| 99 | + | assert.equal(store.get('k'), 'c'); | |||
| 100 | + | }); | |||
| 101 | + | ||||
| 102 | + | test('a getter of localStorage that throws (sandboxed frame) is survived', () => { | |||
| 103 | + | const { store } = load('missing'); | |||
| 104 | + | Object.defineProperty(globalThis, 'localStorage', { get() { throw new Error('SecurityError'); }, configurable: true }); | |||
| 105 | + | try { | |||
| 106 | + | assert.equal(store.get('k', 'x'), 'x'); | |||
| 107 | + | store.set('k', 'v'); | |||
| 108 | + | assert.equal(store.get('k'), 'v'); | |||
| 109 | + | } finally { | |||
| 110 | + | delete globalThis.localStorage; | |||
| 111 | + | } | |||
| 112 | + | }); | |||
| 113 | + | ||||
| 114 | + | test('watch calls back with the new value of its key only, and stops when told', () => { | |||
| 115 | + | const { store, emit, listeners } = load(); | |||
| 116 | + | const seen = []; | |||
| 117 | + | const stop = store.watch('k', (v) => seen.push(v)); | |||
| 118 | + | emit({ key: 'other', newValue: 'z' }); | |||
| 119 | + | emit({ key: 'k', newValue: 'v' }); | |||
| 120 | + | emit({ key: 'k', newValue: null }); | |||
| 121 | + | emit({ key: null, newValue: null }); // the other tab cleared everything | |||
| 122 | + | assert.deepEqual(seen, ['v', null, null]); | |||
| 123 | + | stop(); | |||
| 124 | + | assert.equal(listeners.size, 0); | |||
| 125 | + | emit({ key: 'k', newValue: 'w' }); | |||
| 126 | + | assert.deepEqual(seen, ['v', null, null]); | |||
| 127 | + | }); | |||
| 128 | + | ||||
| 129 | + | test('watch ignores the events of another storage area (sessionStorage)', () => { | |||
| 130 | + | const { store, emit } = load(); | |||
| 131 | + | const seen = []; | |||
| 132 | + | store.watch('k', (v) => seen.push(v)); | |||
| 133 | + | emit({ key: 'k', newValue: 'v', storageArea: {} }); | |||
| 134 | + | assert.deepEqual(seen, []); | |||
| 135 | + | }); | |||
| 136 | + | ||||
| 137 | + | test('an event from another tab replaces a value held for this page', () => { | |||
| 138 | + | const { store, emit } = load(refusing()); | |||
| 139 | + | store.set('k', 'mine'); | |||
| 140 | + | store.watch('k', () => {}); | |||
| 141 | + | emit({ key: 'k', newValue: 'theirs', storageArea: undefined }); | |||
| 142 | + | assert.equal(store.get('k'), null, 'the held value is dropped; storage is the truth'); | |||
| 143 | + | }); | |||
| 144 | + | ||||
| 145 | + | test('pref answers only values of its list, else the fallback', () => { | |||
| 146 | + | const st = fakeStorage(); | |||
| 147 | + | const { store } = load(st); | |||
| 148 | + | const p = store.pref('layout', { values: ['a', 'b'], fallback: 'a' }); | |||
| 149 | + | assert.equal(p.get(), 'a', 'nothing stored'); | |||
| 150 | + | p.set('b'); | |||
| 151 | + | assert.equal(st.m.get('layout'), 'b'); | |||
| 152 | + | assert.equal(p.get(), 'b'); | |||
| 153 | + | p.set('zzz'); // not allowed: ignored | |||
| 154 | + | assert.equal(p.get(), 'b'); | |||
| 155 | + | st.m.set('layout', 'old-value'); | |||
| 156 | + | assert.equal(p.get(), 'a', 'an invalid stored value falls back'); | |||
| 157 | + | }); | |||
| 158 | + | ||||
| 159 | + | test('pref works with the empty string as a value (keys-off)', () => { | |||
| 160 | + | const st = fakeStorage(); | |||
| 161 | + | const { store } = load(st); | |||
| 162 | + | const p = store.pref('keys-off', { values: ['1', ''], fallback: '' }); | |||
| 163 | + | assert.equal(p.get(), ''); | |||
| 164 | + | p.set('1'); | |||
| 165 | + | assert.equal(st.m.get('keys-off'), '1'); | |||
| 166 | + | p.set(''); | |||
| 167 | + | assert.equal(st.m.get('keys-off'), ''); | |||
| 168 | + | assert.equal(p.get(), ''); | |||
| 169 | + | }); | |||
| 170 | + | ||||
| 171 | + | test('pref.watch gives validated values', () => { | |||
| 172 | + | const { store, emit } = load(); | |||
| 173 | + | const p = store.pref('layout', { values: ['a', 'b'], fallback: 'a' }); | |||
| 174 | + | const seen = []; | |||
| 175 | + | const stop = p.watch((v) => seen.push(v)); | |||
| 176 | + | emit({ key: 'layout', newValue: 'b' }); | |||
| 177 | + | emit({ key: 'layout', newValue: 'junk' }); | |||
| 178 | + | emit({ key: 'layout', newValue: null }); | |||
| 179 | + | assert.deepEqual(seen, ['b', 'a', 'a']); | |||
| 180 | + | stop(); | |||
| 181 | + | emit({ key: 'layout', newValue: 'b' }); | |||
| 182 | + | assert.equal(seen.length, 3); | |||
| 183 | + | }); | |||
M internal/adapters/web/pages.templ +12 -1
| @@ -6,7 +6,7 @@ package web | |||
| 6 | 6 | templ Home(l Layout, p HomePage) { | |
| 7 | 7 | @Shell(l, nil) { | |
| 8 | 8 | <h1 class="sr">Repositories</h1> | |
| 9 | - | <div class="home"> | |
| 9 | + | <div class="home" data-layout="cards"> | |
| 10 | 10 | <section class="home-repos" aria-label="Repositories"> | |
| 11 | 11 | <div class="home-bar"> | |
| 12 | 12 | <div class="filter"> | |
| @@ -37,6 +37,17 @@ templ Home(l Layout, p HomePage) { | |||
| 37 | 37 | </a> | |
| 38 | 38 | } | |
| 39 | 39 | </nav> | |
| 40 | + | <div class="layout-switch" role="group" aria-label="Layout" data-js> | |
| 41 | + | <button type="button" class="btn icon" data-set-layout="cards" aria-pressed="true" title="Cards" aria-label="Cards"> | |
| 42 | + | <span class="ico i-cards" aria-hidden="true"></span> | |
| 43 | + | </button> | |
| 44 | + | <button type="button" class="btn icon" data-set-layout="split" aria-pressed="false" title="Two columns" aria-label="Two columns"> | |
| 45 | + | <span class="ico i-split" aria-hidden="true"></span> | |
| 46 | + | </button> | |
| 47 | + | <button type="button" class="btn icon" data-set-layout="compact" aria-pressed="false" title="Compact list" aria-label="Compact list"> | |
| 48 | + | <span class="ico i-compact" aria-hidden="true"></span> | |
| 49 | + | </button> | |
| 50 | + | </div> | |
| 40 | 51 | </div> | |
| 41 | 52 | <ul class="repos" id="repo-rows" data-rows> | |
| 42 | 53 | for _, r := range p.Rows { | |
| @@ -6,7 +6,7 @@ package web | |||||
| 6 | templ Home(l Layout, p HomePage) { | 6 | templ Home(l Layout, p HomePage) { | ||
| 7 | @Shell(l, nil) { | 7 | @Shell(l, nil) { | ||
| 8 | <h1 class="sr">Repositories</h1> | 8 | <h1 class="sr">Repositories</h1> | ||
| 9 | - | <div class="home"> | 9 | + | <div class="home" data-layout="cards"> |
| 10 | <section class="home-repos" aria-label="Repositories"> | 10 | <section class="home-repos" aria-label="Repositories"> | ||
| 11 | <div class="home-bar"> | 11 | <div class="home-bar"> | ||
| 12 | <div class="filter"> | 12 | <div class="filter"> | ||
| @@ -37,6 +37,17 @@ templ Home(l Layout, p HomePage) { | |||||
| 37 | </a> | 37 | </a> | ||
| 38 | } | 38 | } | ||
| 39 | </nav> | 39 | </nav> | ||
| 40 | + | <div class="layout-switch" role="group" aria-label="Layout" data-js> | |||
| 41 | + | <button type="button" class="btn icon" data-set-layout="cards" aria-pressed="true" title="Cards" aria-label="Cards"> | |||
| 42 | + | <span class="ico i-cards" aria-hidden="true"></span> | |||
| 43 | + | </button> | |||
| 44 | + | <button type="button" class="btn icon" data-set-layout="split" aria-pressed="false" title="Two columns" aria-label="Two columns"> | |||
| 45 | + | <span class="ico i-split" aria-hidden="true"></span> | |||
| 46 | + | </button> | |||
| 47 | + | <button type="button" class="btn icon" data-set-layout="compact" aria-pressed="false" title="Compact list" aria-label="Compact list"> | |||
| 48 | + | <span class="ico i-compact" aria-hidden="true"></span> | |||
| 49 | + | </button> | |||
| 50 | + | </div> | |||
| 40 | </div> | 51 | </div> | ||
| 41 | <ul class="repos" id="repo-rows" data-rows> | 52 | <ul class="repos" id="repo-rows" data-rows> | ||
| 42 | for _, r := range p.Rows { | 53 | for _, r := range p.Rows { | ||
M internal/adapters/web/pages_templ.go +50 -50 generated file: collapsed
M internal/adapters/web/shell.templ +1 -0
| @@ -25,6 +25,7 @@ templ Shell(l Layout, rail templ.Component) { | |||
| 25 | 25 | <script src={ l.Assets.HTMX } defer></script> | |
| 26 | 26 | <script src={ l.Assets.Live } defer></script> | |
| 27 | 27 | <script src={ l.Assets.SSE } defer></script> | |
| 28 | + | <script src={ l.Assets.Store } defer></script> | |
| 28 | 29 | <script src={ l.Assets.App } defer></script> | |
| 29 | 30 | <script src={ l.Assets.Files } defer></script> | |
| 30 | 31 | <script src={ l.Assets.Passkey } defer></script> | |
| @@ -25,6 +25,7 @@ templ Shell(l Layout, rail templ.Component) { | |||||
| 25 | <script src={ l.Assets.HTMX } defer></script> | 25 | <script src={ l.Assets.HTMX } defer></script> | ||
| 26 | <script src={ l.Assets.Live } defer></script> | 26 | <script src={ l.Assets.Live } defer></script> | ||
| 27 | <script src={ l.Assets.SSE } defer></script> | 27 | <script src={ l.Assets.SSE } defer></script> | ||
| 28 | + | <script src={ l.Assets.Store } defer></script> | |||
| 28 | <script src={ l.Assets.App } defer></script> | 29 | <script src={ l.Assets.App } defer></script> | ||
| 29 | <script src={ l.Assets.Files } defer></script> | 30 | <script src={ l.Assets.Files } defer></script> | ||
| 30 | <script src={ l.Assets.Passkey } defer></script> | 31 | <script src={ l.Assets.Passkey } defer></script> | ||
M internal/adapters/web/shell_templ.go +189 -176
| @@ -156,9 +156,9 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||
| 156 | 156 | return templ_7745c5c3_Err | |
| 157 | 157 | } | |
| 158 | 158 | var templ_7745c5c3_Var11 string | |
| 159 | - | templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.App) | |
| 159 | + | templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Store) | |
| 160 | 160 | if templ_7745c5c3_Err != nil { | |
| 161 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 28, Col: 29} | |
| 161 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 28, Col: 31} | |
| 162 | 162 | } | |
| 163 | 163 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11) | |
| 164 | 164 | if templ_7745c5c3_Err != nil { | |
| @@ -169,9 +169,9 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||
| 169 | 169 | return templ_7745c5c3_Err | |
| 170 | 170 | } | |
| 171 | 171 | var templ_7745c5c3_Var12 string | |
| 172 | - | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Files) | |
| 172 | + | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.App) | |
| 173 | 173 | if templ_7745c5c3_Err != nil { | |
| 174 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 29, Col: 31} | |
| 174 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 29, Col: 29} | |
| 175 | 175 | } | |
| 176 | 176 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var12) | |
| 177 | 177 | if templ_7745c5c3_Err != nil { | |
| @@ -182,9 +182,9 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||
| 182 | 182 | return templ_7745c5c3_Err | |
| 183 | 183 | } | |
| 184 | 184 | var templ_7745c5c3_Var13 string | |
| 185 | - | templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Passkey) | |
| 185 | + | templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Files) | |
| 186 | 186 | if templ_7745c5c3_Err != nil { | |
| 187 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 30, Col: 33} | |
| 187 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 30, Col: 31} | |
| 188 | 188 | } | |
| 189 | 189 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13) | |
| 190 | 190 | if templ_7745c5c3_Err != nil { | |
| @@ -195,100 +195,113 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||
| 195 | 195 | return templ_7745c5c3_Err | |
| 196 | 196 | } | |
| 197 | 197 | var templ_7745c5c3_Var14 string | |
| 198 | - | templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Log) | |
| 198 | + | templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Passkey) | |
| 199 | 199 | if templ_7745c5c3_Err != nil { | |
| 200 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 31, Col: 29} | |
| 200 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 31, Col: 33} | |
| 201 | 201 | } | |
| 202 | 202 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var14) | |
| 203 | 203 | if templ_7745c5c3_Err != nil { | |
| 204 | 204 | return templ_7745c5c3_Err | |
| 205 | 205 | } | |
| 206 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" defer></script>") | |
| 206 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" defer></script><script src=\"") | |
| 207 | + | if templ_7745c5c3_Err != nil { | |
| 208 | + | return templ_7745c5c3_Err | |
| 209 | + | } | |
| 210 | + | var templ_7745c5c3_Var15 string | |
| 211 | + | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Log) | |
| 212 | + | if templ_7745c5c3_Err != nil { | |
| 213 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 32, Col: 29} | |
| 214 | + | } | |
| 215 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15) | |
| 216 | + | if templ_7745c5c3_Err != nil { | |
| 217 | + | return templ_7745c5c3_Err | |
| 218 | + | } | |
| 219 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" defer></script>") | |
| 207 | 220 | if templ_7745c5c3_Err != nil { | |
| 208 | 221 | return templ_7745c5c3_Err | |
| 209 | 222 | } | |
| 210 | 223 | if l.MR { | |
| 211 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<script src=\"") | |
| 224 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<script src=\"") | |
| 212 | 225 | if templ_7745c5c3_Err != nil { | |
| 213 | 226 | return templ_7745c5c3_Err | |
| 214 | 227 | } | |
| 215 | - | var templ_7745c5c3_Var15 string | |
| 216 | - | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.MR) | |
| 228 | + | var templ_7745c5c3_Var16 string | |
| 229 | + | templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.MR) | |
| 217 | 230 | if templ_7745c5c3_Err != nil { | |
| 218 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 33, Col: 29} | |
| 231 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 34, Col: 29} | |
| 219 | 232 | } | |
| 220 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15) | |
| 233 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16) | |
| 221 | 234 | if templ_7745c5c3_Err != nil { | |
| 222 | 235 | return templ_7745c5c3_Err | |
| 223 | 236 | } | |
| 224 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\" defer></script>") | |
| 237 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\" defer></script>") | |
| 225 | 238 | if templ_7745c5c3_Err != nil { | |
| 226 | 239 | return templ_7745c5c3_Err | |
| 227 | 240 | } | |
| 228 | 241 | } | |
| 229 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</head><body data-ref=\"") | |
| 242 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</head><body data-ref=\"") | |
| 230 | 243 | if templ_7745c5c3_Err != nil { | |
| 231 | 244 | return templ_7745c5c3_Err | |
| 232 | 245 | } | |
| 233 | - | var templ_7745c5c3_Var16 string | |
| 234 | - | templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.RefPath) | |
| 246 | + | var templ_7745c5c3_Var17 string | |
| 247 | + | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.RefPath) | |
| 235 | 248 | if templ_7745c5c3_Err != nil { | |
| 236 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 37, Col: 23} | |
| 249 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 38, Col: 23} | |
| 237 | 250 | } | |
| 238 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16) | |
| 251 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17) | |
| 239 | 252 | if templ_7745c5c3_Err != nil { | |
| 240 | 253 | return templ_7745c5c3_Err | |
| 241 | 254 | } | |
| 242 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\" data-sha=\"") | |
| 255 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\" data-sha=\"") | |
| 243 | 256 | if templ_7745c5c3_Err != nil { | |
| 244 | 257 | return templ_7745c5c3_Err | |
| 245 | 258 | } | |
| 246 | - | var templ_7745c5c3_Var17 string | |
| 247 | - | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.SHA) | |
| 259 | + | var templ_7745c5c3_Var18 string | |
| 260 | + | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.SHA) | |
| 248 | 261 | if templ_7745c5c3_Err != nil { | |
| 249 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 38, Col: 19} | |
| 262 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 39, Col: 19} | |
| 250 | 263 | } | |
| 251 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17) | |
| 264 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18) | |
| 252 | 265 | if templ_7745c5c3_Err != nil { | |
| 253 | 266 | return templ_7745c5c3_Err | |
| 254 | 267 | } | |
| 255 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\" data-sel=\"\" data-nav=\"\"") | |
| 268 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\" data-sel=\"\" data-nav=\"\"") | |
| 256 | 269 | if templ_7745c5c3_Err != nil { | |
| 257 | 270 | return templ_7745c5c3_Err | |
| 258 | 271 | } | |
| 259 | 272 | if l.PathsURL != "" { | |
| 260 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, " data-paths=\"") | |
| 273 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, " data-paths=\"") | |
| 261 | 274 | if templ_7745c5c3_Err != nil { | |
| 262 | 275 | return templ_7745c5c3_Err | |
| 263 | 276 | } | |
| 264 | - | var templ_7745c5c3_Var18 string | |
| 265 | - | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.PathsURL) | |
| 277 | + | var templ_7745c5c3_Var19 string | |
| 278 | + | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.PathsURL) | |
| 266 | 279 | if templ_7745c5c3_Err != nil { | |
| 267 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 42, Col: 27} | |
| 280 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 43, Col: 27} | |
| 268 | 281 | } | |
| 269 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18) | |
| 282 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19) | |
| 270 | 283 | if templ_7745c5c3_Err != nil { | |
| 271 | 284 | return templ_7745c5c3_Err | |
| 272 | 285 | } | |
| 273 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\" data-blob=\"") | |
| 286 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" data-blob=\"") | |
| 274 | 287 | if templ_7745c5c3_Err != nil { | |
| 275 | 288 | return templ_7745c5c3_Err | |
| 276 | 289 | } | |
| 277 | - | var templ_7745c5c3_Var19 string | |
| 278 | - | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.BlobBase) | |
| 290 | + | var templ_7745c5c3_Var20 string | |
| 291 | + | templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.BlobBase) | |
| 279 | 292 | if templ_7745c5c3_Err != nil { | |
| 280 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 43, Col: 26} | |
| 293 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 44, Col: 26} | |
| 281 | 294 | } | |
| 282 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19) | |
| 295 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20) | |
| 283 | 296 | if templ_7745c5c3_Err != nil { | |
| 284 | 297 | return templ_7745c5c3_Err | |
| 285 | 298 | } | |
| 286 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\"") | |
| 299 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\"") | |
| 287 | 300 | if templ_7745c5c3_Err != nil { | |
| 288 | 301 | return templ_7745c5c3_Err | |
| 289 | 302 | } | |
| 290 | 303 | } | |
| 291 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "><a class=\"skip\" href=\"#main\">skip to content</a>") | |
| 304 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "><a class=\"skip\" href=\"#main\">skip to content</a>") | |
| 292 | 305 | if templ_7745c5c3_Err != nil { | |
| 293 | 306 | return templ_7745c5c3_Err | |
| 294 | 307 | } | |
| @@ -296,48 +309,48 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||
| 296 | 309 | if templ_7745c5c3_Err != nil { | |
| 297 | 310 | return templ_7745c5c3_Err | |
| 298 | 311 | } | |
| 299 | - | var templ_7745c5c3_Var20 = []any{"work", templ.KV("has-rail", l.HasRail && rail != nil)} | |
| 300 | - | templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var20...) | |
| 312 | + | var templ_7745c5c3_Var21 = []any{"work", templ.KV("has-rail", l.HasRail && rail != nil)} | |
| 313 | + | templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var21...) | |
| 301 | 314 | if templ_7745c5c3_Err != nil { | |
| 302 | 315 | return templ_7745c5c3_Err | |
| 303 | 316 | } | |
| 304 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "<div class=\"") | |
| 317 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<div class=\"") | |
| 305 | 318 | if templ_7745c5c3_Err != nil { | |
| 306 | 319 | return templ_7745c5c3_Err | |
| 307 | 320 | } | |
| 308 | - | var templ_7745c5c3_Var21 string | |
| 309 | - | templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var20).String()) | |
| 321 | + | var templ_7745c5c3_Var22 string | |
| 322 | + | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var21).String()) | |
| 310 | 323 | if templ_7745c5c3_Err != nil { | |
| 311 | 324 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 1, Col: 0} | |
| 312 | 325 | } | |
| 313 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var21) | |
| 326 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22) | |
| 314 | 327 | if templ_7745c5c3_Err != nil { | |
| 315 | 328 | return templ_7745c5c3_Err | |
| 316 | 329 | } | |
| 317 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\">") | |
| 330 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\">") | |
| 318 | 331 | if templ_7745c5c3_Err != nil { | |
| 319 | 332 | return templ_7745c5c3_Err | |
| 320 | 333 | } | |
| 321 | 334 | if l.Lede != "" { | |
| 322 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "<section class=\"work-lede\" aria-label=\"Description\"><p class=\"lede\">") | |
| 335 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "<section class=\"work-lede\" aria-label=\"Description\"><p class=\"lede\">") | |
| 323 | 336 | if templ_7745c5c3_Err != nil { | |
| 324 | 337 | return templ_7745c5c3_Err | |
| 325 | 338 | } | |
| 326 | - | var templ_7745c5c3_Var22 string | |
| 327 | - | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(l.Lede) | |
| 339 | + | var templ_7745c5c3_Var23 string | |
| 340 | + | templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(l.Lede) | |
| 328 | 341 | if templ_7745c5c3_Err != nil { | |
| 329 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 50, Col: 81} | |
| 342 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 51, Col: 81} | |
| 330 | 343 | } | |
| 331 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) | |
| 344 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) | |
| 332 | 345 | if templ_7745c5c3_Err != nil { | |
| 333 | 346 | return templ_7745c5c3_Err | |
| 334 | 347 | } | |
| 335 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</p></section>") | |
| 348 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</p></section>") | |
| 336 | 349 | if templ_7745c5c3_Err != nil { | |
| 337 | 350 | return templ_7745c5c3_Err | |
| 338 | 351 | } | |
| 339 | 352 | } | |
| 340 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<main id=\"main\" tabindex=\"-1\">") | |
| 353 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<main id=\"main\" tabindex=\"-1\">") | |
| 341 | 354 | if templ_7745c5c3_Err != nil { | |
| 342 | 355 | return templ_7745c5c3_Err | |
| 343 | 356 | } | |
| @@ -345,12 +358,12 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||
| 345 | 358 | if templ_7745c5c3_Err != nil { | |
| 346 | 359 | return templ_7745c5c3_Err | |
| 347 | 360 | } | |
| 348 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</main>") | |
| 361 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</main>") | |
| 349 | 362 | if templ_7745c5c3_Err != nil { | |
| 350 | 363 | return templ_7745c5c3_Err | |
| 351 | 364 | } | |
| 352 | 365 | if l.HasRail && rail != nil { | |
| 353 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "<aside class=\"rail\" aria-label=\"Context\">") | |
| 366 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<aside class=\"rail\" aria-label=\"Context\">") | |
| 354 | 367 | if templ_7745c5c3_Err != nil { | |
| 355 | 368 | return templ_7745c5c3_Err | |
| 356 | 369 | } | |
| @@ -358,12 +371,12 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||
| 358 | 371 | if templ_7745c5c3_Err != nil { | |
| 359 | 372 | return templ_7745c5c3_Err | |
| 360 | 373 | } | |
| 361 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</aside>") | |
| 374 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</aside>") | |
| 362 | 375 | if templ_7745c5c3_Err != nil { | |
| 363 | 376 | return templ_7745c5c3_Err | |
| 364 | 377 | } | |
| 365 | 378 | } | |
| 366 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</div>") | |
| 379 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</div>") | |
| 367 | 380 | if templ_7745c5c3_Err != nil { | |
| 368 | 381 | return templ_7745c5c3_Err | |
| 369 | 382 | } | |
| @@ -391,7 +404,7 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||
| 391 | 404 | if templ_7745c5c3_Err != nil { | |
| 392 | 405 | return templ_7745c5c3_Err | |
| 393 | 406 | } | |
| 394 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</body></html>") | |
| 407 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "</body></html>") | |
| 395 | 408 | if templ_7745c5c3_Err != nil { | |
| 396 | 409 | return templ_7745c5c3_Err | |
| 397 | 410 | } | |
| @@ -417,324 +430,324 @@ func Header(l Layout) templ.Component { | |||
| 417 | 430 | }() | |
| 418 | 431 | } | |
| 419 | 432 | ctx = templ.InitializeContext(ctx) | |
| 420 | - | templ_7745c5c3_Var23 := templ.GetChildren(ctx) | |
| 421 | - | if templ_7745c5c3_Var23 == nil { | |
| 422 | - | templ_7745c5c3_Var23 = templ.NopComponent | |
| 433 | + | templ_7745c5c3_Var24 := templ.GetChildren(ctx) | |
| 434 | + | if templ_7745c5c3_Var24 == nil { | |
| 435 | + | templ_7745c5c3_Var24 = templ.NopComponent | |
| 423 | 436 | } | |
| 424 | 437 | ctx = templ.ClearChildren(ctx) | |
| 425 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<header class=\"hdr\"><div class=\"hdr-top\"><a class=\"brand\" href=\"/\" data-g=\"h\" aria-label=\"home\" title=\"home (g h)\"><span class=\"brand-mark\" aria-hidden=\"true\"></span></a> ") | |
| 438 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "<header class=\"hdr\"><div class=\"hdr-top\"><a class=\"brand\" href=\"/\" data-g=\"h\" aria-label=\"home\" title=\"home (g h)\"><span class=\"brand-mark\" aria-hidden=\"true\"></span></a> ") | |
| 426 | 439 | if templ_7745c5c3_Err != nil { | |
| 427 | 440 | return templ_7745c5c3_Err | |
| 428 | 441 | } | |
| 429 | 442 | if len(l.Crumbs) > 0 { | |
| 430 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "<nav class=\"crumbs\" aria-label=\"Path\"><ol>") | |
| 443 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<nav class=\"crumbs\" aria-label=\"Path\"><ol>") | |
| 431 | 444 | if templ_7745c5c3_Err != nil { | |
| 432 | 445 | return templ_7745c5c3_Err | |
| 433 | 446 | } | |
| 434 | 447 | for _, c := range l.Crumbs { | |
| 435 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<li>") | |
| 448 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<li>") | |
| 436 | 449 | if templ_7745c5c3_Err != nil { | |
| 437 | 450 | return templ_7745c5c3_Err | |
| 438 | 451 | } | |
| 439 | 452 | if c.Href != "" { | |
| 440 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<a href=\"") | |
| 453 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<a href=\"") | |
| 441 | 454 | if templ_7745c5c3_Err != nil { | |
| 442 | 455 | return templ_7745c5c3_Err | |
| 443 | 456 | } | |
| 444 | - | var templ_7745c5c3_Var24 templ.SafeURL | |
| 445 | - | templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.Href)) | |
| 457 | + | var templ_7745c5c3_Var25 templ.SafeURL | |
| 458 | + | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.Href)) | |
| 446 | 459 | if templ_7745c5c3_Err != nil { | |
| 447 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 86, Col: 38} | |
| 460 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 87, Col: 38} | |
| 448 | 461 | } | |
| 449 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24)) | |
| 462 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) | |
| 450 | 463 | if templ_7745c5c3_Err != nil { | |
| 451 | 464 | return templ_7745c5c3_Err | |
| 452 | 465 | } | |
| 453 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "\"") | |
| 466 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "\"") | |
| 454 | 467 | if templ_7745c5c3_Err != nil { | |
| 455 | 468 | return templ_7745c5c3_Err | |
| 456 | 469 | } | |
| 457 | 470 | if c.Current { | |
| 458 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, " aria-current=\"page\"") | |
| 471 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, " aria-current=\"page\"") | |
| 459 | 472 | if templ_7745c5c3_Err != nil { | |
| 460 | 473 | return templ_7745c5c3_Err | |
| 461 | 474 | } | |
| 462 | 475 | } | |
| 463 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, ">") | |
| 476 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, ">") | |
| 464 | 477 | if templ_7745c5c3_Err != nil { | |
| 465 | 478 | return templ_7745c5c3_Err | |
| 466 | 479 | } | |
| 467 | - | var templ_7745c5c3_Var25 string | |
| 468 | - | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label) | |
| 480 | + | var templ_7745c5c3_Var26 string | |
| 481 | + | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label) | |
| 469 | 482 | if templ_7745c5c3_Err != nil { | |
| 470 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 90, Col: 19} | |
| 483 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 91, Col: 19} | |
| 471 | 484 | } | |
| 472 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) | |
| 485 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) | |
| 473 | 486 | if templ_7745c5c3_Err != nil { | |
| 474 | 487 | return templ_7745c5c3_Err | |
| 475 | 488 | } | |
| 476 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</a>") | |
| 489 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</a>") | |
| 477 | 490 | if templ_7745c5c3_Err != nil { | |
| 478 | 491 | return templ_7745c5c3_Err | |
| 479 | 492 | } | |
| 480 | 493 | } else { | |
| 481 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "<span") | |
| 494 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<span") | |
| 482 | 495 | if templ_7745c5c3_Err != nil { | |
| 483 | 496 | return templ_7745c5c3_Err | |
| 484 | 497 | } | |
| 485 | 498 | if c.Current { | |
| 486 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, " aria-current=\"page\"") | |
| 499 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, " aria-current=\"page\"") | |
| 487 | 500 | if templ_7745c5c3_Err != nil { | |
| 488 | 501 | return templ_7745c5c3_Err | |
| 489 | 502 | } | |
| 490 | 503 | } | |
| 491 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, ">") | |
| 504 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, ">") | |
| 492 | 505 | if templ_7745c5c3_Err != nil { | |
| 493 | 506 | return templ_7745c5c3_Err | |
| 494 | 507 | } | |
| 495 | - | var templ_7745c5c3_Var26 string | |
| 496 | - | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label) | |
| 508 | + | var templ_7745c5c3_Var27 string | |
| 509 | + | templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label) | |
| 497 | 510 | if templ_7745c5c3_Err != nil { | |
| 498 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 96, Col: 19} | |
| 511 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 97, Col: 19} | |
| 499 | 512 | } | |
| 500 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) | |
| 513 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27)) | |
| 501 | 514 | if templ_7745c5c3_Err != nil { | |
| 502 | 515 | return templ_7745c5c3_Err | |
| 503 | 516 | } | |
| 504 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</span>") | |
| 517 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</span>") | |
| 505 | 518 | if templ_7745c5c3_Err != nil { | |
| 506 | 519 | return templ_7745c5c3_Err | |
| 507 | 520 | } | |
| 508 | 521 | } | |
| 509 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</li>") | |
| 522 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "</li>") | |
| 510 | 523 | if templ_7745c5c3_Err != nil { | |
| 511 | 524 | return templ_7745c5c3_Err | |
| 512 | 525 | } | |
| 513 | 526 | } | |
| 514 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "</ol></nav>") | |
| 527 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</ol></nav>") | |
| 515 | 528 | if templ_7745c5c3_Err != nil { | |
| 516 | 529 | return templ_7745c5c3_Err | |
| 517 | 530 | } | |
| 518 | 531 | } | |
| 519 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "<div class=\"hdr-acts\">") | |
| 532 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<div class=\"hdr-acts\">") | |
| 520 | 533 | if templ_7745c5c3_Err != nil { | |
| 521 | 534 | return templ_7745c5c3_Err | |
| 522 | 535 | } | |
| 523 | 536 | if l.Ref != "" { | |
| 524 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<a class=\"btn ref\" href=\"") | |
| 537 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<a class=\"btn ref\" href=\"") | |
| 525 | 538 | if templ_7745c5c3_Err != nil { | |
| 526 | 539 | return templ_7745c5c3_Err | |
| 527 | 540 | } | |
| 528 | - | var templ_7745c5c3_Var27 templ.SafeURL | |
| 529 | - | templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(repoHref(l.Repo, "refs"))) | |
| 541 | + | var templ_7745c5c3_Var28 templ.SafeURL | |
| 542 | + | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(repoHref(l.Repo, "refs"))) | |
| 530 | 543 | if templ_7745c5c3_Err != nil { | |
| 531 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 107, Col: 52} | |
| 544 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 108, Col: 52} | |
| 532 | 545 | } | |
| 533 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27)) | |
| 546 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28)) | |
| 534 | 547 | if templ_7745c5c3_Err != nil { | |
| 535 | 548 | return templ_7745c5c3_Err | |
| 536 | 549 | } | |
| 537 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "\" data-fire=\"refs\" aria-keyshortcuts=\"b\" title=\"switch branch or tag (b)\"><span class=\"ico i-branch\" aria-hidden=\"true\"></span> <span class=\"ref-name\">") | |
| 550 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "\" data-fire=\"refs\" aria-keyshortcuts=\"b\" title=\"switch branch or tag (b)\"><span class=\"ico i-branch\" aria-hidden=\"true\"></span> <span class=\"ref-name\">") | |
| 538 | 551 | if templ_7745c5c3_Err != nil { | |
| 539 | 552 | return templ_7745c5c3_Err | |
| 540 | 553 | } | |
| 541 | - | var templ_7745c5c3_Var28 string | |
| 542 | - | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(l.Ref) | |
| 554 | + | var templ_7745c5c3_Var29 string | |
| 555 | + | templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(l.Ref) | |
| 543 | 556 | if templ_7745c5c3_Err != nil { | |
| 544 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 113, Col: 36} | |
| 557 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 114, Col: 36} | |
| 545 | 558 | } | |
| 546 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28)) | |
| 559 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) | |
| 547 | 560 | if templ_7745c5c3_Err != nil { | |
| 548 | 561 | return templ_7745c5c3_Err | |
| 549 | 562 | } | |
| 550 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "</span> <span class=\"sha\">") | |
| 563 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</span> <span class=\"sha\">") | |
| 551 | 564 | if templ_7745c5c3_Err != nil { | |
| 552 | 565 | return templ_7745c5c3_Err | |
| 553 | 566 | } | |
| 554 | - | var templ_7745c5c3_Var29 string | |
| 555 | - | templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(l.Short) | |
| 567 | + | var templ_7745c5c3_Var30 string | |
| 568 | + | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(l.Short) | |
| 556 | 569 | if templ_7745c5c3_Err != nil { | |
| 557 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 114, Col: 33} | |
| 570 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 115, Col: 33} | |
| 558 | 571 | } | |
| 559 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) | |
| 572 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) | |
| 560 | 573 | if templ_7745c5c3_Err != nil { | |
| 561 | 574 | return templ_7745c5c3_Err | |
| 562 | 575 | } | |
| 563 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</span></a> ") | |
| 576 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</span></a> ") | |
| 564 | 577 | if templ_7745c5c3_Err != nil { | |
| 565 | 578 | return templ_7745c5c3_Err | |
| 566 | 579 | } | |
| 567 | 580 | } | |
| 568 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "<button type=\"button\" class=\"btn search\" data-js aria-haspopup=\"dialog\" aria-controls=\"panel-cmd\" aria-keyshortcuts=\"Control+K :\" title=\"go to a section, ref, file or repo (ctrl k or :)\" data-fire=\"cmd\"><span class=\"ico i-search\" aria-hidden=\"true\"></span> <span class=\"search-label\">Go to…</span> <kbd aria-hidden=\"true\">ctrl k</kbd></button> ") | |
| 581 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<button type=\"button\" class=\"btn search\" data-js aria-haspopup=\"dialog\" aria-controls=\"panel-cmd\" aria-keyshortcuts=\"Control+K :\" title=\"go to a section, ref, file or repo (ctrl k or :)\" data-fire=\"cmd\"><span class=\"ico i-search\" aria-hidden=\"true\"></span> <span class=\"search-label\">Go to…</span> <kbd aria-hidden=\"true\">ctrl k</kbd></button> ") | |
| 569 | 582 | if templ_7745c5c3_Err != nil { | |
| 570 | 583 | return templ_7745c5c3_Err | |
| 571 | 584 | } | |
| 572 | 585 | if SignedIn(ctx) { | |
| 573 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<form class=\"owner\" method=\"post\" action=\"/-/logout\"><span class=\"owner-badge\" title=\"signed in as the owner\"><span class=\"ico i-user\" aria-hidden=\"true\"></span>") | |
| 586 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "<form class=\"owner\" method=\"post\" action=\"/-/logout\"><span class=\"owner-badge\" title=\"signed in as the owner\"><span class=\"ico i-user\" aria-hidden=\"true\"></span>") | |
| 574 | 587 | if templ_7745c5c3_Err != nil { | |
| 575 | 588 | return templ_7745c5c3_Err | |
| 576 | 589 | } | |
| 577 | - | var templ_7745c5c3_Var30 string | |
| 578 | - | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(l.Owner) | |
| 590 | + | var templ_7745c5c3_Var31 string | |
| 591 | + | templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(l.Owner) | |
| 579 | 592 | if templ_7745c5c3_Err != nil { | |
| 580 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 133, Col: 123} | |
| 593 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 134, Col: 123} | |
| 581 | 594 | } | |
| 582 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) | |
| 595 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31)) | |
| 583 | 596 | if templ_7745c5c3_Err != nil { | |
| 584 | 597 | return templ_7745c5c3_Err | |
| 585 | 598 | } | |
| 586 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "</span> ") | |
| 599 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</span> ") | |
| 587 | 600 | if templ_7745c5c3_Err != nil { | |
| 588 | 601 | return templ_7745c5c3_Err | |
| 589 | 602 | } | |
| 590 | 603 | if l.Passkeys { | |
| 591 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<a class=\"btn icon\" href=\"/-/passkeys\" aria-label=\"Passkeys\" title=\"passkeys: add or remove the passkeys that sign you in\"><span class=\"ico i-key\" aria-hidden=\"true\"></span></a> ") | |
| 604 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<a class=\"btn icon\" href=\"/-/passkeys\" aria-label=\"Passkeys\" title=\"passkeys: add or remove the passkeys that sign you in\"><span class=\"ico i-key\" aria-hidden=\"true\"></span></a> ") | |
| 592 | 605 | if templ_7745c5c3_Err != nil { | |
| 593 | 606 | return templ_7745c5c3_Err | |
| 594 | 607 | } | |
| 595 | 608 | } | |
| 596 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<button type=\"submit\" class=\"btn icon\" aria-label=\"Sign out\" title=\"sign out of this browser\"><span class=\"ico i-log-out\" aria-hidden=\"true\"></span></button></form>") | |
| 609 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<button type=\"submit\" class=\"btn icon\" aria-label=\"Sign out\" title=\"sign out of this browser\"><span class=\"ico i-log-out\" aria-hidden=\"true\"></span></button></form>") | |
| 597 | 610 | if templ_7745c5c3_Err != nil { | |
| 598 | 611 | return templ_7745c5c3_Err | |
| 599 | 612 | } | |
| 600 | 613 | } else if l.Passkeys { | |
| 601 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<a class=\"btn icon\" href=\"/-/login\" aria-label=\"Sign in\" title=\"sign in with a passkey\"><span class=\"ico i-log-in\" aria-hidden=\"true\"></span></a>") | |
| 614 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<a class=\"btn icon\" href=\"/-/login\" aria-label=\"Sign in\" title=\"sign in with a passkey\"><span class=\"ico i-log-in\" aria-hidden=\"true\"></span></a>") | |
| 602 | 615 | if templ_7745c5c3_Err != nil { | |
| 603 | 616 | return templ_7745c5c3_Err | |
| 604 | 617 | } | |
| 605 | 618 | } | |
| 606 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</div></div>") | |
| 619 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "</div></div>") | |
| 607 | 620 | if templ_7745c5c3_Err != nil { | |
| 608 | 621 | return templ_7745c5c3_Err | |
| 609 | 622 | } | |
| 610 | 623 | if len(l.Sections) > 0 { | |
| 611 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "<nav class=\"tabs\" aria-label=\"Sections\"><ul>") | |
| 624 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<nav class=\"tabs\" aria-label=\"Sections\"><ul>") | |
| 612 | 625 | if templ_7745c5c3_Err != nil { | |
| 613 | 626 | return templ_7745c5c3_Err | |
| 614 | 627 | } | |
| 615 | 628 | for _, s := range l.Sections { | |
| 616 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<li><a href=\"") | |
| 629 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "<li><a href=\"") | |
| 617 | 630 | if templ_7745c5c3_Err != nil { | |
| 618 | 631 | return templ_7745c5c3_Err | |
| 619 | 632 | } | |
| 620 | - | var templ_7745c5c3_Var31 templ.SafeURL | |
| 621 | - | templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(s.Href)) | |
| 633 | + | var templ_7745c5c3_Var32 templ.SafeURL | |
| 634 | + | templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(s.Href)) | |
| 622 | 635 | if templ_7745c5c3_Err != nil { | |
| 623 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 150, Col: 36} | |
| 636 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 151, Col: 36} | |
| 624 | 637 | } | |
| 625 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31)) | |
| 638 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32)) | |
| 626 | 639 | if templ_7745c5c3_Err != nil { | |
| 627 | 640 | return templ_7745c5c3_Err | |
| 628 | 641 | } | |
| 629 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "\" data-key=\"") | |
| 642 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\" data-key=\"") | |
| 630 | 643 | if templ_7745c5c3_Err != nil { | |
| 631 | 644 | return templ_7745c5c3_Err | |
| 632 | 645 | } | |
| 633 | - | var templ_7745c5c3_Var32 string | |
| 634 | - | templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key) | |
| 646 | + | var templ_7745c5c3_Var33 string | |
| 647 | + | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key) | |
| 635 | 648 | if templ_7745c5c3_Err != nil { | |
| 636 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 151, Col: 24} | |
| 649 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 152, Col: 24} | |
| 637 | 650 | } | |
| 638 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var32) | |
| 651 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33) | |
| 639 | 652 | if templ_7745c5c3_Err != nil { | |
| 640 | 653 | return templ_7745c5c3_Err | |
| 641 | 654 | } | |
| 642 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\" aria-keyshortcuts=\"") | |
| 655 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "\" aria-keyshortcuts=\"") | |
| 643 | 656 | if templ_7745c5c3_Err != nil { | |
| 644 | 657 | return templ_7745c5c3_Err | |
| 645 | 658 | } | |
| 646 | - | var templ_7745c5c3_Var33 string | |
| 647 | - | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key) | |
| 659 | + | var templ_7745c5c3_Var34 string | |
| 660 | + | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key) | |
| 648 | 661 | if templ_7745c5c3_Err != nil { | |
| 649 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 152, Col: 33} | |
| 662 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 153, Col: 33} | |
| 650 | 663 | } | |
| 651 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33) | |
| 664 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var34) | |
| 652 | 665 | if templ_7745c5c3_Err != nil { | |
| 653 | 666 | return templ_7745c5c3_Err | |
| 654 | 667 | } | |
| 655 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "\"") | |
| 668 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "\"") | |
| 656 | 669 | if templ_7745c5c3_Err != nil { | |
| 657 | 670 | return templ_7745c5c3_Err | |
| 658 | 671 | } | |
| 659 | 672 | if s.Current { | |
| 660 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " aria-current=\"page\"") | |
| 673 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, " aria-current=\"page\"") | |
| 661 | 674 | if templ_7745c5c3_Err != nil { | |
| 662 | 675 | return templ_7745c5c3_Err | |
| 663 | 676 | } | |
| 664 | 677 | } | |
| 665 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, ">") | |
| 678 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, ">") | |
| 666 | 679 | if templ_7745c5c3_Err != nil { | |
| 667 | 680 | return templ_7745c5c3_Err | |
| 668 | 681 | } | |
| 669 | - | var templ_7745c5c3_Var34 string | |
| 670 | - | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(s.Label) | |
| 682 | + | var templ_7745c5c3_Var35 string | |
| 683 | + | templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(s.Label) | |
| 671 | 684 | if templ_7745c5c3_Err != nil { | |
| 672 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 157, Col: 17} | |
| 685 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 158, Col: 17} | |
| 673 | 686 | } | |
| 674 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) | |
| 687 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35)) | |
| 675 | 688 | if templ_7745c5c3_Err != nil { | |
| 676 | 689 | return templ_7745c5c3_Err | |
| 677 | 690 | } | |
| 678 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, " ") | |
| 691 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, " ") | |
| 679 | 692 | if templ_7745c5c3_Err != nil { | |
| 680 | 693 | return templ_7745c5c3_Err | |
| 681 | 694 | } | |
| 682 | 695 | if s.Count != "" { | |
| 683 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<span class=\"count\">") | |
| 696 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<span class=\"count\">") | |
| 684 | 697 | if templ_7745c5c3_Err != nil { | |
| 685 | 698 | return templ_7745c5c3_Err | |
| 686 | 699 | } | |
| 687 | - | var templ_7745c5c3_Var35 string | |
| 688 | - | templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(s.Count) | |
| 700 | + | var templ_7745c5c3_Var36 string | |
| 701 | + | templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(s.Count) | |
| 689 | 702 | if templ_7745c5c3_Err != nil { | |
| 690 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 159, Col: 38} | |
| 703 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 160, Col: 38} | |
| 691 | 704 | } | |
| 692 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35)) | |
| 705 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36)) | |
| 693 | 706 | if templ_7745c5c3_Err != nil { | |
| 694 | 707 | return templ_7745c5c3_Err | |
| 695 | 708 | } | |
| 696 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<span class=\"sr\">") | |
| 709 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<span class=\"sr\">") | |
| 697 | 710 | if templ_7745c5c3_Err != nil { | |
| 698 | 711 | return templ_7745c5c3_Err | |
| 699 | 712 | } | |
| 700 | - | var templ_7745c5c3_Var36 string | |
| 701 | - | templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(" open") | |
| 713 | + | var templ_7745c5c3_Var37 string | |
| 714 | + | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(" open") | |
| 702 | 715 | if templ_7745c5c3_Err != nil { | |
| 703 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 159, Col: 66} | |
| 716 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 160, Col: 66} | |
| 704 | 717 | } | |
| 705 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36)) | |
| 718 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) | |
| 706 | 719 | if templ_7745c5c3_Err != nil { | |
| 707 | 720 | return templ_7745c5c3_Err | |
| 708 | 721 | } | |
| 709 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "</span></span> ") | |
| 722 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "</span></span> ") | |
| 710 | 723 | if templ_7745c5c3_Err != nil { | |
| 711 | 724 | return templ_7745c5c3_Err | |
| 712 | 725 | } | |
| 713 | 726 | } | |
| 714 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "<kbd aria-hidden=\"true\">") | |
| 727 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<kbd aria-hidden=\"true\">") | |
| 715 | 728 | if templ_7745c5c3_Err != nil { | |
| 716 | 729 | return templ_7745c5c3_Err | |
| 717 | 730 | } | |
| 718 | - | var templ_7745c5c3_Var37 string | |
| 719 | - | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(s.Key) | |
| 731 | + | var templ_7745c5c3_Var38 string | |
| 732 | + | templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(s.Key) | |
| 720 | 733 | if templ_7745c5c3_Err != nil { | |
| 721 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 161, Col: 39} | |
| 734 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 162, Col: 39} | |
| 722 | 735 | } | |
| 723 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) | |
| 736 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) | |
| 724 | 737 | if templ_7745c5c3_Err != nil { | |
| 725 | 738 | return templ_7745c5c3_Err | |
| 726 | 739 | } | |
| 727 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "</kbd></a></li>") | |
| 740 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "</kbd></a></li>") | |
| 728 | 741 | if templ_7745c5c3_Err != nil { | |
| 729 | 742 | return templ_7745c5c3_Err | |
| 730 | 743 | } | |
| 731 | 744 | } | |
| 732 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "</ul></nav>") | |
| 745 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "</ul></nav>") | |
| 733 | 746 | if templ_7745c5c3_Err != nil { | |
| 734 | 747 | return templ_7745c5c3_Err | |
| 735 | 748 | } | |
| 736 | 749 | } | |
| 737 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "</header>") | |
| 750 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</header>") | |
| 738 | 751 | if templ_7745c5c3_Err != nil { | |
| 739 | 752 | return templ_7745c5c3_Err | |
| 740 | 753 | } | |
| @@ -760,38 +773,38 @@ func Footer(l Layout) templ.Component { | |||
| 760 | 773 | }() | |
| 761 | 774 | } | |
| 762 | 775 | ctx = templ.InitializeContext(ctx) | |
| 763 | - | templ_7745c5c3_Var38 := templ.GetChildren(ctx) | |
| 764 | - | if templ_7745c5c3_Var38 == nil { | |
| 765 | - | templ_7745c5c3_Var38 = templ.NopComponent | |
| 776 | + | templ_7745c5c3_Var39 := templ.GetChildren(ctx) | |
| 777 | + | if templ_7745c5c3_Var39 == nil { | |
| 778 | + | templ_7745c5c3_Var39 = templ.NopComponent | |
| 766 | 779 | } | |
| 767 | 780 | ctx = templ.ClearChildren(ctx) | |
| 768 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "<footer class=\"foot\"><span>ermite ") | |
| 781 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "<footer class=\"foot\"><span>ermite ") | |
| 769 | 782 | if templ_7745c5c3_Err != nil { | |
| 770 | 783 | return templ_7745c5c3_Err | |
| 771 | 784 | } | |
| 772 | - | var templ_7745c5c3_Var39 string | |
| 773 | - | templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(l.Version) | |
| 785 | + | var templ_7745c5c3_Var40 string | |
| 786 | + | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(l.Version) | |
| 774 | 787 | if templ_7745c5c3_Err != nil { | |
| 775 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 175, Col: 26} | |
| 788 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 176, Col: 26} | |
| 776 | 789 | } | |
| 777 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) | |
| 790 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) | |
| 778 | 791 | if templ_7745c5c3_Err != nil { | |
| 779 | 792 | return templ_7745c5c3_Err | |
| 780 | 793 | } | |
| 781 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</span> <a href=\"") | |
| 794 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</span> <a href=\"") | |
| 782 | 795 | if templ_7745c5c3_Err != nil { | |
| 783 | 796 | return templ_7745c5c3_Err | |
| 784 | 797 | } | |
| 785 | - | var templ_7745c5c3_Var40 templ.SafeURL | |
| 786 | - | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(l.SourceURL)) | |
| 798 | + | var templ_7745c5c3_Var41 templ.SafeURL | |
| 799 | + | templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(l.SourceURL)) | |
| 787 | 800 | if templ_7745c5c3_Err != nil { | |
| 788 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 176, Col: 38} | |
| 801 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 177, Col: 38} | |
| 789 | 802 | } | |
| 790 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) | |
| 803 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41)) | |
| 791 | 804 | if templ_7745c5c3_Err != nil { | |
| 792 | 805 | return templ_7745c5c3_Err | |
| 793 | 806 | } | |
| 794 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "\" rel=\"noopener\" title=\"source of this version (AGPL-3.0-or-later)\">source</a> <button type=\"button\" class=\"foot-keys\" data-js data-fire=\"help\" aria-haspopup=\"dialog\" aria-controls=\"panel-help\" aria-keyshortcuts=\"?\"><kbd aria-hidden=\"true\">?</kbd> keyboard shortcuts</button></footer>") | |
| 807 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "\" rel=\"noopener\" title=\"source of this version (AGPL-3.0-or-later)\">source</a> <button type=\"button\" class=\"foot-keys\" data-js data-fire=\"help\" aria-haspopup=\"dialog\" aria-controls=\"panel-help\" aria-keyshortcuts=\"?\"><kbd aria-hidden=\"true\">?</kbd> keyboard shortcuts</button></footer>") | |
| 795 | 808 | if templ_7745c5c3_Err != nil { | |
| 796 | 809 | return templ_7745c5c3_Err | |
| 797 | 810 | } | |
| @@ -819,12 +832,12 @@ func Hint(l Layout) templ.Component { | |||
| 819 | 832 | }() | |
| 820 | 833 | } | |
| 821 | 834 | ctx = templ.InitializeContext(ctx) | |
| 822 | - | templ_7745c5c3_Var41 := templ.GetChildren(ctx) | |
| 823 | - | if templ_7745c5c3_Var41 == nil { | |
| 824 | - | templ_7745c5c3_Var41 = templ.NopComponent | |
| 835 | + | templ_7745c5c3_Var42 := templ.GetChildren(ctx) | |
| 836 | + | if templ_7745c5c3_Var42 == nil { | |
| 837 | + | templ_7745c5c3_Var42 = templ.NopComponent | |
| 825 | 838 | } | |
| 826 | 839 | ctx = templ.ClearChildren(ctx) | |
| 827 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "<div class=\"hint\" role=\"status\" aria-live=\"polite\"><span class=\"hint-nav\" :text=\"document.body.dataset.nav || ''\"></span> <span class=\"hint-sel\" :text=\"document.body.dataset.sel ? document.body.dataset.sel + ' · y permalink' : ''\"></span> <span class=\"hint-flash\" :text=\"document.body.dataset.flash || ''\"></span>") | |
| 840 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "<div class=\"hint\" role=\"status\" aria-live=\"polite\"><span class=\"hint-nav\" :text=\"document.body.dataset.nav || ''\"></span> <span class=\"hint-sel\" :text=\"document.body.dataset.sel ? document.body.dataset.sel + ' · y permalink' : ''\"></span> <span class=\"hint-flash\" :text=\"document.body.dataset.flash || ''\"></span>") | |
| 828 | 841 | if templ_7745c5c3_Err != nil { | |
| 829 | 842 | return templ_7745c5c3_Err | |
| 830 | 843 | } | |
| @@ -832,7 +845,7 @@ func Hint(l Layout) templ.Component { | |||
| 832 | 845 | if templ_7745c5c3_Err != nil { | |
| 833 | 846 | return templ_7745c5c3_Err | |
| 834 | 847 | } | |
| 835 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</div>") | |
| 848 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "</div>") | |
| 836 | 849 | if templ_7745c5c3_Err != nil { | |
| 837 | 850 | return templ_7745c5c3_Err | |
| 838 | 851 | } | |
| @@ -156,9 +156,9 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||||
| 156 | return templ_7745c5c3_Err | 156 | return templ_7745c5c3_Err | ||
| 157 | } | 157 | } | ||
| 158 | var templ_7745c5c3_Var11 string | 158 | var templ_7745c5c3_Var11 string | ||
| 159 | - | templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.App) | 159 | + | templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Store) |
| 160 | if templ_7745c5c3_Err != nil { | 160 | if templ_7745c5c3_Err != nil { | ||
| 161 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 28, Col: 29} | 161 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 28, Col: 31} |
| 162 | } | 162 | } | ||
| 163 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11) | 163 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11) | ||
| 164 | if templ_7745c5c3_Err != nil { | 164 | if templ_7745c5c3_Err != nil { | ||
| @@ -169,9 +169,9 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||||
| 169 | return templ_7745c5c3_Err | 169 | return templ_7745c5c3_Err | ||
| 170 | } | 170 | } | ||
| 171 | var templ_7745c5c3_Var12 string | 171 | var templ_7745c5c3_Var12 string | ||
| 172 | - | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Files) | 172 | + | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.App) |
| 173 | if templ_7745c5c3_Err != nil { | 173 | if templ_7745c5c3_Err != nil { | ||
| 174 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 29, Col: 31} | 174 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 29, Col: 29} |
| 175 | } | 175 | } | ||
| 176 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var12) | 176 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var12) | ||
| 177 | if templ_7745c5c3_Err != nil { | 177 | if templ_7745c5c3_Err != nil { | ||
| @@ -182,9 +182,9 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||||
| 182 | return templ_7745c5c3_Err | 182 | return templ_7745c5c3_Err | ||
| 183 | } | 183 | } | ||
| 184 | var templ_7745c5c3_Var13 string | 184 | var templ_7745c5c3_Var13 string | ||
| 185 | - | templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Passkey) | 185 | + | templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Files) |
| 186 | if templ_7745c5c3_Err != nil { | 186 | if templ_7745c5c3_Err != nil { | ||
| 187 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 30, Col: 33} | 187 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 30, Col: 31} |
| 188 | } | 188 | } | ||
| 189 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13) | 189 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13) | ||
| 190 | if templ_7745c5c3_Err != nil { | 190 | if templ_7745c5c3_Err != nil { | ||
| @@ -195,100 +195,113 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||||
| 195 | return templ_7745c5c3_Err | 195 | return templ_7745c5c3_Err | ||
| 196 | } | 196 | } | ||
| 197 | var templ_7745c5c3_Var14 string | 197 | var templ_7745c5c3_Var14 string | ||
| 198 | - | templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Log) | 198 | + | templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Passkey) |
| 199 | if templ_7745c5c3_Err != nil { | 199 | if templ_7745c5c3_Err != nil { | ||
| 200 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 31, Col: 29} | 200 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 31, Col: 33} |
| 201 | } | 201 | } | ||
| 202 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var14) | 202 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var14) | ||
| 203 | if templ_7745c5c3_Err != nil { | 203 | if templ_7745c5c3_Err != nil { | ||
| 204 | return templ_7745c5c3_Err | 204 | return templ_7745c5c3_Err | ||
| 205 | } | 205 | } | ||
| 206 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" defer></script>") | 206 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\" defer></script><script src=\"") |
| 207 | + | if templ_7745c5c3_Err != nil { | |||
| 208 | + | return templ_7745c5c3_Err | |||
| 209 | + | } | |||
| 210 | + | var templ_7745c5c3_Var15 string | |||
| 211 | + | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.Log) | |||
| 212 | + | if templ_7745c5c3_Err != nil { | |||
| 213 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 32, Col: 29} | |||
| 214 | + | } | |||
| 215 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15) | |||
| 216 | + | if templ_7745c5c3_Err != nil { | |||
| 217 | + | return templ_7745c5c3_Err | |||
| 218 | + | } | |||
| 219 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" defer></script>") | |||
| 207 | if templ_7745c5c3_Err != nil { | 220 | if templ_7745c5c3_Err != nil { | ||
| 208 | return templ_7745c5c3_Err | 221 | return templ_7745c5c3_Err | ||
| 209 | } | 222 | } | ||
| 210 | if l.MR { | 223 | if l.MR { | ||
| 211 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<script src=\"") | 224 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<script src=\"") |
| 212 | if templ_7745c5c3_Err != nil { | 225 | if templ_7745c5c3_Err != nil { | ||
| 213 | return templ_7745c5c3_Err | 226 | return templ_7745c5c3_Err | ||
| 214 | } | 227 | } | ||
| 215 | - | var templ_7745c5c3_Var15 string | 228 | + | var templ_7745c5c3_Var16 string |
| 216 | - | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.MR) | 229 | + | templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.Assets.MR) |
| 217 | if templ_7745c5c3_Err != nil { | 230 | if templ_7745c5c3_Err != nil { | ||
| 218 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 33, Col: 29} | 231 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 34, Col: 29} |
| 219 | } | 232 | } | ||
| 220 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15) | 233 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16) |
| 221 | if templ_7745c5c3_Err != nil { | 234 | if templ_7745c5c3_Err != nil { | ||
| 222 | return templ_7745c5c3_Err | 235 | return templ_7745c5c3_Err | ||
| 223 | } | 236 | } | ||
| 224 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\" defer></script>") | 237 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\" defer></script>") |
| 225 | if templ_7745c5c3_Err != nil { | 238 | if templ_7745c5c3_Err != nil { | ||
| 226 | return templ_7745c5c3_Err | 239 | return templ_7745c5c3_Err | ||
| 227 | } | 240 | } | ||
| 228 | } | 241 | } | ||
| 229 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</head><body data-ref=\"") | 242 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</head><body data-ref=\"") |
| 230 | if templ_7745c5c3_Err != nil { | 243 | if templ_7745c5c3_Err != nil { | ||
| 231 | return templ_7745c5c3_Err | 244 | return templ_7745c5c3_Err | ||
| 232 | } | 245 | } | ||
| 233 | - | var templ_7745c5c3_Var16 string | 246 | + | var templ_7745c5c3_Var17 string |
| 234 | - | templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.RefPath) | 247 | + | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.RefPath) |
| 235 | if templ_7745c5c3_Err != nil { | 248 | if templ_7745c5c3_Err != nil { | ||
| 236 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 37, Col: 23} | 249 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 38, Col: 23} |
| 237 | } | 250 | } | ||
| 238 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16) | 251 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17) |
| 239 | if templ_7745c5c3_Err != nil { | 252 | if templ_7745c5c3_Err != nil { | ||
| 240 | return templ_7745c5c3_Err | 253 | return templ_7745c5c3_Err | ||
| 241 | } | 254 | } | ||
| 242 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\" data-sha=\"") | 255 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\" data-sha=\"") |
| 243 | if templ_7745c5c3_Err != nil { | 256 | if templ_7745c5c3_Err != nil { | ||
| 244 | return templ_7745c5c3_Err | 257 | return templ_7745c5c3_Err | ||
| 245 | } | 258 | } | ||
| 246 | - | var templ_7745c5c3_Var17 string | 259 | + | var templ_7745c5c3_Var18 string |
| 247 | - | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.SHA) | 260 | + | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.SHA) |
| 248 | if templ_7745c5c3_Err != nil { | 261 | if templ_7745c5c3_Err != nil { | ||
| 249 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 38, Col: 19} | 262 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 39, Col: 19} |
| 250 | } | 263 | } | ||
| 251 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17) | 264 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18) |
| 252 | if templ_7745c5c3_Err != nil { | 265 | if templ_7745c5c3_Err != nil { | ||
| 253 | return templ_7745c5c3_Err | 266 | return templ_7745c5c3_Err | ||
| 254 | } | 267 | } | ||
| 255 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\" data-sel=\"\" data-nav=\"\"") | 268 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\" data-sel=\"\" data-nav=\"\"") |
| 256 | if templ_7745c5c3_Err != nil { | 269 | if templ_7745c5c3_Err != nil { | ||
| 257 | return templ_7745c5c3_Err | 270 | return templ_7745c5c3_Err | ||
| 258 | } | 271 | } | ||
| 259 | if l.PathsURL != "" { | 272 | if l.PathsURL != "" { | ||
| 260 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, " data-paths=\"") | 273 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, " data-paths=\"") |
| 261 | if templ_7745c5c3_Err != nil { | 274 | if templ_7745c5c3_Err != nil { | ||
| 262 | return templ_7745c5c3_Err | 275 | return templ_7745c5c3_Err | ||
| 263 | } | 276 | } | ||
| 264 | - | var templ_7745c5c3_Var18 string | 277 | + | var templ_7745c5c3_Var19 string |
| 265 | - | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.PathsURL) | 278 | + | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.PathsURL) |
| 266 | if templ_7745c5c3_Err != nil { | 279 | if templ_7745c5c3_Err != nil { | ||
| 267 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 42, Col: 27} | 280 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 43, Col: 27} |
| 268 | } | 281 | } | ||
| 269 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18) | 282 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19) |
| 270 | if templ_7745c5c3_Err != nil { | 283 | if templ_7745c5c3_Err != nil { | ||
| 271 | return templ_7745c5c3_Err | 284 | return templ_7745c5c3_Err | ||
| 272 | } | 285 | } | ||
| 273 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\" data-blob=\"") | 286 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" data-blob=\"") |
| 274 | if templ_7745c5c3_Err != nil { | 287 | if templ_7745c5c3_Err != nil { | ||
| 275 | return templ_7745c5c3_Err | 288 | return templ_7745c5c3_Err | ||
| 276 | } | 289 | } | ||
| 277 | - | var templ_7745c5c3_Var19 string | 290 | + | var templ_7745c5c3_Var20 string |
| 278 | - | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.BlobBase) | 291 | + | templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(l.BlobBase) |
| 279 | if templ_7745c5c3_Err != nil { | 292 | if templ_7745c5c3_Err != nil { | ||
| 280 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 43, Col: 26} | 293 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 44, Col: 26} |
| 281 | } | 294 | } | ||
| 282 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19) | 295 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20) |
| 283 | if templ_7745c5c3_Err != nil { | 296 | if templ_7745c5c3_Err != nil { | ||
| 284 | return templ_7745c5c3_Err | 297 | return templ_7745c5c3_Err | ||
| 285 | } | 298 | } | ||
| 286 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\"") | 299 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\"") |
| 287 | if templ_7745c5c3_Err != nil { | 300 | if templ_7745c5c3_Err != nil { | ||
| 288 | return templ_7745c5c3_Err | 301 | return templ_7745c5c3_Err | ||
| 289 | } | 302 | } | ||
| 290 | } | 303 | } | ||
| 291 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "><a class=\"skip\" href=\"#main\">skip to content</a>") | 304 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "><a class=\"skip\" href=\"#main\">skip to content</a>") |
| 292 | if templ_7745c5c3_Err != nil { | 305 | if templ_7745c5c3_Err != nil { | ||
| 293 | return templ_7745c5c3_Err | 306 | return templ_7745c5c3_Err | ||
| 294 | } | 307 | } | ||
| @@ -296,48 +309,48 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||||
| 296 | if templ_7745c5c3_Err != nil { | 309 | if templ_7745c5c3_Err != nil { | ||
| 297 | return templ_7745c5c3_Err | 310 | return templ_7745c5c3_Err | ||
| 298 | } | 311 | } | ||
| 299 | - | var templ_7745c5c3_Var20 = []any{"work", templ.KV("has-rail", l.HasRail && rail != nil)} | 312 | + | var templ_7745c5c3_Var21 = []any{"work", templ.KV("has-rail", l.HasRail && rail != nil)} |
| 300 | - | templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var20...) | 313 | + | templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var21...) |
| 301 | if templ_7745c5c3_Err != nil { | 314 | if templ_7745c5c3_Err != nil { | ||
| 302 | return templ_7745c5c3_Err | 315 | return templ_7745c5c3_Err | ||
| 303 | } | 316 | } | ||
| 304 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "<div class=\"") | 317 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<div class=\"") |
| 305 | if templ_7745c5c3_Err != nil { | 318 | if templ_7745c5c3_Err != nil { | ||
| 306 | return templ_7745c5c3_Err | 319 | return templ_7745c5c3_Err | ||
| 307 | } | 320 | } | ||
| 308 | - | var templ_7745c5c3_Var21 string | 321 | + | var templ_7745c5c3_Var22 string |
| 309 | - | templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var20).String()) | 322 | + | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var21).String()) |
| 310 | if templ_7745c5c3_Err != nil { | 323 | if templ_7745c5c3_Err != nil { | ||
| 311 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 1, Col: 0} | 324 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 1, Col: 0} | ||
| 312 | } | 325 | } | ||
| 313 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var21) | 326 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22) |
| 314 | if templ_7745c5c3_Err != nil { | 327 | if templ_7745c5c3_Err != nil { | ||
| 315 | return templ_7745c5c3_Err | 328 | return templ_7745c5c3_Err | ||
| 316 | } | 329 | } | ||
| 317 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\">") | 330 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\">") |
| 318 | if templ_7745c5c3_Err != nil { | 331 | if templ_7745c5c3_Err != nil { | ||
| 319 | return templ_7745c5c3_Err | 332 | return templ_7745c5c3_Err | ||
| 320 | } | 333 | } | ||
| 321 | if l.Lede != "" { | 334 | if l.Lede != "" { | ||
| 322 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "<section class=\"work-lede\" aria-label=\"Description\"><p class=\"lede\">") | 335 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "<section class=\"work-lede\" aria-label=\"Description\"><p class=\"lede\">") |
| 323 | if templ_7745c5c3_Err != nil { | 336 | if templ_7745c5c3_Err != nil { | ||
| 324 | return templ_7745c5c3_Err | 337 | return templ_7745c5c3_Err | ||
| 325 | } | 338 | } | ||
| 326 | - | var templ_7745c5c3_Var22 string | 339 | + | var templ_7745c5c3_Var23 string |
| 327 | - | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(l.Lede) | 340 | + | templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(l.Lede) |
| 328 | if templ_7745c5c3_Err != nil { | 341 | if templ_7745c5c3_Err != nil { | ||
| 329 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 50, Col: 81} | 342 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 51, Col: 81} |
| 330 | } | 343 | } | ||
| 331 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) | 344 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) |
| 332 | if templ_7745c5c3_Err != nil { | 345 | if templ_7745c5c3_Err != nil { | ||
| 333 | return templ_7745c5c3_Err | 346 | return templ_7745c5c3_Err | ||
| 334 | } | 347 | } | ||
| 335 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</p></section>") | 348 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</p></section>") |
| 336 | if templ_7745c5c3_Err != nil { | 349 | if templ_7745c5c3_Err != nil { | ||
| 337 | return templ_7745c5c3_Err | 350 | return templ_7745c5c3_Err | ||
| 338 | } | 351 | } | ||
| 339 | } | 352 | } | ||
| 340 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<main id=\"main\" tabindex=\"-1\">") | 353 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<main id=\"main\" tabindex=\"-1\">") |
| 341 | if templ_7745c5c3_Err != nil { | 354 | if templ_7745c5c3_Err != nil { | ||
| 342 | return templ_7745c5c3_Err | 355 | return templ_7745c5c3_Err | ||
| 343 | } | 356 | } | ||
| @@ -345,12 +358,12 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||||
| 345 | if templ_7745c5c3_Err != nil { | 358 | if templ_7745c5c3_Err != nil { | ||
| 346 | return templ_7745c5c3_Err | 359 | return templ_7745c5c3_Err | ||
| 347 | } | 360 | } | ||
| 348 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</main>") | 361 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</main>") |
| 349 | if templ_7745c5c3_Err != nil { | 362 | if templ_7745c5c3_Err != nil { | ||
| 350 | return templ_7745c5c3_Err | 363 | return templ_7745c5c3_Err | ||
| 351 | } | 364 | } | ||
| 352 | if l.HasRail && rail != nil { | 365 | if l.HasRail && rail != nil { | ||
| 353 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "<aside class=\"rail\" aria-label=\"Context\">") | 366 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<aside class=\"rail\" aria-label=\"Context\">") |
| 354 | if templ_7745c5c3_Err != nil { | 367 | if templ_7745c5c3_Err != nil { | ||
| 355 | return templ_7745c5c3_Err | 368 | return templ_7745c5c3_Err | ||
| 356 | } | 369 | } | ||
| @@ -358,12 +371,12 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||||
| 358 | if templ_7745c5c3_Err != nil { | 371 | if templ_7745c5c3_Err != nil { | ||
| 359 | return templ_7745c5c3_Err | 372 | return templ_7745c5c3_Err | ||
| 360 | } | 373 | } | ||
| 361 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</aside>") | 374 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</aside>") |
| 362 | if templ_7745c5c3_Err != nil { | 375 | if templ_7745c5c3_Err != nil { | ||
| 363 | return templ_7745c5c3_Err | 376 | return templ_7745c5c3_Err | ||
| 364 | } | 377 | } | ||
| 365 | } | 378 | } | ||
| 366 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</div>") | 379 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</div>") |
| 367 | if templ_7745c5c3_Err != nil { | 380 | if templ_7745c5c3_Err != nil { | ||
| 368 | return templ_7745c5c3_Err | 381 | return templ_7745c5c3_Err | ||
| 369 | } | 382 | } | ||
| @@ -391,7 +404,7 @@ func Shell(l Layout, rail templ.Component) templ.Component { | |||||
| 391 | if templ_7745c5c3_Err != nil { | 404 | if templ_7745c5c3_Err != nil { | ||
| 392 | return templ_7745c5c3_Err | 405 | return templ_7745c5c3_Err | ||
| 393 | } | 406 | } | ||
| 394 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</body></html>") | 407 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "</body></html>") |
| 395 | if templ_7745c5c3_Err != nil { | 408 | if templ_7745c5c3_Err != nil { | ||
| 396 | return templ_7745c5c3_Err | 409 | return templ_7745c5c3_Err | ||
| 397 | } | 410 | } | ||
| @@ -417,324 +430,324 @@ func Header(l Layout) templ.Component { | |||||
| 417 | }() | 430 | }() | ||
| 418 | } | 431 | } | ||
| 419 | ctx = templ.InitializeContext(ctx) | 432 | ctx = templ.InitializeContext(ctx) | ||
| 420 | - | templ_7745c5c3_Var23 := templ.GetChildren(ctx) | 433 | + | templ_7745c5c3_Var24 := templ.GetChildren(ctx) |
| 421 | - | if templ_7745c5c3_Var23 == nil { | 434 | + | if templ_7745c5c3_Var24 == nil { |
| 422 | - | templ_7745c5c3_Var23 = templ.NopComponent | 435 | + | templ_7745c5c3_Var24 = templ.NopComponent |
| 423 | } | 436 | } | ||
| 424 | ctx = templ.ClearChildren(ctx) | 437 | ctx = templ.ClearChildren(ctx) | ||
| 425 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<header class=\"hdr\"><div class=\"hdr-top\"><a class=\"brand\" href=\"/\" data-g=\"h\" aria-label=\"home\" title=\"home (g h)\"><span class=\"brand-mark\" aria-hidden=\"true\"></span></a> ") | 438 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "<header class=\"hdr\"><div class=\"hdr-top\"><a class=\"brand\" href=\"/\" data-g=\"h\" aria-label=\"home\" title=\"home (g h)\"><span class=\"brand-mark\" aria-hidden=\"true\"></span></a> ") |
| 426 | if templ_7745c5c3_Err != nil { | 439 | if templ_7745c5c3_Err != nil { | ||
| 427 | return templ_7745c5c3_Err | 440 | return templ_7745c5c3_Err | ||
| 428 | } | 441 | } | ||
| 429 | if len(l.Crumbs) > 0 { | 442 | if len(l.Crumbs) > 0 { | ||
| 430 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "<nav class=\"crumbs\" aria-label=\"Path\"><ol>") | 443 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<nav class=\"crumbs\" aria-label=\"Path\"><ol>") |
| 431 | if templ_7745c5c3_Err != nil { | 444 | if templ_7745c5c3_Err != nil { | ||
| 432 | return templ_7745c5c3_Err | 445 | return templ_7745c5c3_Err | ||
| 433 | } | 446 | } | ||
| 434 | for _, c := range l.Crumbs { | 447 | for _, c := range l.Crumbs { | ||
| 435 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<li>") | 448 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<li>") |
| 436 | if templ_7745c5c3_Err != nil { | 449 | if templ_7745c5c3_Err != nil { | ||
| 437 | return templ_7745c5c3_Err | 450 | return templ_7745c5c3_Err | ||
| 438 | } | 451 | } | ||
| 439 | if c.Href != "" { | 452 | if c.Href != "" { | ||
| 440 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<a href=\"") | 453 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<a href=\"") |
| 441 | if templ_7745c5c3_Err != nil { | 454 | if templ_7745c5c3_Err != nil { | ||
| 442 | return templ_7745c5c3_Err | 455 | return templ_7745c5c3_Err | ||
| 443 | } | 456 | } | ||
| 444 | - | var templ_7745c5c3_Var24 templ.SafeURL | 457 | + | var templ_7745c5c3_Var25 templ.SafeURL |
| 445 | - | templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.Href)) | 458 | + | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.Href)) |
| 446 | if templ_7745c5c3_Err != nil { | 459 | if templ_7745c5c3_Err != nil { | ||
| 447 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 86, Col: 38} | 460 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 87, Col: 38} |
| 448 | } | 461 | } | ||
| 449 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24)) | 462 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) |
| 450 | if templ_7745c5c3_Err != nil { | 463 | if templ_7745c5c3_Err != nil { | ||
| 451 | return templ_7745c5c3_Err | 464 | return templ_7745c5c3_Err | ||
| 452 | } | 465 | } | ||
| 453 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "\"") | 466 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "\"") |
| 454 | if templ_7745c5c3_Err != nil { | 467 | if templ_7745c5c3_Err != nil { | ||
| 455 | return templ_7745c5c3_Err | 468 | return templ_7745c5c3_Err | ||
| 456 | } | 469 | } | ||
| 457 | if c.Current { | 470 | if c.Current { | ||
| 458 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, " aria-current=\"page\"") | 471 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, " aria-current=\"page\"") |
| 459 | if templ_7745c5c3_Err != nil { | 472 | if templ_7745c5c3_Err != nil { | ||
| 460 | return templ_7745c5c3_Err | 473 | return templ_7745c5c3_Err | ||
| 461 | } | 474 | } | ||
| 462 | } | 475 | } | ||
| 463 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, ">") | 476 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, ">") |
| 464 | if templ_7745c5c3_Err != nil { | 477 | if templ_7745c5c3_Err != nil { | ||
| 465 | return templ_7745c5c3_Err | 478 | return templ_7745c5c3_Err | ||
| 466 | } | 479 | } | ||
| 467 | - | var templ_7745c5c3_Var25 string | 480 | + | var templ_7745c5c3_Var26 string |
| 468 | - | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label) | 481 | + | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label) |
| 469 | if templ_7745c5c3_Err != nil { | 482 | if templ_7745c5c3_Err != nil { | ||
| 470 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 90, Col: 19} | 483 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 91, Col: 19} |
| 471 | } | 484 | } | ||
| 472 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) | 485 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) |
| 473 | if templ_7745c5c3_Err != nil { | 486 | if templ_7745c5c3_Err != nil { | ||
| 474 | return templ_7745c5c3_Err | 487 | return templ_7745c5c3_Err | ||
| 475 | } | 488 | } | ||
| 476 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</a>") | 489 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</a>") |
| 477 | if templ_7745c5c3_Err != nil { | 490 | if templ_7745c5c3_Err != nil { | ||
| 478 | return templ_7745c5c3_Err | 491 | return templ_7745c5c3_Err | ||
| 479 | } | 492 | } | ||
| 480 | } else { | 493 | } else { | ||
| 481 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "<span") | 494 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<span") |
| 482 | if templ_7745c5c3_Err != nil { | 495 | if templ_7745c5c3_Err != nil { | ||
| 483 | return templ_7745c5c3_Err | 496 | return templ_7745c5c3_Err | ||
| 484 | } | 497 | } | ||
| 485 | if c.Current { | 498 | if c.Current { | ||
| 486 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, " aria-current=\"page\"") | 499 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, " aria-current=\"page\"") |
| 487 | if templ_7745c5c3_Err != nil { | 500 | if templ_7745c5c3_Err != nil { | ||
| 488 | return templ_7745c5c3_Err | 501 | return templ_7745c5c3_Err | ||
| 489 | } | 502 | } | ||
| 490 | } | 503 | } | ||
| 491 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, ">") | 504 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, ">") |
| 492 | if templ_7745c5c3_Err != nil { | 505 | if templ_7745c5c3_Err != nil { | ||
| 493 | return templ_7745c5c3_Err | 506 | return templ_7745c5c3_Err | ||
| 494 | } | 507 | } | ||
| 495 | - | var templ_7745c5c3_Var26 string | 508 | + | var templ_7745c5c3_Var27 string |
| 496 | - | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label) | 509 | + | templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label) |
| 497 | if templ_7745c5c3_Err != nil { | 510 | if templ_7745c5c3_Err != nil { | ||
| 498 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 96, Col: 19} | 511 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 97, Col: 19} |
| 499 | } | 512 | } | ||
| 500 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) | 513 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27)) |
| 501 | if templ_7745c5c3_Err != nil { | 514 | if templ_7745c5c3_Err != nil { | ||
| 502 | return templ_7745c5c3_Err | 515 | return templ_7745c5c3_Err | ||
| 503 | } | 516 | } | ||
| 504 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</span>") | 517 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</span>") |
| 505 | if templ_7745c5c3_Err != nil { | 518 | if templ_7745c5c3_Err != nil { | ||
| 506 | return templ_7745c5c3_Err | 519 | return templ_7745c5c3_Err | ||
| 507 | } | 520 | } | ||
| 508 | } | 521 | } | ||
| 509 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</li>") | 522 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "</li>") |
| 510 | if templ_7745c5c3_Err != nil { | 523 | if templ_7745c5c3_Err != nil { | ||
| 511 | return templ_7745c5c3_Err | 524 | return templ_7745c5c3_Err | ||
| 512 | } | 525 | } | ||
| 513 | } | 526 | } | ||
| 514 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "</ol></nav>") | 527 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</ol></nav>") |
| 515 | if templ_7745c5c3_Err != nil { | 528 | if templ_7745c5c3_Err != nil { | ||
| 516 | return templ_7745c5c3_Err | 529 | return templ_7745c5c3_Err | ||
| 517 | } | 530 | } | ||
| 518 | } | 531 | } | ||
| 519 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "<div class=\"hdr-acts\">") | 532 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<div class=\"hdr-acts\">") |
| 520 | if templ_7745c5c3_Err != nil { | 533 | if templ_7745c5c3_Err != nil { | ||
| 521 | return templ_7745c5c3_Err | 534 | return templ_7745c5c3_Err | ||
| 522 | } | 535 | } | ||
| 523 | if l.Ref != "" { | 536 | if l.Ref != "" { | ||
| 524 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<a class=\"btn ref\" href=\"") | 537 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<a class=\"btn ref\" href=\"") |
| 525 | if templ_7745c5c3_Err != nil { | 538 | if templ_7745c5c3_Err != nil { | ||
| 526 | return templ_7745c5c3_Err | 539 | return templ_7745c5c3_Err | ||
| 527 | } | 540 | } | ||
| 528 | - | var templ_7745c5c3_Var27 templ.SafeURL | 541 | + | var templ_7745c5c3_Var28 templ.SafeURL |
| 529 | - | templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(repoHref(l.Repo, "refs"))) | 542 | + | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(repoHref(l.Repo, "refs"))) |
| 530 | if templ_7745c5c3_Err != nil { | 543 | if templ_7745c5c3_Err != nil { | ||
| 531 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 107, Col: 52} | 544 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 108, Col: 52} |
| 532 | } | 545 | } | ||
| 533 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27)) | 546 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28)) |
| 534 | if templ_7745c5c3_Err != nil { | 547 | if templ_7745c5c3_Err != nil { | ||
| 535 | return templ_7745c5c3_Err | 548 | return templ_7745c5c3_Err | ||
| 536 | } | 549 | } | ||
| 537 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "\" data-fire=\"refs\" aria-keyshortcuts=\"b\" title=\"switch branch or tag (b)\"><span class=\"ico i-branch\" aria-hidden=\"true\"></span> <span class=\"ref-name\">") | 550 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "\" data-fire=\"refs\" aria-keyshortcuts=\"b\" title=\"switch branch or tag (b)\"><span class=\"ico i-branch\" aria-hidden=\"true\"></span> <span class=\"ref-name\">") |
| 538 | if templ_7745c5c3_Err != nil { | 551 | if templ_7745c5c3_Err != nil { | ||
| 539 | return templ_7745c5c3_Err | 552 | return templ_7745c5c3_Err | ||
| 540 | } | 553 | } | ||
| 541 | - | var templ_7745c5c3_Var28 string | 554 | + | var templ_7745c5c3_Var29 string |
| 542 | - | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(l.Ref) | 555 | + | templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(l.Ref) |
| 543 | if templ_7745c5c3_Err != nil { | 556 | if templ_7745c5c3_Err != nil { | ||
| 544 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 113, Col: 36} | 557 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 114, Col: 36} |
| 545 | } | 558 | } | ||
| 546 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28)) | 559 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) |
| 547 | if templ_7745c5c3_Err != nil { | 560 | if templ_7745c5c3_Err != nil { | ||
| 548 | return templ_7745c5c3_Err | 561 | return templ_7745c5c3_Err | ||
| 549 | } | 562 | } | ||
| 550 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "</span> <span class=\"sha\">") | 563 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</span> <span class=\"sha\">") |
| 551 | if templ_7745c5c3_Err != nil { | 564 | if templ_7745c5c3_Err != nil { | ||
| 552 | return templ_7745c5c3_Err | 565 | return templ_7745c5c3_Err | ||
| 553 | } | 566 | } | ||
| 554 | - | var templ_7745c5c3_Var29 string | 567 | + | var templ_7745c5c3_Var30 string |
| 555 | - | templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(l.Short) | 568 | + | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(l.Short) |
| 556 | if templ_7745c5c3_Err != nil { | 569 | if templ_7745c5c3_Err != nil { | ||
| 557 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 114, Col: 33} | 570 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 115, Col: 33} |
| 558 | } | 571 | } | ||
| 559 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) | 572 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) |
| 560 | if templ_7745c5c3_Err != nil { | 573 | if templ_7745c5c3_Err != nil { | ||
| 561 | return templ_7745c5c3_Err | 574 | return templ_7745c5c3_Err | ||
| 562 | } | 575 | } | ||
| 563 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</span></a> ") | 576 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</span></a> ") |
| 564 | if templ_7745c5c3_Err != nil { | 577 | if templ_7745c5c3_Err != nil { | ||
| 565 | return templ_7745c5c3_Err | 578 | return templ_7745c5c3_Err | ||
| 566 | } | 579 | } | ||
| 567 | } | 580 | } | ||
| 568 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "<button type=\"button\" class=\"btn search\" data-js aria-haspopup=\"dialog\" aria-controls=\"panel-cmd\" aria-keyshortcuts=\"Control+K :\" title=\"go to a section, ref, file or repo (ctrl k or :)\" data-fire=\"cmd\"><span class=\"ico i-search\" aria-hidden=\"true\"></span> <span class=\"search-label\">Go to…</span> <kbd aria-hidden=\"true\">ctrl k</kbd></button> ") | 581 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<button type=\"button\" class=\"btn search\" data-js aria-haspopup=\"dialog\" aria-controls=\"panel-cmd\" aria-keyshortcuts=\"Control+K :\" title=\"go to a section, ref, file or repo (ctrl k or :)\" data-fire=\"cmd\"><span class=\"ico i-search\" aria-hidden=\"true\"></span> <span class=\"search-label\">Go to…</span> <kbd aria-hidden=\"true\">ctrl k</kbd></button> ") |
| 569 | if templ_7745c5c3_Err != nil { | 582 | if templ_7745c5c3_Err != nil { | ||
| 570 | return templ_7745c5c3_Err | 583 | return templ_7745c5c3_Err | ||
| 571 | } | 584 | } | ||
| 572 | if SignedIn(ctx) { | 585 | if SignedIn(ctx) { | ||
| 573 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<form class=\"owner\" method=\"post\" action=\"/-/logout\"><span class=\"owner-badge\" title=\"signed in as the owner\"><span class=\"ico i-user\" aria-hidden=\"true\"></span>") | 586 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "<form class=\"owner\" method=\"post\" action=\"/-/logout\"><span class=\"owner-badge\" title=\"signed in as the owner\"><span class=\"ico i-user\" aria-hidden=\"true\"></span>") |
| 574 | if templ_7745c5c3_Err != nil { | 587 | if templ_7745c5c3_Err != nil { | ||
| 575 | return templ_7745c5c3_Err | 588 | return templ_7745c5c3_Err | ||
| 576 | } | 589 | } | ||
| 577 | - | var templ_7745c5c3_Var30 string | 590 | + | var templ_7745c5c3_Var31 string |
| 578 | - | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(l.Owner) | 591 | + | templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(l.Owner) |
| 579 | if templ_7745c5c3_Err != nil { | 592 | if templ_7745c5c3_Err != nil { | ||
| 580 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 133, Col: 123} | 593 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 134, Col: 123} |
| 581 | } | 594 | } | ||
| 582 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) | 595 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31)) |
| 583 | if templ_7745c5c3_Err != nil { | 596 | if templ_7745c5c3_Err != nil { | ||
| 584 | return templ_7745c5c3_Err | 597 | return templ_7745c5c3_Err | ||
| 585 | } | 598 | } | ||
| 586 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "</span> ") | 599 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</span> ") |
| 587 | if templ_7745c5c3_Err != nil { | 600 | if templ_7745c5c3_Err != nil { | ||
| 588 | return templ_7745c5c3_Err | 601 | return templ_7745c5c3_Err | ||
| 589 | } | 602 | } | ||
| 590 | if l.Passkeys { | 603 | if l.Passkeys { | ||
| 591 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<a class=\"btn icon\" href=\"/-/passkeys\" aria-label=\"Passkeys\" title=\"passkeys: add or remove the passkeys that sign you in\"><span class=\"ico i-key\" aria-hidden=\"true\"></span></a> ") | 604 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<a class=\"btn icon\" href=\"/-/passkeys\" aria-label=\"Passkeys\" title=\"passkeys: add or remove the passkeys that sign you in\"><span class=\"ico i-key\" aria-hidden=\"true\"></span></a> ") |
| 592 | if templ_7745c5c3_Err != nil { | 605 | if templ_7745c5c3_Err != nil { | ||
| 593 | return templ_7745c5c3_Err | 606 | return templ_7745c5c3_Err | ||
| 594 | } | 607 | } | ||
| 595 | } | 608 | } | ||
| 596 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<button type=\"submit\" class=\"btn icon\" aria-label=\"Sign out\" title=\"sign out of this browser\"><span class=\"ico i-log-out\" aria-hidden=\"true\"></span></button></form>") | 609 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<button type=\"submit\" class=\"btn icon\" aria-label=\"Sign out\" title=\"sign out of this browser\"><span class=\"ico i-log-out\" aria-hidden=\"true\"></span></button></form>") |
| 597 | if templ_7745c5c3_Err != nil { | 610 | if templ_7745c5c3_Err != nil { | ||
| 598 | return templ_7745c5c3_Err | 611 | return templ_7745c5c3_Err | ||
| 599 | } | 612 | } | ||
| 600 | } else if l.Passkeys { | 613 | } else if l.Passkeys { | ||
| 601 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<a class=\"btn icon\" href=\"/-/login\" aria-label=\"Sign in\" title=\"sign in with a passkey\"><span class=\"ico i-log-in\" aria-hidden=\"true\"></span></a>") | 614 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<a class=\"btn icon\" href=\"/-/login\" aria-label=\"Sign in\" title=\"sign in with a passkey\"><span class=\"ico i-log-in\" aria-hidden=\"true\"></span></a>") |
| 602 | if templ_7745c5c3_Err != nil { | 615 | if templ_7745c5c3_Err != nil { | ||
| 603 | return templ_7745c5c3_Err | 616 | return templ_7745c5c3_Err | ||
| 604 | } | 617 | } | ||
| 605 | } | 618 | } | ||
| 606 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</div></div>") | 619 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "</div></div>") |
| 607 | if templ_7745c5c3_Err != nil { | 620 | if templ_7745c5c3_Err != nil { | ||
| 608 | return templ_7745c5c3_Err | 621 | return templ_7745c5c3_Err | ||
| 609 | } | 622 | } | ||
| 610 | if len(l.Sections) > 0 { | 623 | if len(l.Sections) > 0 { | ||
| 611 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "<nav class=\"tabs\" aria-label=\"Sections\"><ul>") | 624 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<nav class=\"tabs\" aria-label=\"Sections\"><ul>") |
| 612 | if templ_7745c5c3_Err != nil { | 625 | if templ_7745c5c3_Err != nil { | ||
| 613 | return templ_7745c5c3_Err | 626 | return templ_7745c5c3_Err | ||
| 614 | } | 627 | } | ||
| 615 | for _, s := range l.Sections { | 628 | for _, s := range l.Sections { | ||
| 616 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<li><a href=\"") | 629 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "<li><a href=\"") |
| 617 | if templ_7745c5c3_Err != nil { | 630 | if templ_7745c5c3_Err != nil { | ||
| 618 | return templ_7745c5c3_Err | 631 | return templ_7745c5c3_Err | ||
| 619 | } | 632 | } | ||
| 620 | - | var templ_7745c5c3_Var31 templ.SafeURL | 633 | + | var templ_7745c5c3_Var32 templ.SafeURL |
| 621 | - | templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(s.Href)) | 634 | + | templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(s.Href)) |
| 622 | if templ_7745c5c3_Err != nil { | 635 | if templ_7745c5c3_Err != nil { | ||
| 623 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 150, Col: 36} | 636 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 151, Col: 36} |
| 624 | } | 637 | } | ||
| 625 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31)) | 638 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32)) |
| 626 | if templ_7745c5c3_Err != nil { | 639 | if templ_7745c5c3_Err != nil { | ||
| 627 | return templ_7745c5c3_Err | 640 | return templ_7745c5c3_Err | ||
| 628 | } | 641 | } | ||
| 629 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "\" data-key=\"") | 642 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\" data-key=\"") |
| 630 | if templ_7745c5c3_Err != nil { | 643 | if templ_7745c5c3_Err != nil { | ||
| 631 | return templ_7745c5c3_Err | 644 | return templ_7745c5c3_Err | ||
| 632 | } | 645 | } | ||
| 633 | - | var templ_7745c5c3_Var32 string | 646 | + | var templ_7745c5c3_Var33 string |
| 634 | - | templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key) | 647 | + | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key) |
| 635 | if templ_7745c5c3_Err != nil { | 648 | if templ_7745c5c3_Err != nil { | ||
| 636 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 151, Col: 24} | 649 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 152, Col: 24} |
| 637 | } | 650 | } | ||
| 638 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var32) | 651 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33) |
| 639 | if templ_7745c5c3_Err != nil { | 652 | if templ_7745c5c3_Err != nil { | ||
| 640 | return templ_7745c5c3_Err | 653 | return templ_7745c5c3_Err | ||
| 641 | } | 654 | } | ||
| 642 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\" aria-keyshortcuts=\"") | 655 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "\" aria-keyshortcuts=\"") |
| 643 | if templ_7745c5c3_Err != nil { | 656 | if templ_7745c5c3_Err != nil { | ||
| 644 | return templ_7745c5c3_Err | 657 | return templ_7745c5c3_Err | ||
| 645 | } | 658 | } | ||
| 646 | - | var templ_7745c5c3_Var33 string | 659 | + | var templ_7745c5c3_Var34 string |
| 647 | - | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key) | 660 | + | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Key) |
| 648 | if templ_7745c5c3_Err != nil { | 661 | if templ_7745c5c3_Err != nil { | ||
| 649 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 152, Col: 33} | 662 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 153, Col: 33} |
| 650 | } | 663 | } | ||
| 651 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33) | 664 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var34) |
| 652 | if templ_7745c5c3_Err != nil { | 665 | if templ_7745c5c3_Err != nil { | ||
| 653 | return templ_7745c5c3_Err | 666 | return templ_7745c5c3_Err | ||
| 654 | } | 667 | } | ||
| 655 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "\"") | 668 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "\"") |
| 656 | if templ_7745c5c3_Err != nil { | 669 | if templ_7745c5c3_Err != nil { | ||
| 657 | return templ_7745c5c3_Err | 670 | return templ_7745c5c3_Err | ||
| 658 | } | 671 | } | ||
| 659 | if s.Current { | 672 | if s.Current { | ||
| 660 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " aria-current=\"page\"") | 673 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, " aria-current=\"page\"") |
| 661 | if templ_7745c5c3_Err != nil { | 674 | if templ_7745c5c3_Err != nil { | ||
| 662 | return templ_7745c5c3_Err | 675 | return templ_7745c5c3_Err | ||
| 663 | } | 676 | } | ||
| 664 | } | 677 | } | ||
| 665 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, ">") | 678 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, ">") |
| 666 | if templ_7745c5c3_Err != nil { | 679 | if templ_7745c5c3_Err != nil { | ||
| 667 | return templ_7745c5c3_Err | 680 | return templ_7745c5c3_Err | ||
| 668 | } | 681 | } | ||
| 669 | - | var templ_7745c5c3_Var34 string | 682 | + | var templ_7745c5c3_Var35 string |
| 670 | - | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(s.Label) | 683 | + | templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(s.Label) |
| 671 | if templ_7745c5c3_Err != nil { | 684 | if templ_7745c5c3_Err != nil { | ||
| 672 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 157, Col: 17} | 685 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 158, Col: 17} |
| 673 | } | 686 | } | ||
| 674 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) | 687 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35)) |
| 675 | if templ_7745c5c3_Err != nil { | 688 | if templ_7745c5c3_Err != nil { | ||
| 676 | return templ_7745c5c3_Err | 689 | return templ_7745c5c3_Err | ||
| 677 | } | 690 | } | ||
| 678 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, " ") | 691 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, " ") |
| 679 | if templ_7745c5c3_Err != nil { | 692 | if templ_7745c5c3_Err != nil { | ||
| 680 | return templ_7745c5c3_Err | 693 | return templ_7745c5c3_Err | ||
| 681 | } | 694 | } | ||
| 682 | if s.Count != "" { | 695 | if s.Count != "" { | ||
| 683 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<span class=\"count\">") | 696 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<span class=\"count\">") |
| 684 | if templ_7745c5c3_Err != nil { | 697 | if templ_7745c5c3_Err != nil { | ||
| 685 | return templ_7745c5c3_Err | 698 | return templ_7745c5c3_Err | ||
| 686 | } | 699 | } | ||
| 687 | - | var templ_7745c5c3_Var35 string | 700 | + | var templ_7745c5c3_Var36 string |
| 688 | - | templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(s.Count) | 701 | + | templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(s.Count) |
| 689 | if templ_7745c5c3_Err != nil { | 702 | if templ_7745c5c3_Err != nil { | ||
| 690 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 159, Col: 38} | 703 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 160, Col: 38} |
| 691 | } | 704 | } | ||
| 692 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35)) | 705 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36)) |
| 693 | if templ_7745c5c3_Err != nil { | 706 | if templ_7745c5c3_Err != nil { | ||
| 694 | return templ_7745c5c3_Err | 707 | return templ_7745c5c3_Err | ||
| 695 | } | 708 | } | ||
| 696 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<span class=\"sr\">") | 709 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<span class=\"sr\">") |
| 697 | if templ_7745c5c3_Err != nil { | 710 | if templ_7745c5c3_Err != nil { | ||
| 698 | return templ_7745c5c3_Err | 711 | return templ_7745c5c3_Err | ||
| 699 | } | 712 | } | ||
| 700 | - | var templ_7745c5c3_Var36 string | 713 | + | var templ_7745c5c3_Var37 string |
| 701 | - | templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(" open") | 714 | + | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(" open") |
| 702 | if templ_7745c5c3_Err != nil { | 715 | if templ_7745c5c3_Err != nil { | ||
| 703 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 159, Col: 66} | 716 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 160, Col: 66} |
| 704 | } | 717 | } | ||
| 705 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36)) | 718 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) |
| 706 | if templ_7745c5c3_Err != nil { | 719 | if templ_7745c5c3_Err != nil { | ||
| 707 | return templ_7745c5c3_Err | 720 | return templ_7745c5c3_Err | ||
| 708 | } | 721 | } | ||
| 709 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "</span></span> ") | 722 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "</span></span> ") |
| 710 | if templ_7745c5c3_Err != nil { | 723 | if templ_7745c5c3_Err != nil { | ||
| 711 | return templ_7745c5c3_Err | 724 | return templ_7745c5c3_Err | ||
| 712 | } | 725 | } | ||
| 713 | } | 726 | } | ||
| 714 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "<kbd aria-hidden=\"true\">") | 727 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<kbd aria-hidden=\"true\">") |
| 715 | if templ_7745c5c3_Err != nil { | 728 | if templ_7745c5c3_Err != nil { | ||
| 716 | return templ_7745c5c3_Err | 729 | return templ_7745c5c3_Err | ||
| 717 | } | 730 | } | ||
| 718 | - | var templ_7745c5c3_Var37 string | 731 | + | var templ_7745c5c3_Var38 string |
| 719 | - | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(s.Key) | 732 | + | templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(s.Key) |
| 720 | if templ_7745c5c3_Err != nil { | 733 | if templ_7745c5c3_Err != nil { | ||
| 721 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 161, Col: 39} | 734 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 162, Col: 39} |
| 722 | } | 735 | } | ||
| 723 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) | 736 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) |
| 724 | if templ_7745c5c3_Err != nil { | 737 | if templ_7745c5c3_Err != nil { | ||
| 725 | return templ_7745c5c3_Err | 738 | return templ_7745c5c3_Err | ||
| 726 | } | 739 | } | ||
| 727 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "</kbd></a></li>") | 740 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "</kbd></a></li>") |
| 728 | if templ_7745c5c3_Err != nil { | 741 | if templ_7745c5c3_Err != nil { | ||
| 729 | return templ_7745c5c3_Err | 742 | return templ_7745c5c3_Err | ||
| 730 | } | 743 | } | ||
| 731 | } | 744 | } | ||
| 732 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "</ul></nav>") | 745 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "</ul></nav>") |
| 733 | if templ_7745c5c3_Err != nil { | 746 | if templ_7745c5c3_Err != nil { | ||
| 734 | return templ_7745c5c3_Err | 747 | return templ_7745c5c3_Err | ||
| 735 | } | 748 | } | ||
| 736 | } | 749 | } | ||
| 737 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "</header>") | 750 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</header>") |
| 738 | if templ_7745c5c3_Err != nil { | 751 | if templ_7745c5c3_Err != nil { | ||
| 739 | return templ_7745c5c3_Err | 752 | return templ_7745c5c3_Err | ||
| 740 | } | 753 | } | ||
| @@ -760,38 +773,38 @@ func Footer(l Layout) templ.Component { | |||||
| 760 | }() | 773 | }() | ||
| 761 | } | 774 | } | ||
| 762 | ctx = templ.InitializeContext(ctx) | 775 | ctx = templ.InitializeContext(ctx) | ||
| 763 | - | templ_7745c5c3_Var38 := templ.GetChildren(ctx) | 776 | + | templ_7745c5c3_Var39 := templ.GetChildren(ctx) |
| 764 | - | if templ_7745c5c3_Var38 == nil { | 777 | + | if templ_7745c5c3_Var39 == nil { |
| 765 | - | templ_7745c5c3_Var38 = templ.NopComponent | 778 | + | templ_7745c5c3_Var39 = templ.NopComponent |
| 766 | } | 779 | } | ||
| 767 | ctx = templ.ClearChildren(ctx) | 780 | ctx = templ.ClearChildren(ctx) | ||
| 768 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "<footer class=\"foot\"><span>ermite ") | 781 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "<footer class=\"foot\"><span>ermite ") |
| 769 | if templ_7745c5c3_Err != nil { | 782 | if templ_7745c5c3_Err != nil { | ||
| 770 | return templ_7745c5c3_Err | 783 | return templ_7745c5c3_Err | ||
| 771 | } | 784 | } | ||
| 772 | - | var templ_7745c5c3_Var39 string | 785 | + | var templ_7745c5c3_Var40 string |
| 773 | - | templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(l.Version) | 786 | + | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(l.Version) |
| 774 | if templ_7745c5c3_Err != nil { | 787 | if templ_7745c5c3_Err != nil { | ||
| 775 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 175, Col: 26} | 788 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 176, Col: 26} |
| 776 | } | 789 | } | ||
| 777 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) | 790 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) |
| 778 | if templ_7745c5c3_Err != nil { | 791 | if templ_7745c5c3_Err != nil { | ||
| 779 | return templ_7745c5c3_Err | 792 | return templ_7745c5c3_Err | ||
| 780 | } | 793 | } | ||
| 781 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</span> <a href=\"") | 794 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</span> <a href=\"") |
| 782 | if templ_7745c5c3_Err != nil { | 795 | if templ_7745c5c3_Err != nil { | ||
| 783 | return templ_7745c5c3_Err | 796 | return templ_7745c5c3_Err | ||
| 784 | } | 797 | } | ||
| 785 | - | var templ_7745c5c3_Var40 templ.SafeURL | 798 | + | var templ_7745c5c3_Var41 templ.SafeURL |
| 786 | - | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(l.SourceURL)) | 799 | + | templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(l.SourceURL)) |
| 787 | if templ_7745c5c3_Err != nil { | 800 | if templ_7745c5c3_Err != nil { | ||
| 788 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 176, Col: 38} | 801 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/shell.templ`, Line: 177, Col: 38} |
| 789 | } | 802 | } | ||
| 790 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) | 803 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41)) |
| 791 | if templ_7745c5c3_Err != nil { | 804 | if templ_7745c5c3_Err != nil { | ||
| 792 | return templ_7745c5c3_Err | 805 | return templ_7745c5c3_Err | ||
| 793 | } | 806 | } | ||
| 794 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "\" rel=\"noopener\" title=\"source of this version (AGPL-3.0-or-later)\">source</a> <button type=\"button\" class=\"foot-keys\" data-js data-fire=\"help\" aria-haspopup=\"dialog\" aria-controls=\"panel-help\" aria-keyshortcuts=\"?\"><kbd aria-hidden=\"true\">?</kbd> keyboard shortcuts</button></footer>") | 807 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "\" rel=\"noopener\" title=\"source of this version (AGPL-3.0-or-later)\">source</a> <button type=\"button\" class=\"foot-keys\" data-js data-fire=\"help\" aria-haspopup=\"dialog\" aria-controls=\"panel-help\" aria-keyshortcuts=\"?\"><kbd aria-hidden=\"true\">?</kbd> keyboard shortcuts</button></footer>") |
| 795 | if templ_7745c5c3_Err != nil { | 808 | if templ_7745c5c3_Err != nil { | ||
| 796 | return templ_7745c5c3_Err | 809 | return templ_7745c5c3_Err | ||
| 797 | } | 810 | } | ||
| @@ -819,12 +832,12 @@ func Hint(l Layout) templ.Component { | |||||
| 819 | }() | 832 | }() | ||
| 820 | } | 833 | } | ||
| 821 | ctx = templ.InitializeContext(ctx) | 834 | ctx = templ.InitializeContext(ctx) | ||
| 822 | - | templ_7745c5c3_Var41 := templ.GetChildren(ctx) | 835 | + | templ_7745c5c3_Var42 := templ.GetChildren(ctx) |
| 823 | - | if templ_7745c5c3_Var41 == nil { | 836 | + | if templ_7745c5c3_Var42 == nil { |
| 824 | - | templ_7745c5c3_Var41 = templ.NopComponent | 837 | + | templ_7745c5c3_Var42 = templ.NopComponent |
| 825 | } | 838 | } | ||
| 826 | ctx = templ.ClearChildren(ctx) | 839 | ctx = templ.ClearChildren(ctx) | ||
| 827 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "<div class=\"hint\" role=\"status\" aria-live=\"polite\"><span class=\"hint-nav\" :text=\"document.body.dataset.nav || ''\"></span> <span class=\"hint-sel\" :text=\"document.body.dataset.sel ? document.body.dataset.sel + ' · y permalink' : ''\"></span> <span class=\"hint-flash\" :text=\"document.body.dataset.flash || ''\"></span>") | 840 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "<div class=\"hint\" role=\"status\" aria-live=\"polite\"><span class=\"hint-nav\" :text=\"document.body.dataset.nav || ''\"></span> <span class=\"hint-sel\" :text=\"document.body.dataset.sel ? document.body.dataset.sel + ' · y permalink' : ''\"></span> <span class=\"hint-flash\" :text=\"document.body.dataset.flash || ''\"></span>") |
| 828 | if templ_7745c5c3_Err != nil { | 841 | if templ_7745c5c3_Err != nil { | ||
| 829 | return templ_7745c5c3_Err | 842 | return templ_7745c5c3_Err | ||
| 830 | } | 843 | } | ||
| @@ -832,7 +845,7 @@ func Hint(l Layout) templ.Component { | |||||
| 832 | if templ_7745c5c3_Err != nil { | 845 | if templ_7745c5c3_Err != nil { | ||
| 833 | return templ_7745c5c3_Err | 846 | return templ_7745c5c3_Err | ||
| 834 | } | 847 | } | ||
| 835 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</div>") | 848 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "</div>") |
| 836 | if templ_7745c5c3_Err != nil { | 849 | if templ_7745c5c3_Err != nil { | ||
| 837 | return templ_7745c5c3_Err | 850 | return templ_7745c5c3_Err | ||
| 838 | } | 851 | } | ||
M internal/adapters/web/static/css/20-shell.css +3 -0
| @@ -26,6 +26,9 @@ | |||
| 26 | 26 | .i-key { --i: url(icons/key.svg); } | |
| 27 | 27 | .i-log-in { --i: url(icons/log-in.svg); } | |
| 28 | 28 | .i-log-out { --i: url(icons/log-out.svg); } | |
| 29 | + | .i-cards { --i: url(icons/cards.svg); } | |
| 30 | + | .i-split { --i: url(icons/split.svg); } | |
| 31 | + | .i-compact { --i: url(icons/compact.svg); } | |
| 29 | 32 | ||
| 30 | 33 | .pill { | |
| 31 | 34 | display: inline-flex; align-items: center; height: 20px; padding: 0 var(--s2); margin-left: var(--s1); | |
| @@ -26,6 +26,9 @@ | |||||
| 26 | .i-key { --i: url(icons/key.svg); } | 26 | .i-key { --i: url(icons/key.svg); } | ||
| 27 | .i-log-in { --i: url(icons/log-in.svg); } | 27 | .i-log-in { --i: url(icons/log-in.svg); } | ||
| 28 | .i-log-out { --i: url(icons/log-out.svg); } | 28 | .i-log-out { --i: url(icons/log-out.svg); } | ||
| 29 | + | .i-cards { --i: url(icons/cards.svg); } | |||
| 30 | + | .i-split { --i: url(icons/split.svg); } | |||
| 31 | + | .i-compact { --i: url(icons/compact.svg); } | |||
| 29 | 32 | ||||
| 30 | .pill { | 33 | .pill { | ||
| 31 | display: inline-flex; align-items: center; height: 20px; padding: 0 var(--s2); margin-left: var(--s1); | 34 | display: inline-flex; align-items: center; height: 20px; padding: 0 var(--s2); margin-left: var(--s1); | ||
M internal/adapters/web/static/css/30-list.css +98 -0
| @@ -135,6 +135,104 @@ | |||
| 135 | 135 | & .repo-commits { min-height: 0; } | |
| 136 | 136 | } | |
| 137 | 137 | } | |
| 138 | + | /* Home layouts. The server renders "cards" (the rules above); a script | |
| 139 | + | sets .home[data-layout] from the stored choice. The rows carry no markup | |
| 140 | + | of their own for a layout, so a row swapped in by a live update fits. */ | |
| 141 | + | .home .layout-switch { display: flex; align-items: center; gap: 2px; } | |
| 142 | + | .home .layout-switch .btn { | |
| 143 | + | width: 28px; height: 28px; color: var(--ink-dim); background: none; border-color: transparent; border-radius: var(--r-s); | |
| 144 | + | &:hover { color: var(--ink-hi); background: var(--bg-raised); } | |
| 145 | + | &[aria-pressed="true"] { color: var(--ink-hi); background: var(--bg-raised); border-color: var(--border-strong); } | |
| 146 | + | } | |
| 147 | + | .home .home-bar .sort { margin-left: auto; } | |
| 148 | + | ||
| 149 | + | /* split: two denser cards side by side. Name and CI state on top, the | |
| 150 | + | description, the pulse as a band from edge to edge, the figures in one | |
| 151 | + | row and the two newest commits. One column on a narrow screen. */ | |
| 152 | + | .home[data-layout="split"] { | |
| 153 | + | & .repos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); } | |
| 154 | + | & .repo { | |
| 155 | + | grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s3); row-gap: 0; | |
| 156 | + | grid-template-areas: "name ci" "desc desc" "topics topics" "pulse pulse" "stats stats" "recent recent"; | |
| 157 | + | grid-template-rows: auto 1fr auto auto auto auto; | |
| 158 | + | overflow: hidden; | |
| 159 | + | } | |
| 160 | + | & .repo-main, & .repo-head { display: contents; } | |
| 161 | + | & .repo-name { grid-area: name; align-self: center; font-size: 16px; } | |
| 162 | + | & .repo-ci { grid-area: ci; align-self: center; padding-top: 0; } | |
| 163 | + | & .repo-desc { grid-area: desc; margin-top: var(--s2); } | |
| 164 | + | & .repo-topics { grid-area: topics; margin-top: var(--s2); } | |
| 165 | + | & .repo-topics:empty { display: none; } | |
| 166 | + | & .repo-pulse { grid-area: pulse; margin: var(--s3) calc(-1 * var(--s4)) 0; padding: 0; border-block: 1px solid var(--border); } | |
| 167 | + | /* one row while it fits; a narrow card wraps the figures instead of | |
| 168 | + | letting them overlap */ | |
| 169 | + | & .repo-stats { grid-area: stats; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s3); margin-top: var(--s3); } | |
| 170 | + | & .repo-stats div { flex: none; } | |
| 171 | + | & .repo-stats dd { font-size: var(--fs); } | |
| 172 | + | & .repo-stats .rs-tag dd { max-width: 12ch; } | |
| 173 | + | & .repo-commits { grid-area: recent; min-height: calc(2 * (var(--lh) + 4px)); margin-top: var(--s2); } | |
| 174 | + | & .repo-commits li:nth-child(n+3) { display: none; } | |
| 175 | + | & .repo-commits[data-full] li:last-child { opacity: 1; } | |
| 176 | + | & .repo-commits[data-full] li:nth-child(2) { opacity: .65; } | |
| 177 | + | } | |
| 178 | + | @media (max-width: 900px) { | |
| 179 | + | .home[data-layout="split"] .repos { grid-template-columns: minmax(0, 1fr); } | |
| 180 | + | } | |
| 181 | + | ||
| 182 | + | /* compact: a line per repository. Name, description, figures, CI state and | |
| 183 | + | a small pulse sit in one grid row; the commits and topics are left out. */ | |
| 184 | + | .home[data-layout="compact"] { | |
| 185 | + | & .repos { gap: var(--s2); } | |
| 186 | + | & .repo { | |
| 187 | + | grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 20rem) 5.5rem 140px; | |
| 188 | + | grid-template-areas: "name desc stats ci pulse"; | |
| 189 | + | grid-template-rows: none; column-gap: var(--s4); row-gap: 0; align-items: center; | |
| 190 | + | padding: var(--s2) var(--s4); | |
| 191 | + | } | |
| 192 | + | & .repo-main, & .repo-head { display: contents; } | |
| 193 | + | & .repo-topics, & .repo-commits { display: none; } | |
| 194 | + | & .repo-name { grid-area: name; flex-wrap: nowrap; gap: var(--s2); font-size: var(--fs); line-height: 24px; overflow-wrap: normal; } | |
| 195 | + | & .repo-name a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } | |
| 196 | + | & .repo-name .pill { flex: none; } | |
| 197 | + | & .repo-desc { | |
| 198 | + | grid-area: desc; display: block; min-height: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; | |
| 199 | + | font-size: var(--fs-s); color: var(--ink-mute); | |
| 200 | + | } | |
| 201 | + | /* figures inline, the value before its label; the label of the date and | |
| 202 | + | of the tag is left to screen readers */ | |
| 203 | + | & .repo-stats { grid-area: stats; flex-wrap: nowrap; gap: var(--s3); overflow: hidden; } | |
| 204 | + | & .repo-stats div { flex-direction: row; align-items: baseline; gap: 4px; flex: none; } | |
| 205 | + | & .repo-stats dt { order: 1; font-size: var(--fs-xs); line-height: 16px; letter-spacing: 0; text-transform: none; } | |
| 206 | + | & .repo-stats dd { font-size: var(--fs-xs); line-height: 16px; color: var(--ink-dim); } | |
| 207 | + | & .repo-stats .rs-active dt, & .repo-stats .rs-tag dt { | |
| 208 | + | position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); | |
| 209 | + | } | |
| 210 | + | & .repo-stats .rs-tag dd { max-width: 10ch; } | |
| 211 | + | & .repo-stats .rs-tag dd::before { | |
| 212 | + | content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 3px; vertical-align: -2px; | |
| 213 | + | background: currentColor; mask: url(icons/tag.svg) center / contain no-repeat; | |
| 214 | + | } | |
| 215 | + | & .repo-ci { grid-area: ci; justify-self: start; padding-top: 0; font-size: var(--fs-xs); } | |
| 216 | + | /* the pulse: the same curve, small, with a bigger dot to stay seen */ | |
| 217 | + | & .repo-pulse { grid-area: pulse; width: 100%; height: 100%; min-height: 18px; margin: 0; padding: 0; } | |
| 218 | + | & div.repo-pulse { aspect-ratio: auto; box-sizing: border-box; } | |
| 219 | + | & .repo-pulse svg { position: relative; top: 50%; transform: translateY(-50%); } | |
| 220 | + | & .pulse-grid { display: none; } | |
| 221 | + | & .pulse-dot { r: 9px; stroke: none; } | |
| 222 | + | } | |
| 223 | + | @media (max-width: 1100px) { | |
| 224 | + | .home[data-layout="compact"] .repo { grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 14rem) 5.5rem 96px; column-gap: var(--s3); } | |
| 225 | + | .home[data-layout="compact"] .repo-stats .rs-tag { display: none; } | |
| 226 | + | } | |
| 227 | + | /* on a phone: name and CI state on a line, the description and the figures | |
| 228 | + | under it; the pulse is dropped */ | |
| 229 | + | @media (max-width: 720px) { | |
| 230 | + | .home[data-layout="compact"] .repo { | |
| 231 | + | grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name ci" "desc desc" "stats stats"; row-gap: 2px; | |
| 232 | + | } | |
| 233 | + | .home[data-layout="compact"] .repo-pulse { display: none; } | |
| 234 | + | .home[data-layout="compact"] .repo-stats .rs-tag { display: flex; } | |
| 235 | + | } | |
| 138 | 236 | .list.passkeys { | |
| 139 | 237 | & .c-name { width: auto; font-weight: 600; } | |
| 140 | 238 | & .c-when { width: 120px; font-size: var(--fs-s); } | |
| @@ -135,6 +135,104 @@ | |||||
| 135 | & .repo-commits { min-height: 0; } | 135 | & .repo-commits { min-height: 0; } | ||
| 136 | } | 136 | } | ||
| 137 | } | 137 | } | ||
| 138 | + | /* Home layouts. The server renders "cards" (the rules above); a script | |||
| 139 | + | sets .home[data-layout] from the stored choice. The rows carry no markup | |||
| 140 | + | of their own for a layout, so a row swapped in by a live update fits. */ | |||
| 141 | + | .home .layout-switch { display: flex; align-items: center; gap: 2px; } | |||
| 142 | + | .home .layout-switch .btn { | |||
| 143 | + | width: 28px; height: 28px; color: var(--ink-dim); background: none; border-color: transparent; border-radius: var(--r-s); | |||
| 144 | + | &:hover { color: var(--ink-hi); background: var(--bg-raised); } | |||
| 145 | + | &[aria-pressed="true"] { color: var(--ink-hi); background: var(--bg-raised); border-color: var(--border-strong); } | |||
| 146 | + | } | |||
| 147 | + | .home .home-bar .sort { margin-left: auto; } | |||
| 148 | + | ||||
| 149 | + | /* split: two denser cards side by side. Name and CI state on top, the | |||
| 150 | + | description, the pulse as a band from edge to edge, the figures in one | |||
| 151 | + | row and the two newest commits. One column on a narrow screen. */ | |||
| 152 | + | .home[data-layout="split"] { | |||
| 153 | + | & .repos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); } | |||
| 154 | + | & .repo { | |||
| 155 | + | grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s3); row-gap: 0; | |||
| 156 | + | grid-template-areas: "name ci" "desc desc" "topics topics" "pulse pulse" "stats stats" "recent recent"; | |||
| 157 | + | grid-template-rows: auto 1fr auto auto auto auto; | |||
| 158 | + | overflow: hidden; | |||
| 159 | + | } | |||
| 160 | + | & .repo-main, & .repo-head { display: contents; } | |||
| 161 | + | & .repo-name { grid-area: name; align-self: center; font-size: 16px; } | |||
| 162 | + | & .repo-ci { grid-area: ci; align-self: center; padding-top: 0; } | |||
| 163 | + | & .repo-desc { grid-area: desc; margin-top: var(--s2); } | |||
| 164 | + | & .repo-topics { grid-area: topics; margin-top: var(--s2); } | |||
| 165 | + | & .repo-topics:empty { display: none; } | |||
| 166 | + | & .repo-pulse { grid-area: pulse; margin: var(--s3) calc(-1 * var(--s4)) 0; padding: 0; border-block: 1px solid var(--border); } | |||
| 167 | + | /* one row while it fits; a narrow card wraps the figures instead of | |||
| 168 | + | letting them overlap */ | |||
| 169 | + | & .repo-stats { grid-area: stats; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s3); margin-top: var(--s3); } | |||
| 170 | + | & .repo-stats div { flex: none; } | |||
| 171 | + | & .repo-stats dd { font-size: var(--fs); } | |||
| 172 | + | & .repo-stats .rs-tag dd { max-width: 12ch; } | |||
| 173 | + | & .repo-commits { grid-area: recent; min-height: calc(2 * (var(--lh) + 4px)); margin-top: var(--s2); } | |||
| 174 | + | & .repo-commits li:nth-child(n+3) { display: none; } | |||
| 175 | + | & .repo-commits[data-full] li:last-child { opacity: 1; } | |||
| 176 | + | & .repo-commits[data-full] li:nth-child(2) { opacity: .65; } | |||
| 177 | + | } | |||
| 178 | + | @media (max-width: 900px) { | |||
| 179 | + | .home[data-layout="split"] .repos { grid-template-columns: minmax(0, 1fr); } | |||
| 180 | + | } | |||
| 181 | + | ||||
| 182 | + | /* compact: a line per repository. Name, description, figures, CI state and | |||
| 183 | + | a small pulse sit in one grid row; the commits and topics are left out. */ | |||
| 184 | + | .home[data-layout="compact"] { | |||
| 185 | + | & .repos { gap: var(--s2); } | |||
| 186 | + | & .repo { | |||
| 187 | + | grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 20rem) 5.5rem 140px; | |||
| 188 | + | grid-template-areas: "name desc stats ci pulse"; | |||
| 189 | + | grid-template-rows: none; column-gap: var(--s4); row-gap: 0; align-items: center; | |||
| 190 | + | padding: var(--s2) var(--s4); | |||
| 191 | + | } | |||
| 192 | + | & .repo-main, & .repo-head { display: contents; } | |||
| 193 | + | & .repo-topics, & .repo-commits { display: none; } | |||
| 194 | + | & .repo-name { grid-area: name; flex-wrap: nowrap; gap: var(--s2); font-size: var(--fs); line-height: 24px; overflow-wrap: normal; } | |||
| 195 | + | & .repo-name a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } | |||
| 196 | + | & .repo-name .pill { flex: none; } | |||
| 197 | + | & .repo-desc { | |||
| 198 | + | grid-area: desc; display: block; min-height: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; | |||
| 199 | + | font-size: var(--fs-s); color: var(--ink-mute); | |||
| 200 | + | } | |||
| 201 | + | /* figures inline, the value before its label; the label of the date and | |||
| 202 | + | of the tag is left to screen readers */ | |||
| 203 | + | & .repo-stats { grid-area: stats; flex-wrap: nowrap; gap: var(--s3); overflow: hidden; } | |||
| 204 | + | & .repo-stats div { flex-direction: row; align-items: baseline; gap: 4px; flex: none; } | |||
| 205 | + | & .repo-stats dt { order: 1; font-size: var(--fs-xs); line-height: 16px; letter-spacing: 0; text-transform: none; } | |||
| 206 | + | & .repo-stats dd { font-size: var(--fs-xs); line-height: 16px; color: var(--ink-dim); } | |||
| 207 | + | & .repo-stats .rs-active dt, & .repo-stats .rs-tag dt { | |||
| 208 | + | position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); | |||
| 209 | + | } | |||
| 210 | + | & .repo-stats .rs-tag dd { max-width: 10ch; } | |||
| 211 | + | & .repo-stats .rs-tag dd::before { | |||
| 212 | + | content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 3px; vertical-align: -2px; | |||
| 213 | + | background: currentColor; mask: url(icons/tag.svg) center / contain no-repeat; | |||
| 214 | + | } | |||
| 215 | + | & .repo-ci { grid-area: ci; justify-self: start; padding-top: 0; font-size: var(--fs-xs); } | |||
| 216 | + | /* the pulse: the same curve, small, with a bigger dot to stay seen */ | |||
| 217 | + | & .repo-pulse { grid-area: pulse; width: 100%; height: 100%; min-height: 18px; margin: 0; padding: 0; } | |||
| 218 | + | & div.repo-pulse { aspect-ratio: auto; box-sizing: border-box; } | |||
| 219 | + | & .repo-pulse svg { position: relative; top: 50%; transform: translateY(-50%); } | |||
| 220 | + | & .pulse-grid { display: none; } | |||
| 221 | + | & .pulse-dot { r: 9px; stroke: none; } | |||
| 222 | + | } | |||
| 223 | + | @media (max-width: 1100px) { | |||
| 224 | + | .home[data-layout="compact"] .repo { grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 14rem) 5.5rem 96px; column-gap: var(--s3); } | |||
| 225 | + | .home[data-layout="compact"] .repo-stats .rs-tag { display: none; } | |||
| 226 | + | } | |||
| 227 | + | /* on a phone: name and CI state on a line, the description and the figures | |||
| 228 | + | under it; the pulse is dropped */ | |||
| 229 | + | @media (max-width: 720px) { | |||
| 230 | + | .home[data-layout="compact"] .repo { | |||
| 231 | + | grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name ci" "desc desc" "stats stats"; row-gap: 2px; | |||
| 232 | + | } | |||
| 233 | + | .home[data-layout="compact"] .repo-pulse { display: none; } | |||
| 234 | + | .home[data-layout="compact"] .repo-stats .rs-tag { display: flex; } | |||
| 235 | + | } | |||
| 138 | .list.passkeys { | 236 | .list.passkeys { | ||
| 139 | & .c-name { width: auto; font-weight: 600; } | 237 | & .c-name { width: auto; font-weight: 600; } | ||
| 140 | & .c-when { width: 120px; font-size: var(--fs-s); } | 238 | & .c-when { width: 120px; font-size: var(--fs-s); } | ||
A internal/adapters/web/static/icons/cards.svg +1 -0
| @@ -0,0 +1,1 @@ | |||
| 1 | + | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 12h18"/></svg> | |
| @@ -0,0 +1,1 @@ | |||||
| 1 | + | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 12h18"/></svg> | |||
A internal/adapters/web/static/icons/compact.svg +1 -0
| @@ -0,0 +1,1 @@ | |||
| 1 | + | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/></svg> | |
| @@ -0,0 +1,1 @@ | |||||
| 1 | + | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/></svg> | |||
A internal/adapters/web/static/icons/split.svg +1 -0
| @@ -0,0 +1,1 @@ | |||
| 1 | + | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M12 3v18"/></svg> | |
| @@ -0,0 +1,1 @@ | |||||
| 1 | + | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M12 3v18"/></svg> | |||
M internal/adapters/web/static/js/ermite.js +46 -15
| @@ -13,6 +13,9 @@ | |||
| 13 | 13 | // 6. The lines a diff hides load in place (ermiteGaps; e and E). | |
| 14 | 14 | // 7. The service worker (ermiteInstall). | |
| 15 | 15 | // 8. Chip lists kept on one line, with a … chip (ermiteFit). | |
| 16 | + | // 9. The layout of the home page, remembered in the browser (ermiteLayout). | |
| 17 | + | // | |
| 18 | + | // Preferences are kept by ermiteStore (store.js, loaded first). | |
| 16 | 19 | (() => { | |
| 17 | 20 | // Marks the page as scripted: what does nothing without scripts (the filters, | |
| 18 | 21 | // the "go to" and help buttons) is hidden until this class is set (see the | |
| @@ -481,16 +484,16 @@ | |||
| 481 | 484 | // The preference "single-character shortcuts" (WCAG 2.1.4): off, the keys | |
| 482 | 485 | // that are one printable character (j, k, s, ?, :, G, 1-9 in the merge menu, | |
| 483 | 486 | // …) do nothing. Shortcuts with ctrl or cmd, escape, enter and the arrows | |
| 484 | - | // keep working. The choice lives in localStorage ("keys-off") and is made in | |
| 485 | - | // the help dialog (a checkbox) or the palette (an action). Self-contained: | |
| 486 | - | // jstest/keys.test.mjs evaluates this block alone. | |
| 487 | + | // keep working. The choice is kept by ermiteStore ("keys-off": '1' when off) | |
| 488 | + | // and is made in the help dialog (a checkbox) or the palette (an action). | |
| 489 | + | // Self-contained with store.js: jstest/a11y.test.mjs evaluates this block. | |
| 487 | 490 | window.ermiteKeys = (() => { | |
| 488 | - | const KEY = 'keys-off'; | |
| 489 | - | let off = false; | |
| 490 | - | try { off = localStorage.getItem(KEY) === '1'; } catch { /* no storage: on, and the choice holds for this page */ } | |
| 491 | + | const pref = window.ermiteStore.pref('keys-off', { values: ['1', ''], fallback: '' }); | |
| 492 | + | const isOff = () => pref.get() === '1'; | |
| 491 | 493 | // apply shows the state: the checkbox and the note of the help dialog, | |
| 492 | 494 | // and the label of the palette action. | |
| 493 | 495 | function apply() { | |
| 496 | + | const off = isOff(); | |
| 494 | 497 | const box = document.getElementById('keys-off'); | |
| 495 | 498 | if (box) box.checked = off; | |
| 496 | 499 | const note = document.getElementById('keys-note'); | |
| @@ -503,25 +506,53 @@ | |||
| 503 | 506 | if (act) act.textContent = off ? 'turn single-key shortcuts on' : 'turn single-key shortcuts off'; | |
| 504 | 507 | } | |
| 505 | 508 | function set(v) { | |
| 506 | - | off = !!v; | |
| 507 | - | try { localStorage.setItem(KEY, off ? '1' : ''); } catch { /* storage refused: holds for this page */ } | |
| 509 | + | pref.set(v ? '1' : ''); | |
| 508 | 510 | apply(); | |
| 509 | 511 | } | |
| 510 | - | addEventListener('storage', (e) => { | |
| 511 | - | if (e.key !== KEY) return; | |
| 512 | - | off = e.newValue === '1'; | |
| 513 | - | apply(); | |
| 514 | - | }); | |
| 512 | + | pref.watch(apply); | |
| 515 | 513 | apply(); | |
| 516 | 514 | return { | |
| 517 | - | off: () => off, | |
| 515 | + | off: isOff, | |
| 518 | 516 | set, | |
| 519 | 517 | apply, | |
| 520 | 518 | // blocks says whether the preference turns this key off. | |
| 521 | - | blocks: (e) => off && e.key.length === 1, | |
| 519 | + | blocks: (e) => isOff() && e.key.length === 1, | |
| 522 | 520 | }; | |
| 523 | 521 | })(); | |
| 524 | 522 | ||
| 523 | + | // The layout of the home page: "cards" (the default), "split" (two | |
| 524 | + | // repositories per row) or "compact" (one line each). The choice is kept by | |
| 525 | + | // ermiteStore ("home-layout"), made with the buttons [data-set-layout] of | |
| 526 | + | // the layout switch, and shown as .home[data-layout], which the styles | |
| 527 | + | // follow, and as aria-pressed on the buttons. Another tab's change applies | |
| 528 | + | // here at once. The topic chips are fitted again: their room changes with the | |
| 529 | + | // layout. Self-contained with store.js: jstest/layout.test.mjs evaluates | |
| 530 | + | // this block. | |
| 531 | + | window.ermiteLayout = (() => { | |
| 532 | + | const values = ['cards', 'split', 'compact']; | |
| 533 | + | const pref = window.ermiteStore.pref('home-layout', { values, fallback: 'cards' }); | |
| 534 | + | function apply() { | |
| 535 | + | const layout = pref.get(); | |
| 536 | + | const home = document.querySelector('.home'); | |
| 537 | + | if (home) home.setAttribute('data-layout', layout); | |
| 538 | + | for (const b of document.querySelectorAll('[data-set-layout]')) { | |
| 539 | + | b.setAttribute('aria-pressed', String(b.getAttribute('data-set-layout') === layout)); | |
| 540 | + | } | |
| 541 | + | window.ermiteFit?.all(); | |
| 542 | + | } | |
| 543 | + | function set(v) { | |
| 544 | + | pref.set(v); | |
| 545 | + | apply(); | |
| 546 | + | } | |
| 547 | + | addEventListener('click', (e) => { | |
| 548 | + | const btn = e.target.closest?.('[data-set-layout]'); | |
| 549 | + | if (btn) set(btn.getAttribute('data-set-layout')); | |
| 550 | + | }); | |
| 551 | + | pref.watch(apply); | |
| 552 | + | apply(); | |
| 553 | + | return { get: pref.get, set, apply, values }; | |
| 554 | + | })(); | |
| 555 | + | ||
| 525 | 556 | // 1. Keys. | |
| 526 | 557 | const single = { j: 'j', k: 'k', G: 'bottom', '/': 'filter', '?': 'help', b: 'refs', f: 'cmd', ':': 'cmd', y: 'permalink', | |
| 527 | 558 | s: 's', t: 't', c: 'c', r: 'r', m: 'm', n: 'next', h: 'left', l: 'right', d: 'split', u: 'unified', x: 'collapse', e: 'expand', E: 'expandAll', Enter: 'open', Escape: 'esc', | |
| @@ -13,6 +13,9 @@ | |||||
| 13 | // 6. The lines a diff hides load in place (ermiteGaps; e and E). | 13 | // 6. The lines a diff hides load in place (ermiteGaps; e and E). | ||
| 14 | // 7. The service worker (ermiteInstall). | 14 | // 7. The service worker (ermiteInstall). | ||
| 15 | // 8. Chip lists kept on one line, with a … chip (ermiteFit). | 15 | // 8. Chip lists kept on one line, with a … chip (ermiteFit). | ||
| 16 | + | // 9. The layout of the home page, remembered in the browser (ermiteLayout). | |||
| 17 | + | // | |||
| 18 | + | // Preferences are kept by ermiteStore (store.js, loaded first). | |||
| 16 | (() => { | 19 | (() => { | ||
| 17 | // Marks the page as scripted: what does nothing without scripts (the filters, | 20 | // Marks the page as scripted: what does nothing without scripts (the filters, | ||
| 18 | // the "go to" and help buttons) is hidden until this class is set (see the | 21 | // the "go to" and help buttons) is hidden until this class is set (see the | ||
| @@ -481,16 +484,16 @@ | |||||
| 481 | // The preference "single-character shortcuts" (WCAG 2.1.4): off, the keys | 484 | // The preference "single-character shortcuts" (WCAG 2.1.4): off, the keys | ||
| 482 | // that are one printable character (j, k, s, ?, :, G, 1-9 in the merge menu, | 485 | // that are one printable character (j, k, s, ?, :, G, 1-9 in the merge menu, | ||
| 483 | // …) do nothing. Shortcuts with ctrl or cmd, escape, enter and the arrows | 486 | // …) do nothing. Shortcuts with ctrl or cmd, escape, enter and the arrows | ||
| 484 | - | // keep working. The choice lives in localStorage ("keys-off") and is made in | 487 | + | // keep working. The choice is kept by ermiteStore ("keys-off": '1' when off) |
| 485 | - | // the help dialog (a checkbox) or the palette (an action). Self-contained: | 488 | + | // and is made in the help dialog (a checkbox) or the palette (an action). |
| 486 | - | // jstest/keys.test.mjs evaluates this block alone. | 489 | + | // Self-contained with store.js: jstest/a11y.test.mjs evaluates this block. |
| 487 | window.ermiteKeys = (() => { | 490 | window.ermiteKeys = (() => { | ||
| 488 | - | const KEY = 'keys-off'; | 491 | + | const pref = window.ermiteStore.pref('keys-off', { values: ['1', ''], fallback: '' }); |
| 489 | - | let off = false; | 492 | + | const isOff = () => pref.get() === '1'; |
| 490 | - | try { off = localStorage.getItem(KEY) === '1'; } catch { /* no storage: on, and the choice holds for this page */ } | |||
| 491 | // apply shows the state: the checkbox and the note of the help dialog, | 493 | // apply shows the state: the checkbox and the note of the help dialog, | ||
| 492 | // and the label of the palette action. | 494 | // and the label of the palette action. | ||
| 493 | function apply() { | 495 | function apply() { | ||
| 496 | + | const off = isOff(); | |||
| 494 | const box = document.getElementById('keys-off'); | 497 | const box = document.getElementById('keys-off'); | ||
| 495 | if (box) box.checked = off; | 498 | if (box) box.checked = off; | ||
| 496 | const note = document.getElementById('keys-note'); | 499 | const note = document.getElementById('keys-note'); | ||
| @@ -503,25 +506,53 @@ | |||||
| 503 | if (act) act.textContent = off ? 'turn single-key shortcuts on' : 'turn single-key shortcuts off'; | 506 | if (act) act.textContent = off ? 'turn single-key shortcuts on' : 'turn single-key shortcuts off'; | ||
| 504 | } | 507 | } | ||
| 505 | function set(v) { | 508 | function set(v) { | ||
| 506 | - | off = !!v; | 509 | + | pref.set(v ? '1' : ''); |
| 507 | - | try { localStorage.setItem(KEY, off ? '1' : ''); } catch { /* storage refused: holds for this page */ } | |||
| 508 | apply(); | 510 | apply(); | ||
| 509 | } | 511 | } | ||
| 510 | - | addEventListener('storage', (e) => { | 512 | + | pref.watch(apply); |
| 511 | - | if (e.key !== KEY) return; | |||
| 512 | - | off = e.newValue === '1'; | |||
| 513 | - | apply(); | |||
| 514 | - | }); | |||
| 515 | apply(); | 513 | apply(); | ||
| 516 | return { | 514 | return { | ||
| 517 | - | off: () => off, | 515 | + | off: isOff, |
| 518 | set, | 516 | set, | ||
| 519 | apply, | 517 | apply, | ||
| 520 | // blocks says whether the preference turns this key off. | 518 | // blocks says whether the preference turns this key off. | ||
| 521 | - | blocks: (e) => off && e.key.length === 1, | 519 | + | blocks: (e) => isOff() && e.key.length === 1, |
| 522 | }; | 520 | }; | ||
| 523 | })(); | 521 | })(); | ||
| 524 | 522 | ||||
| 523 | + | // The layout of the home page: "cards" (the default), "split" (two | |||
| 524 | + | // repositories per row) or "compact" (one line each). The choice is kept by | |||
| 525 | + | // ermiteStore ("home-layout"), made with the buttons [data-set-layout] of | |||
| 526 | + | // the layout switch, and shown as .home[data-layout], which the styles | |||
| 527 | + | // follow, and as aria-pressed on the buttons. Another tab's change applies | |||
| 528 | + | // here at once. The topic chips are fitted again: their room changes with the | |||
| 529 | + | // layout. Self-contained with store.js: jstest/layout.test.mjs evaluates | |||
| 530 | + | // this block. | |||
| 531 | + | window.ermiteLayout = (() => { | |||
| 532 | + | const values = ['cards', 'split', 'compact']; | |||
| 533 | + | const pref = window.ermiteStore.pref('home-layout', { values, fallback: 'cards' }); | |||
| 534 | + | function apply() { | |||
| 535 | + | const layout = pref.get(); | |||
| 536 | + | const home = document.querySelector('.home'); | |||
| 537 | + | if (home) home.setAttribute('data-layout', layout); | |||
| 538 | + | for (const b of document.querySelectorAll('[data-set-layout]')) { | |||
| 539 | + | b.setAttribute('aria-pressed', String(b.getAttribute('data-set-layout') === layout)); | |||
| 540 | + | } | |||
| 541 | + | window.ermiteFit?.all(); | |||
| 542 | + | } | |||
| 543 | + | function set(v) { | |||
| 544 | + | pref.set(v); | |||
| 545 | + | apply(); | |||
| 546 | + | } | |||
| 547 | + | addEventListener('click', (e) => { | |||
| 548 | + | const btn = e.target.closest?.('[data-set-layout]'); | |||
| 549 | + | if (btn) set(btn.getAttribute('data-set-layout')); | |||
| 550 | + | }); | |||
| 551 | + | pref.watch(apply); | |||
| 552 | + | apply(); | |||
| 553 | + | return { get: pref.get, set, apply, values }; | |||
| 554 | + | })(); | |||
| 555 | + | ||||
| 525 | // 1. Keys. | 556 | // 1. Keys. | ||
| 526 | const single = { j: 'j', k: 'k', G: 'bottom', '/': 'filter', '?': 'help', b: 'refs', f: 'cmd', ':': 'cmd', y: 'permalink', | 557 | const single = { j: 'j', k: 'k', G: 'bottom', '/': 'filter', '?': 'help', b: 'refs', f: 'cmd', ':': 'cmd', y: 'permalink', | ||
| 527 | s: 's', t: 't', c: 'c', r: 'r', m: 'm', n: 'next', h: 'left', l: 'right', d: 'split', u: 'unified', x: 'collapse', e: 'expand', E: 'expandAll', Enter: 'open', Escape: 'esc', | 558 | s: 's', t: 't', c: 'c', r: 'r', m: 'm', n: 'next', h: 'left', l: 'right', d: 'split', u: 'unified', x: 'collapse', e: 'expand', E: 'expandAll', Enter: 'open', Escape: 'esc', | ||
A internal/adapters/web/static/js/store.js +76 -0
| @@ -0,0 +1,76 @@ | |||
| 1 | + | // store.js: window.ermiteStore, a small client for what the pages remember in | |
| 2 | + | // the browser (localStorage): the preferences. Loaded before ermite.js, which | |
| 3 | + | // builds on it (ermiteKeys, ermiteLayout). | |
| 4 | + | // | |
| 5 | + | // It never throws. Without storage (disabled, private mode, sandboxed frame) | |
| 6 | + | // or when the browser refuses a write (quota), the value is held in memory: | |
| 7 | + | // the choice lasts for this page, and the page works as if it were saved. | |
| 8 | + | // Values are strings, as in localStorage; null says "nothing stored". | |
| 9 | + | // | |
| 10 | + | // get(key, fallback) the value, or fallback (null) when there is none | |
| 11 | + | // set(key, value) stores it; null or undefined removes the key | |
| 12 | + | // remove(key) forgets the key | |
| 13 | + | // watch(key, fn) fn(value or null) when another tab changes the key | |
| 14 | + | // (the "storage" event); answers a function that stops | |
| 15 | + | // pref(key, opts) a preference among a closed list: | |
| 16 | + | // pref(key, { values, fallback }) answers | |
| 17 | + | // { get, set, watch }, where get is always one of | |
| 18 | + | // values (a stored value that is not falls back) and | |
| 19 | + | // set ignores what is not | |
| 20 | + | // | |
| 21 | + | // Self-contained: jstest/store.test.mjs evaluates this file alone. | |
| 22 | + | window.ermiteStore = (() => { | |
| 23 | + | // What storage could not keep, by key. A key mapped to null is removed for | |
| 24 | + | // this page although storage would not say so. | |
| 25 | + | const held = new Map(); | |
| 26 | + | ||
| 27 | + | const area = () => { | |
| 28 | + | try { return localStorage; } catch { return null; } | |
| 29 | + | }; | |
| 30 | + | ||
| 31 | + | function get(key, fallback = null) { | |
| 32 | + | if (held.has(key)) return held.get(key) ?? fallback; | |
| 33 | + | try { return area().getItem(key) ?? fallback; } catch { return fallback; } | |
| 34 | + | } | |
| 35 | + | ||
| 36 | + | function set(key, value) { | |
| 37 | + | if (value === null || value === undefined) return remove(key); | |
| 38 | + | value = String(value); | |
| 39 | + | try { | |
| 40 | + | area().setItem(key, value); | |
| 41 | + | held.delete(key); | |
| 42 | + | } catch { held.set(key, value); } | |
| 43 | + | } | |
| 44 | + | ||
| 45 | + | function remove(key) { | |
| 46 | + | try { | |
| 47 | + | area().removeItem(key); | |
| 48 | + | held.delete(key); | |
| 49 | + | } catch { held.set(key, null); } | |
| 50 | + | } | |
| 51 | + | ||
| 52 | + | function watch(key, fn) { | |
| 53 | + | const on = (e) => { | |
| 54 | + | // key is null when another tab clears the whole storage. | |
| 55 | + | if (e.key !== null && e.key !== key) return; | |
| 56 | + | if (e.storageArea && e.storageArea !== area()) return; | |
| 57 | + | held.delete(key); // the other tab's word is newer than ours | |
| 58 | + | fn(e.key === null ? null : (e.newValue ?? null)); | |
| 59 | + | }; | |
| 60 | + | addEventListener('storage', on); | |
| 61 | + | return () => removeEventListener('storage', on); | |
| 62 | + | } | |
| 63 | + | ||
| 64 | + | function pref(key, { values, fallback }) { | |
| 65 | + | const valid = (v) => (values.includes(v) ? v : fallback); | |
| 66 | + | return { | |
| 67 | + | get: () => valid(get(key)), | |
| 68 | + | set(v) { | |
| 69 | + | if (values.includes(v)) set(key, v); | |
| 70 | + | }, | |
| 71 | + | watch: (fn) => watch(key, (v) => fn(valid(v))), | |
| 72 | + | }; | |
| 73 | + | } | |
| 74 | + | ||
| 75 | + | return { get, set, remove, watch, pref }; | |
| 76 | + | })(); | |
| @@ -0,0 +1,76 @@ | |||||
| 1 | + | // store.js: window.ermiteStore, a small client for what the pages remember in | |||
| 2 | + | // the browser (localStorage): the preferences. Loaded before ermite.js, which | |||
| 3 | + | // builds on it (ermiteKeys, ermiteLayout). | |||
| 4 | + | // | |||
| 5 | + | // It never throws. Without storage (disabled, private mode, sandboxed frame) | |||
| 6 | + | // or when the browser refuses a write (quota), the value is held in memory: | |||
| 7 | + | // the choice lasts for this page, and the page works as if it were saved. | |||
| 8 | + | // Values are strings, as in localStorage; null says "nothing stored". | |||
| 9 | + | // | |||
| 10 | + | // get(key, fallback) the value, or fallback (null) when there is none | |||
| 11 | + | // set(key, value) stores it; null or undefined removes the key | |||
| 12 | + | // remove(key) forgets the key | |||
| 13 | + | // watch(key, fn) fn(value or null) when another tab changes the key | |||
| 14 | + | // (the "storage" event); answers a function that stops | |||
| 15 | + | // pref(key, opts) a preference among a closed list: | |||
| 16 | + | // pref(key, { values, fallback }) answers | |||
| 17 | + | // { get, set, watch }, where get is always one of | |||
| 18 | + | // values (a stored value that is not falls back) and | |||
| 19 | + | // set ignores what is not | |||
| 20 | + | // | |||
| 21 | + | // Self-contained: jstest/store.test.mjs evaluates this file alone. | |||
| 22 | + | window.ermiteStore = (() => { | |||
| 23 | + | // What storage could not keep, by key. A key mapped to null is removed for | |||
| 24 | + | // this page although storage would not say so. | |||
| 25 | + | const held = new Map(); | |||
| 26 | + | ||||
| 27 | + | const area = () => { | |||
| 28 | + | try { return localStorage; } catch { return null; } | |||
| 29 | + | }; | |||
| 30 | + | ||||
| 31 | + | function get(key, fallback = null) { | |||
| 32 | + | if (held.has(key)) return held.get(key) ?? fallback; | |||
| 33 | + | try { return area().getItem(key) ?? fallback; } catch { return fallback; } | |||
| 34 | + | } | |||
| 35 | + | ||||
| 36 | + | function set(key, value) { | |||
| 37 | + | if (value === null || value === undefined) return remove(key); | |||
| 38 | + | value = String(value); | |||
| 39 | + | try { | |||
| 40 | + | area().setItem(key, value); | |||
| 41 | + | held.delete(key); | |||
| 42 | + | } catch { held.set(key, value); } | |||
| 43 | + | } | |||
| 44 | + | ||||
| 45 | + | function remove(key) { | |||
| 46 | + | try { | |||
| 47 | + | area().removeItem(key); | |||
| 48 | + | held.delete(key); | |||
| 49 | + | } catch { held.set(key, null); } | |||
| 50 | + | } | |||
| 51 | + | ||||
| 52 | + | function watch(key, fn) { | |||
| 53 | + | const on = (e) => { | |||
| 54 | + | // key is null when another tab clears the whole storage. | |||
| 55 | + | if (e.key !== null && e.key !== key) return; | |||
| 56 | + | if (e.storageArea && e.storageArea !== area()) return; | |||
| 57 | + | held.delete(key); // the other tab's word is newer than ours | |||
| 58 | + | fn(e.key === null ? null : (e.newValue ?? null)); | |||
| 59 | + | }; | |||
| 60 | + | addEventListener('storage', on); | |||
| 61 | + | return () => removeEventListener('storage', on); | |||
| 62 | + | } | |||
| 63 | + | ||||
| 64 | + | function pref(key, { values, fallback }) { | |||
| 65 | + | const valid = (v) => (values.includes(v) ? v : fallback); | |||
| 66 | + | return { | |||
| 67 | + | get: () => valid(get(key)), | |||
| 68 | + | set(v) { | |||
| 69 | + | if (values.includes(v)) set(key, v); | |||
| 70 | + | }, | |||
| 71 | + | watch: (fn) => watch(key, (v) => fn(valid(v))), | |||
| 72 | + | }; | |||
| 73 | + | } | |||
| 74 | + | ||||
| 75 | + | return { get, set, remove, watch, pref }; | |||
| 76 | + | })(); | |||
M internal/app/testdata/web/blob-binary.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/blob-code.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/blob-empty.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/blob-image.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/blob-markdown.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/blob-svg.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/blob-text.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/blob-too-large.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/blob-trojan.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commit-big.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commit-binary.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commit-merge.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commit-modify-split.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commit-modify.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commit-rename.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commit-root.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commit-trojan.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commits-page2.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commits-path.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commits-root.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/commits-small.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/empty.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/home.html +19 -3
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -50,7 +52,7 @@ | |||
| 50 | 52 | <div class="work"> | |
| 51 | 53 | <main id="main" tabindex="-1"> | |
| 52 | 54 | <h1 class="sr">Repositories</h1> | |
| 53 | - | <div class="home"> | |
| 55 | + | <div class="home" data-layout="cards"> | |
| 54 | 56 | <section class="home-repos" aria-label="Repositories"> | |
| 55 | 57 | <div class="home-bar"> | |
| 56 | 58 | <div class="filter"> | |
| @@ -64,6 +66,20 @@ | |||
| 64 | 66 | </a> | |
| 65 | 67 | <a href="/?sort=name&dir=asc">name </a> | |
| 66 | 68 | </nav> | |
| 69 | + | <div class="layout-switch" role="group" aria-label="Layout" data-js> | |
| 70 | + | <button type="button" class="btn icon" data-set-layout="cards" aria-pressed="true" title="Cards" aria-label="Cards"> | |
| 71 | + | <span class="ico i-cards" aria-hidden="true"> | |
| 72 | + | </span> | |
| 73 | + | </button> | |
| 74 | + | <button type="button" class="btn icon" data-set-layout="split" aria-pressed="false" title="Two columns" aria-label="Two columns"> | |
| 75 | + | <span class="ico i-split" aria-hidden="true"> | |
| 76 | + | </span> | |
| 77 | + | </button> | |
| 78 | + | <button type="button" class="btn icon" data-set-layout="compact" aria-pressed="false" title="Compact list" aria-label="Compact list"> | |
| 79 | + | <span class="ico i-compact" aria-hidden="true"> | |
| 80 | + | </span> | |
| 81 | + | </button> | |
| 82 | + | </div> | |
| 67 | 83 | </div> | |
| 68 | 84 | <ul class="repos" id="repo-rows" data-rows> | |
| 69 | 85 | <li id="repo-demo" class="repo" data-cursor> | |
| @@ -105,7 +121,7 @@ | |||
| 105 | 121 | <dt>last 30 days</dt> | |
| 106 | 122 | <dd>0</dd> | |
| 107 | 123 | </div> | |
| 108 | - | <div> | |
| 124 | + | <div class="rs-active"> | |
| 109 | 125 | <dt>last activity</dt> | |
| 110 | 126 | <dd> | |
| 111 | 127 | <time datetime="STAMP" title="STAMP">AGO</time> | |
| @@ -145,7 +161,7 @@ | |||
| 145 | 161 | </div> | |
| 146 | 162 | <div class="repo-head"> | |
| 147 | 163 | <dl class="repo-stats" aria-label="Figures of quiet"> | |
| 148 | - | <div> | |
| 164 | + | <div class="rs-active"> | |
| 149 | 165 | <dt>last activity</dt> | |
| 150 | 166 | <dd class="mute">never</dd> | |
| 151 | 167 | </div> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
| @@ -50,7 +52,7 @@ | |||||
| 50 | <div class="work"> | 52 | <div class="work"> | ||
| 51 | <main id="main" tabindex="-1"> | 53 | <main id="main" tabindex="-1"> | ||
| 52 | <h1 class="sr">Repositories</h1> | 54 | <h1 class="sr">Repositories</h1> | ||
| 53 | - | <div class="home"> | 55 | + | <div class="home" data-layout="cards"> |
| 54 | <section class="home-repos" aria-label="Repositories"> | 56 | <section class="home-repos" aria-label="Repositories"> | ||
| 55 | <div class="home-bar"> | 57 | <div class="home-bar"> | ||
| 56 | <div class="filter"> | 58 | <div class="filter"> | ||
| @@ -64,6 +66,20 @@ | |||||
| 64 | </a> | 66 | </a> | ||
| 65 | <a href="/?sort=name&dir=asc">name </a> | 67 | <a href="/?sort=name&dir=asc">name </a> | ||
| 66 | </nav> | 68 | </nav> | ||
| 69 | + | <div class="layout-switch" role="group" aria-label="Layout" data-js> | |||
| 70 | + | <button type="button" class="btn icon" data-set-layout="cards" aria-pressed="true" title="Cards" aria-label="Cards"> | |||
| 71 | + | <span class="ico i-cards" aria-hidden="true"> | |||
| 72 | + | </span> | |||
| 73 | + | </button> | |||
| 74 | + | <button type="button" class="btn icon" data-set-layout="split" aria-pressed="false" title="Two columns" aria-label="Two columns"> | |||
| 75 | + | <span class="ico i-split" aria-hidden="true"> | |||
| 76 | + | </span> | |||
| 77 | + | </button> | |||
| 78 | + | <button type="button" class="btn icon" data-set-layout="compact" aria-pressed="false" title="Compact list" aria-label="Compact list"> | |||
| 79 | + | <span class="ico i-compact" aria-hidden="true"> | |||
| 80 | + | </span> | |||
| 81 | + | </button> | |||
| 82 | + | </div> | |||
| 67 | </div> | 83 | </div> | ||
| 68 | <ul class="repos" id="repo-rows" data-rows> | 84 | <ul class="repos" id="repo-rows" data-rows> | ||
| 69 | <li id="repo-demo" class="repo" data-cursor> | 85 | <li id="repo-demo" class="repo" data-cursor> | ||
| @@ -105,7 +121,7 @@ | |||||
| 105 | <dt>last 30 days</dt> | 121 | <dt>last 30 days</dt> | ||
| 106 | <dd>0</dd> | 122 | <dd>0</dd> | ||
| 107 | </div> | 123 | </div> | ||
| 108 | - | <div> | 124 | + | <div class="rs-active"> |
| 109 | <dt>last activity</dt> | 125 | <dt>last activity</dt> | ||
| 110 | <dd> | 126 | <dd> | ||
| 111 | <time datetime="STAMP" title="STAMP">AGO</time> | 127 | <time datetime="STAMP" title="STAMP">AGO</time> | ||
| @@ -145,7 +161,7 @@ | |||||
| 145 | </div> | 161 | </div> | ||
| 146 | <div class="repo-head"> | 162 | <div class="repo-head"> | ||
| 147 | <dl class="repo-stats" aria-label="Figures of quiet"> | 163 | <dl class="repo-stats" aria-label="Figures of quiet"> | ||
| 148 | - | <div> | 164 | + | <div class="rs-active"> |
| 149 | <dt>last activity</dt> | 165 | <dt>last activity</dt> | ||
| 150 | <dd class="mute">never</dd> | 166 | <dd class="mute">never</dd> | ||
| 151 | </div> | 167 | </div> | ||
M internal/app/testdata/web/not-found-page.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/not-found.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/refs.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/summary.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/tree-nested.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/tree-root.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/tree-slash-ref.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||
M internal/app/testdata/web/tree-subdir.html +2 -0
| @@ -20,6 +20,8 @@ | |||
| 20 | 20 | </script> | |
| 21 | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | |
| 22 | 22 | </script> | |
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |
| 24 | + | </script> | |
| 23 | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | |
| 24 | 26 | </script> | |
| 25 | 27 | <script src="/-/static/js/files.HASH.js" defer> | |
| @@ -20,6 +20,8 @@ | |||||
| 20 | </script> | 20 | </script> | ||
| 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | 21 | <script src="/-/static/js/hx-sse.min.HASH.js" defer> | ||
| 22 | </script> | 22 | </script> | ||
| 23 | + | <script src="/-/static/js/store.HASH.js" defer> | |||
| 24 | + | </script> | |||
| 23 | <script src="/-/static/js/ermite.HASH.js" defer> | 25 | <script src="/-/static/js/ermite.HASH.js" defer> | ||
| 24 | </script> | 26 | </script> | ||
| 25 | <script src="/-/static/js/files.HASH.js" defer> | 27 | <script src="/-/static/js/files.HASH.js" defer> | ||