feat(web): show the latest tag in its own summary rail block
- commit
- 08e63884b6d8316c4c508c604d5fcdfdd75f48bc
- author
- brice · · 2026-10-11 12:46 UTC
- parent
- 5e5d8fb
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
37 files · +500 -297
M cmd/ermite/testdata/web/blob-binary.html +4 -4
| @@ -209,7 +209,7 @@ | |||
| 209 | 209 | <kbd>u</kbd> | |
| 210 | 210 | <kbd>x</kbd> | |
| 211 | 211 | </dt> | |
| 212 | - | <dd>diff: split / unified / collapse all</dd> | |
| 212 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 213 | 213 | </div> | |
| 214 | 214 | <div> | |
| 215 | 215 | <dt> | |
| @@ -383,9 +383,9 @@ | |||
| 383 | 383 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 384 | 384 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 385 | 385 | }; | |
| 386 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 387 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 388 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 386 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 387 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 388 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 389 | 389 | k-permalink from:body -> { | |
| 390 | 390 | let b = document.body.dataset; | |
| 391 | 391 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -209,7 +209,7 @@ | |||||
| 209 | <kbd>u</kbd> | 209 | <kbd>u</kbd> | ||
| 210 | <kbd>x</kbd> | 210 | <kbd>x</kbd> | ||
| 211 | </dt> | 211 | </dt> | ||
| 212 | - | <dd>diff: split / unified / collapse all</dd> | 212 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 213 | </div> | 213 | </div> | ||
| 214 | <div> | 214 | <div> | ||
| 215 | <dt> | 215 | <dt> | ||
| @@ -383,9 +383,9 @@ | |||||
| 383 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 383 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 384 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 384 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 385 | }; | 385 | }; | ||
| 386 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 386 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 387 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 387 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 388 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 388 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 389 | k-permalink from:body -> { | 389 | k-permalink from:body -> { | ||
| 390 | let b = document.body.dataset; | 390 | let b = document.body.dataset; | ||
| 391 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 391 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/blob-code.html +4 -4
| @@ -279,7 +279,7 @@ | |||
| 279 | 279 | <kbd>u</kbd> | |
| 280 | 280 | <kbd>x</kbd> | |
| 281 | 281 | </dt> | |
| 282 | - | <dd>diff: split / unified / collapse all</dd> | |
| 282 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 283 | 283 | </div> | |
| 284 | 284 | <div> | |
| 285 | 285 | <dt> | |
| @@ -453,9 +453,9 @@ | |||
| 453 | 453 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 454 | 454 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 455 | 455 | }; | |
| 456 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 457 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 458 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 456 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 457 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 458 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 459 | 459 | k-permalink from:body -> { | |
| 460 | 460 | let b = document.body.dataset; | |
| 461 | 461 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -279,7 +279,7 @@ | |||||
| 279 | <kbd>u</kbd> | 279 | <kbd>u</kbd> | ||
| 280 | <kbd>x</kbd> | 280 | <kbd>x</kbd> | ||
| 281 | </dt> | 281 | </dt> | ||
| 282 | - | <dd>diff: split / unified / collapse all</dd> | 282 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 283 | </div> | 283 | </div> | ||
| 284 | <div> | 284 | <div> | ||
| 285 | <dt> | 285 | <dt> | ||
| @@ -453,9 +453,9 @@ | |||||
| 453 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 453 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 454 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 454 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 455 | }; | 455 | }; | ||
| 456 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 456 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 457 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 457 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 458 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 458 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 459 | k-permalink from:body -> { | 459 | k-permalink from:body -> { | ||
| 460 | let b = document.body.dataset; | 460 | let b = document.body.dataset; | ||
| 461 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 461 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/blob-empty.html +4 -4
| @@ -209,7 +209,7 @@ | |||
| 209 | 209 | <kbd>u</kbd> | |
| 210 | 210 | <kbd>x</kbd> | |
| 211 | 211 | </dt> | |
| 212 | - | <dd>diff: split / unified / collapse all</dd> | |
| 212 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 213 | 213 | </div> | |
| 214 | 214 | <div> | |
| 215 | 215 | <dt> | |
| @@ -383,9 +383,9 @@ | |||
| 383 | 383 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 384 | 384 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 385 | 385 | }; | |
| 386 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 387 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 388 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 386 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 387 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 388 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 389 | 389 | k-permalink from:body -> { | |
| 390 | 390 | let b = document.body.dataset; | |
| 391 | 391 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -209,7 +209,7 @@ | |||||
| 209 | <kbd>u</kbd> | 209 | <kbd>u</kbd> | ||
| 210 | <kbd>x</kbd> | 210 | <kbd>x</kbd> | ||
| 211 | </dt> | 211 | </dt> | ||
| 212 | - | <dd>diff: split / unified / collapse all</dd> | 212 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 213 | </div> | 213 | </div> | ||
| 214 | <div> | 214 | <div> | ||
| 215 | <dt> | 215 | <dt> | ||
| @@ -383,9 +383,9 @@ | |||||
| 383 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 383 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 384 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 384 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 385 | }; | 385 | }; | ||
| 386 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 386 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 387 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 387 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 388 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 388 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 389 | k-permalink from:body -> { | 389 | k-permalink from:body -> { | ||
| 390 | let b = document.body.dataset; | 390 | let b = document.body.dataset; | ||
| 391 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 391 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/blob-image.html +4 -4
| @@ -211,7 +211,7 @@ | |||
| 211 | 211 | <kbd>u</kbd> | |
| 212 | 212 | <kbd>x</kbd> | |
| 213 | 213 | </dt> | |
| 214 | - | <dd>diff: split / unified / collapse all</dd> | |
| 214 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 215 | 215 | </div> | |
| 216 | 216 | <div> | |
| 217 | 217 | <dt> | |
| @@ -385,9 +385,9 @@ | |||
| 385 | 385 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 386 | 386 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 387 | 387 | }; | |
| 388 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 389 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 390 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 388 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 389 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 390 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 391 | 391 | k-permalink from:body -> { | |
| 392 | 392 | let b = document.body.dataset; | |
| 393 | 393 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -211,7 +211,7 @@ | |||||
| 211 | <kbd>u</kbd> | 211 | <kbd>u</kbd> | ||
| 212 | <kbd>x</kbd> | 212 | <kbd>x</kbd> | ||
| 213 | </dt> | 213 | </dt> | ||
| 214 | - | <dd>diff: split / unified / collapse all</dd> | 214 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 215 | </div> | 215 | </div> | ||
| 216 | <div> | 216 | <div> | ||
| 217 | <dt> | 217 | <dt> | ||
| @@ -385,9 +385,9 @@ | |||||
| 385 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 385 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 386 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 386 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 387 | }; | 387 | }; | ||
| 388 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 388 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 389 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 389 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 390 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 390 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 391 | k-permalink from:body -> { | 391 | k-permalink from:body -> { | ||
| 392 | let b = document.body.dataset; | 392 | let b = document.body.dataset; | ||
| 393 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 393 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/blob-markdown.html +4 -4
| @@ -276,7 +276,7 @@ | |||
| 276 | 276 | <kbd>u</kbd> | |
| 277 | 277 | <kbd>x</kbd> | |
| 278 | 278 | </dt> | |
| 279 | - | <dd>diff: split / unified / collapse all</dd> | |
| 279 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 280 | 280 | </div> | |
| 281 | 281 | <div> | |
| 282 | 282 | <dt> | |
| @@ -450,9 +450,9 @@ | |||
| 450 | 450 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 451 | 451 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 452 | 452 | }; | |
| 453 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 454 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 455 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 453 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 454 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 455 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 456 | 456 | k-permalink from:body -> { | |
| 457 | 457 | let b = document.body.dataset; | |
| 458 | 458 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -276,7 +276,7 @@ | |||||
| 276 | <kbd>u</kbd> | 276 | <kbd>u</kbd> | ||
| 277 | <kbd>x</kbd> | 277 | <kbd>x</kbd> | ||
| 278 | </dt> | 278 | </dt> | ||
| 279 | - | <dd>diff: split / unified / collapse all</dd> | 279 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 280 | </div> | 280 | </div> | ||
| 281 | <div> | 281 | <div> | ||
| 282 | <dt> | 282 | <dt> | ||
| @@ -450,9 +450,9 @@ | |||||
| 450 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 450 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 451 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 451 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 452 | }; | 452 | }; | ||
| 453 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 453 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 454 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 454 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 455 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 455 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 456 | k-permalink from:body -> { | 456 | k-permalink from:body -> { | ||
| 457 | let b = document.body.dataset; | 457 | let b = document.body.dataset; | ||
| 458 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 458 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/blob-svg.html +4 -4
| @@ -234,7 +234,7 @@ | |||
| 234 | 234 | <kbd>u</kbd> | |
| 235 | 235 | <kbd>x</kbd> | |
| 236 | 236 | </dt> | |
| 237 | - | <dd>diff: split / unified / collapse all</dd> | |
| 237 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 238 | 238 | </div> | |
| 239 | 239 | <div> | |
| 240 | 240 | <dt> | |
| @@ -408,9 +408,9 @@ | |||
| 408 | 408 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 409 | 409 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 410 | 410 | }; | |
| 411 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 412 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 413 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 411 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 412 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 413 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 414 | 414 | k-permalink from:body -> { | |
| 415 | 415 | let b = document.body.dataset; | |
| 416 | 416 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -234,7 +234,7 @@ | |||||
| 234 | <kbd>u</kbd> | 234 | <kbd>u</kbd> | ||
| 235 | <kbd>x</kbd> | 235 | <kbd>x</kbd> | ||
| 236 | </dt> | 236 | </dt> | ||
| 237 | - | <dd>diff: split / unified / collapse all</dd> | 237 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 238 | </div> | 238 | </div> | ||
| 239 | <div> | 239 | <div> | ||
| 240 | <dt> | 240 | <dt> | ||
| @@ -408,9 +408,9 @@ | |||||
| 408 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 408 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 409 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 409 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 410 | }; | 410 | }; | ||
| 411 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 411 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 412 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 412 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 413 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 413 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 414 | k-permalink from:body -> { | 414 | k-permalink from:body -> { | ||
| 415 | let b = document.body.dataset; | 415 | let b = document.body.dataset; | ||
| 416 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 416 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/blob-text.html +4 -4
| @@ -229,7 +229,7 @@ | |||
| 229 | 229 | <kbd>u</kbd> | |
| 230 | 230 | <kbd>x</kbd> | |
| 231 | 231 | </dt> | |
| 232 | - | <dd>diff: split / unified / collapse all</dd> | |
| 232 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 233 | 233 | </div> | |
| 234 | 234 | <div> | |
| 235 | 235 | <dt> | |
| @@ -403,9 +403,9 @@ | |||
| 403 | 403 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 404 | 404 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 405 | 405 | }; | |
| 406 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 407 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 408 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 406 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 407 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 408 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 409 | 409 | k-permalink from:body -> { | |
| 410 | 410 | let b = document.body.dataset; | |
| 411 | 411 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -229,7 +229,7 @@ | |||||
| 229 | <kbd>u</kbd> | 229 | <kbd>u</kbd> | ||
| 230 | <kbd>x</kbd> | 230 | <kbd>x</kbd> | ||
| 231 | </dt> | 231 | </dt> | ||
| 232 | - | <dd>diff: split / unified / collapse all</dd> | 232 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 233 | </div> | 233 | </div> | ||
| 234 | <div> | 234 | <div> | ||
| 235 | <dt> | 235 | <dt> | ||
| @@ -403,9 +403,9 @@ | |||||
| 403 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 403 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 404 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 404 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 405 | }; | 405 | }; | ||
| 406 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 406 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 407 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 407 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 408 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 408 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 409 | k-permalink from:body -> { | 409 | k-permalink from:body -> { | ||
| 410 | let b = document.body.dataset; | 410 | let b = document.body.dataset; | ||
| 411 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 411 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/blob-too-large.html +4 -4
| @@ -209,7 +209,7 @@ | |||
| 209 | 209 | <kbd>u</kbd> | |
| 210 | 210 | <kbd>x</kbd> | |
| 211 | 211 | </dt> | |
| 212 | - | <dd>diff: split / unified / collapse all</dd> | |
| 212 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 213 | 213 | </div> | |
| 214 | 214 | <div> | |
| 215 | 215 | <dt> | |
| @@ -383,9 +383,9 @@ | |||
| 383 | 383 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 384 | 384 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 385 | 385 | }; | |
| 386 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 387 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 388 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 386 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 387 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 388 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 389 | 389 | k-permalink from:body -> { | |
| 390 | 390 | let b = document.body.dataset; | |
| 391 | 391 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -209,7 +209,7 @@ | |||||
| 209 | <kbd>u</kbd> | 209 | <kbd>u</kbd> | ||
| 210 | <kbd>x</kbd> | 210 | <kbd>x</kbd> | ||
| 211 | </dt> | 211 | </dt> | ||
| 212 | - | <dd>diff: split / unified / collapse all</dd> | 212 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 213 | </div> | 213 | </div> | ||
| 214 | <div> | 214 | <div> | ||
| 215 | <dt> | 215 | <dt> | ||
| @@ -383,9 +383,9 @@ | |||||
| 383 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 383 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 384 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 384 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 385 | }; | 385 | }; | ||
| 386 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 386 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 387 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 387 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 388 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 388 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 389 | k-permalink from:body -> { | 389 | k-permalink from:body -> { | ||
| 390 | let b = document.body.dataset; | 390 | let b = document.body.dataset; | ||
| 391 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 391 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/blob-trojan.html +4 -4
| @@ -276,7 +276,7 @@ | |||
| 276 | 276 | <kbd>u</kbd> | |
| 277 | 277 | <kbd>x</kbd> | |
| 278 | 278 | </dt> | |
| 279 | - | <dd>diff: split / unified / collapse all</dd> | |
| 279 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 280 | 280 | </div> | |
| 281 | 281 | <div> | |
| 282 | 282 | <dt> | |
| @@ -450,9 +450,9 @@ | |||
| 450 | 450 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 451 | 451 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 452 | 452 | }; | |
| 453 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 454 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 455 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 453 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 454 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 455 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 456 | 456 | k-permalink from:body -> { | |
| 457 | 457 | let b = document.body.dataset; | |
| 458 | 458 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -276,7 +276,7 @@ | |||||
| 276 | <kbd>u</kbd> | 276 | <kbd>u</kbd> | ||
| 277 | <kbd>x</kbd> | 277 | <kbd>x</kbd> | ||
| 278 | </dt> | 278 | </dt> | ||
| 279 | - | <dd>diff: split / unified / collapse all</dd> | 279 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 280 | </div> | 280 | </div> | ||
| 281 | <div> | 281 | <div> | ||
| 282 | <dt> | 282 | <dt> | ||
| @@ -450,9 +450,9 @@ | |||||
| 450 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 450 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 451 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 451 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 452 | }; | 452 | }; | ||
| 453 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 453 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 454 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 454 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 455 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 455 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 456 | k-permalink from:body -> { | 456 | k-permalink from:body -> { | ||
| 457 | let b = document.body.dataset; | 457 | let b = document.body.dataset; | ||
| 458 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 458 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commit-big.html +7 -5
| @@ -109,7 +109,9 @@ | |||
| 109 | 109 | </a> | |
| 110 | 110 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 111 | 111 | </a> | |
| 112 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | |
| 112 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> | |
| 113 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| 114 | + | <kbd aria-hidden="true">x</kbd> | |
| 113 | 115 | </button> | |
| 114 | 116 | </div> | |
| 115 | 117 | <p class="notice">this diff is incomplete: 1 file is too large to show. the totals above count everything; clone the repository to read the rest.</p> | |
| @@ -244,7 +246,7 @@ | |||
| 244 | 246 | <kbd>u</kbd> | |
| 245 | 247 | <kbd>x</kbd> | |
| 246 | 248 | </dt> | |
| 247 | - | <dd>diff: split / unified / collapse all</dd> | |
| 249 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 248 | 250 | </div> | |
| 249 | 251 | <div> | |
| 250 | 252 | <dt> | |
| @@ -418,9 +420,9 @@ | |||
| 418 | 420 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 419 | 421 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 420 | 422 | }; | |
| 421 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 422 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 423 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 423 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 424 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 425 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 424 | 426 | k-permalink from:body -> { | |
| 425 | 427 | let b = document.body.dataset; | |
| 426 | 428 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -109,7 +109,9 @@ | |||||
| 109 | </a> | 109 | </a> | ||
| 110 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 110 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | ||
| 111 | </a> | 111 | </a> | ||
| 112 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | 112 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> |
| 113 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |||
| 114 | + | <kbd aria-hidden="true">x</kbd> | |||
| 113 | </button> | 115 | </button> | ||
| 114 | </div> | 116 | </div> | ||
| 115 | <p class="notice">this diff is incomplete: 1 file is too large to show. the totals above count everything; clone the repository to read the rest.</p> | 117 | <p class="notice">this diff is incomplete: 1 file is too large to show. the totals above count everything; clone the repository to read the rest.</p> | ||
| @@ -244,7 +246,7 @@ | |||||
| 244 | <kbd>u</kbd> | 246 | <kbd>u</kbd> | ||
| 245 | <kbd>x</kbd> | 247 | <kbd>x</kbd> | ||
| 246 | </dt> | 248 | </dt> | ||
| 247 | - | <dd>diff: split / unified / collapse all</dd> | 249 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 248 | </div> | 250 | </div> | ||
| 249 | <div> | 251 | <div> | ||
| 250 | <dt> | 252 | <dt> | ||
| @@ -418,9 +420,9 @@ | |||||
| 418 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 420 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 419 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 421 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 420 | }; | 422 | }; | ||
| 421 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 423 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 422 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 424 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 423 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 425 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 424 | k-permalink from:body -> { | 426 | k-permalink from:body -> { | ||
| 425 | let b = document.body.dataset; | 427 | let b = document.body.dataset; | ||
| 426 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 428 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commit-binary.html +7 -5
| @@ -105,7 +105,9 @@ | |||
| 105 | 105 | </a> | |
| 106 | 106 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 107 | 107 | </a> | |
| 108 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | |
| 108 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> | |
| 109 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| 110 | + | <kbd aria-hidden="true">x</kbd> | |
| 109 | 111 | </button> | |
| 110 | 112 | </div> | |
| 111 | 113 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | |
| @@ -239,7 +241,7 @@ | |||
| 239 | 241 | <kbd>u</kbd> | |
| 240 | 242 | <kbd>x</kbd> | |
| 241 | 243 | </dt> | |
| 242 | - | <dd>diff: split / unified / collapse all</dd> | |
| 244 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 243 | 245 | </div> | |
| 244 | 246 | <div> | |
| 245 | 247 | <dt> | |
| @@ -413,9 +415,9 @@ | |||
| 413 | 415 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 414 | 416 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 415 | 417 | }; | |
| 416 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 417 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 418 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 418 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 419 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 420 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 419 | 421 | k-permalink from:body -> { | |
| 420 | 422 | let b = document.body.dataset; | |
| 421 | 423 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -105,7 +105,9 @@ | |||||
| 105 | </a> | 105 | </a> | ||
| 106 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 106 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | ||
| 107 | </a> | 107 | </a> | ||
| 108 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | 108 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> |
| 109 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |||
| 110 | + | <kbd aria-hidden="true">x</kbd> | |||
| 109 | </button> | 111 | </button> | ||
| 110 | </div> | 112 | </div> | ||
| 111 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | 113 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | ||
| @@ -239,7 +241,7 @@ | |||||
| 239 | <kbd>u</kbd> | 241 | <kbd>u</kbd> | ||
| 240 | <kbd>x</kbd> | 242 | <kbd>x</kbd> | ||
| 241 | </dt> | 243 | </dt> | ||
| 242 | - | <dd>diff: split / unified / collapse all</dd> | 244 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 243 | </div> | 245 | </div> | ||
| 244 | <div> | 246 | <div> | ||
| 245 | <dt> | 247 | <dt> | ||
| @@ -413,9 +415,9 @@ | |||||
| 413 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 415 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 414 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 416 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 415 | }; | 417 | }; | ||
| 416 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 418 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 417 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 419 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 418 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 420 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 419 | k-permalink from:body -> { | 421 | k-permalink from:body -> { | ||
| 420 | let b = document.body.dataset; | 422 | let b = document.body.dataset; | ||
| 421 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 423 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commit-merge.html +7 -5
| @@ -104,7 +104,9 @@ | |||
| 104 | 104 | </a> | |
| 105 | 105 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 106 | 106 | </a> | |
| 107 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | |
| 107 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> | |
| 108 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| 109 | + | <kbd aria-hidden="true">x</kbd> | |
| 108 | 110 | </button> | |
| 109 | 111 | </div> | |
| 110 | 112 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | |
| @@ -278,7 +280,7 @@ | |||
| 278 | 280 | <kbd>u</kbd> | |
| 279 | 281 | <kbd>x</kbd> | |
| 280 | 282 | </dt> | |
| 281 | - | <dd>diff: split / unified / collapse all</dd> | |
| 283 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 282 | 284 | </div> | |
| 283 | 285 | <div> | |
| 284 | 286 | <dt> | |
| @@ -452,9 +454,9 @@ | |||
| 452 | 454 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 453 | 455 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 454 | 456 | }; | |
| 455 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 456 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 457 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 457 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 458 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 459 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 458 | 460 | k-permalink from:body -> { | |
| 459 | 461 | let b = document.body.dataset; | |
| 460 | 462 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -104,7 +104,9 @@ | |||||
| 104 | </a> | 104 | </a> | ||
| 105 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 105 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | ||
| 106 | </a> | 106 | </a> | ||
| 107 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | 107 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> |
| 108 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |||
| 109 | + | <kbd aria-hidden="true">x</kbd> | |||
| 108 | </button> | 110 | </button> | ||
| 109 | </div> | 111 | </div> | ||
| 110 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | 112 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | ||
| @@ -278,7 +280,7 @@ | |||||
| 278 | <kbd>u</kbd> | 280 | <kbd>u</kbd> | ||
| 279 | <kbd>x</kbd> | 281 | <kbd>x</kbd> | ||
| 280 | </dt> | 282 | </dt> | ||
| 281 | - | <dd>diff: split / unified / collapse all</dd> | 283 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 282 | </div> | 284 | </div> | ||
| 283 | <div> | 285 | <div> | ||
| 284 | <dt> | 286 | <dt> | ||
| @@ -452,9 +454,9 @@ | |||||
| 452 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 454 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 453 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 455 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 454 | }; | 456 | }; | ||
| 455 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 457 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 456 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 458 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 457 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 459 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 458 | k-permalink from:body -> { | 460 | k-permalink from:body -> { | ||
| 459 | let b = document.body.dataset; | 461 | let b = document.body.dataset; | ||
| 460 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 462 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commit-modify-split.html +7 -5
| @@ -111,7 +111,9 @@ And <b>html</b> & "quotes".</pre> | |||
| 111 | 111 | </a> | |
| 112 | 112 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" aria-current="true" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 113 | 113 | </a> | |
| 114 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | |
| 114 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> | |
| 115 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| 116 | + | <kbd aria-hidden="true">x</kbd> | |
| 115 | 117 | </button> | |
| 116 | 118 | </div> | |
| 117 | 119 | <div id="diffs" data-diff="split"> | |
| @@ -399,7 +401,7 @@ And <b>html</b> & "quotes".</pre> | |||
| 399 | 401 | <kbd>u</kbd> | |
| 400 | 402 | <kbd>x</kbd> | |
| 401 | 403 | </dt> | |
| 402 | - | <dd>diff: split / unified / collapse all</dd> | |
| 404 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 403 | 405 | </div> | |
| 404 | 406 | <div> | |
| 405 | 407 | <dt> | |
| @@ -573,9 +575,9 @@ And <b>html</b> & "quotes".</pre> | |||
| 573 | 575 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 574 | 576 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 575 | 577 | }; | |
| 576 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 577 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 578 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 578 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 579 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 580 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 579 | 581 | k-permalink from:body -> { | |
| 580 | 582 | let b = document.body.dataset; | |
| 581 | 583 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -111,7 +111,9 @@ And <b>html</b> & "quotes".</pre> | |||||
| 111 | </a> | 111 | </a> | ||
| 112 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" aria-current="true" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 112 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" aria-current="true" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | ||
| 113 | </a> | 113 | </a> | ||
| 114 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | 114 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> |
| 115 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |||
| 116 | + | <kbd aria-hidden="true">x</kbd> | |||
| 115 | </button> | 117 | </button> | ||
| 116 | </div> | 118 | </div> | ||
| 117 | <div id="diffs" data-diff="split"> | 119 | <div id="diffs" data-diff="split"> | ||
| @@ -399,7 +401,7 @@ And <b>html</b> & "quotes".</pre> | |||||
| 399 | <kbd>u</kbd> | 401 | <kbd>u</kbd> | ||
| 400 | <kbd>x</kbd> | 402 | <kbd>x</kbd> | ||
| 401 | </dt> | 403 | </dt> | ||
| 402 | - | <dd>diff: split / unified / collapse all</dd> | 404 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 403 | </div> | 405 | </div> | ||
| 404 | <div> | 406 | <div> | ||
| 405 | <dt> | 407 | <dt> | ||
| @@ -573,9 +575,9 @@ And <b>html</b> & "quotes".</pre> | |||||
| 573 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 575 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 574 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 576 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 575 | }; | 577 | }; | ||
| 576 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 578 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 577 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 579 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 578 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 580 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 579 | k-permalink from:body -> { | 581 | k-permalink from:body -> { | ||
| 580 | let b = document.body.dataset; | 582 | let b = document.body.dataset; | ||
| 581 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 583 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commit-modify.html +7 -5
| @@ -111,7 +111,9 @@ And <b>html</b> & "quotes".</pre> | |||
| 111 | 111 | </a> | |
| 112 | 112 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 113 | 113 | </a> | |
| 114 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | |
| 114 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> | |
| 115 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| 116 | + | <kbd aria-hidden="true">x</kbd> | |
| 115 | 117 | </button> | |
| 116 | 118 | </div> | |
| 117 | 119 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | |
| @@ -399,7 +401,7 @@ And <b>html</b> & "quotes".</pre> | |||
| 399 | 401 | <kbd>u</kbd> | |
| 400 | 402 | <kbd>x</kbd> | |
| 401 | 403 | </dt> | |
| 402 | - | <dd>diff: split / unified / collapse all</dd> | |
| 404 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 403 | 405 | </div> | |
| 404 | 406 | <div> | |
| 405 | 407 | <dt> | |
| @@ -573,9 +575,9 @@ And <b>html</b> & "quotes".</pre> | |||
| 573 | 575 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 574 | 576 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 575 | 577 | }; | |
| 576 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 577 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 578 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 578 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 579 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 580 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 579 | 581 | k-permalink from:body -> { | |
| 580 | 582 | let b = document.body.dataset; | |
| 581 | 583 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -111,7 +111,9 @@ And <b>html</b> & "quotes".</pre> | |||||
| 111 | </a> | 111 | </a> | ||
| 112 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 112 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | ||
| 113 | </a> | 113 | </a> | ||
| 114 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | 114 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> |
| 115 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |||
| 116 | + | <kbd aria-hidden="true">x</kbd> | |||
| 115 | </button> | 117 | </button> | ||
| 116 | </div> | 118 | </div> | ||
| 117 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | 119 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | ||
| @@ -399,7 +401,7 @@ And <b>html</b> & "quotes".</pre> | |||||
| 399 | <kbd>u</kbd> | 401 | <kbd>u</kbd> | ||
| 400 | <kbd>x</kbd> | 402 | <kbd>x</kbd> | ||
| 401 | </dt> | 403 | </dt> | ||
| 402 | - | <dd>diff: split / unified / collapse all</dd> | 404 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 403 | </div> | 405 | </div> | ||
| 404 | <div> | 406 | <div> | ||
| 405 | <dt> | 407 | <dt> | ||
| @@ -573,9 +575,9 @@ And <b>html</b> & "quotes".</pre> | |||||
| 573 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 575 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 574 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 576 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 575 | }; | 577 | }; | ||
| 576 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 578 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 577 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 579 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 578 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 580 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 579 | k-permalink from:body -> { | 581 | k-permalink from:body -> { | ||
| 580 | let b = document.body.dataset; | 582 | let b = document.body.dataset; | ||
| 581 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 583 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commit-rename.html +7 -5
| @@ -105,7 +105,9 @@ | |||
| 105 | 105 | </a> | |
| 106 | 106 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 107 | 107 | </a> | |
| 108 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | |
| 108 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> | |
| 109 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| 110 | + | <kbd aria-hidden="true">x</kbd> | |
| 109 | 111 | </button> | |
| 110 | 112 | </div> | |
| 111 | 113 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | |
| @@ -304,7 +306,7 @@ | |||
| 304 | 306 | <kbd>u</kbd> | |
| 305 | 307 | <kbd>x</kbd> | |
| 306 | 308 | </dt> | |
| 307 | - | <dd>diff: split / unified / collapse all</dd> | |
| 309 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 308 | 310 | </div> | |
| 309 | 311 | <div> | |
| 310 | 312 | <dt> | |
| @@ -478,9 +480,9 @@ | |||
| 478 | 480 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 479 | 481 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 480 | 482 | }; | |
| 481 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 482 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 483 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 483 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 484 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 485 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 484 | 486 | k-permalink from:body -> { | |
| 485 | 487 | let b = document.body.dataset; | |
| 486 | 488 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -105,7 +105,9 @@ | |||||
| 105 | </a> | 105 | </a> | ||
| 106 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 106 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | ||
| 107 | </a> | 107 | </a> | ||
| 108 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | 108 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> |
| 109 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |||
| 110 | + | <kbd aria-hidden="true">x</kbd> | |||
| 109 | </button> | 111 | </button> | ||
| 110 | </div> | 112 | </div> | ||
| 111 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | 113 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | ||
| @@ -304,7 +306,7 @@ | |||||
| 304 | <kbd>u</kbd> | 306 | <kbd>u</kbd> | ||
| 305 | <kbd>x</kbd> | 307 | <kbd>x</kbd> | ||
| 306 | </dt> | 308 | </dt> | ||
| 307 | - | <dd>diff: split / unified / collapse all</dd> | 309 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 308 | </div> | 310 | </div> | ||
| 309 | <div> | 311 | <div> | ||
| 310 | <dt> | 312 | <dt> | ||
| @@ -478,9 +480,9 @@ | |||||
| 478 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 480 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 479 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 481 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 480 | }; | 482 | }; | ||
| 481 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 483 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 482 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 484 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 483 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 485 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 484 | k-permalink from:body -> { | 486 | k-permalink from:body -> { | ||
| 485 | let b = document.body.dataset; | 487 | let b = document.body.dataset; | ||
| 486 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 488 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commit-root.html +7 -5
| @@ -103,7 +103,9 @@ | |||
| 103 | 103 | </a> | |
| 104 | 104 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 105 | 105 | </a> | |
| 106 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | |
| 106 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> | |
| 107 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| 108 | + | <kbd aria-hidden="true">x</kbd> | |
| 107 | 109 | </button> | |
| 108 | 110 | </div> | |
| 109 | 111 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | |
| @@ -620,7 +622,7 @@ | |||
| 620 | 622 | <kbd>u</kbd> | |
| 621 | 623 | <kbd>x</kbd> | |
| 622 | 624 | </dt> | |
| 623 | - | <dd>diff: split / unified / collapse all</dd> | |
| 625 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 624 | 626 | </div> | |
| 625 | 627 | <div> | |
| 626 | 628 | <dt> | |
| @@ -794,9 +796,9 @@ | |||
| 794 | 796 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 795 | 797 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 796 | 798 | }; | |
| 797 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 798 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 799 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 799 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 800 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 801 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 800 | 802 | k-permalink from:body -> { | |
| 801 | 803 | let b = document.body.dataset; | |
| 802 | 804 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -103,7 +103,9 @@ | |||||
| 103 | </a> | 103 | </a> | ||
| 104 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 104 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | ||
| 105 | </a> | 105 | </a> | ||
| 106 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | 106 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> |
| 107 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |||
| 108 | + | <kbd aria-hidden="true">x</kbd> | |||
| 107 | </button> | 109 | </button> | ||
| 108 | </div> | 110 | </div> | ||
| 109 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | 111 | <div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff"> | ||
| @@ -620,7 +622,7 @@ | |||||
| 620 | <kbd>u</kbd> | 622 | <kbd>u</kbd> | ||
| 621 | <kbd>x</kbd> | 623 | <kbd>x</kbd> | ||
| 622 | </dt> | 624 | </dt> | ||
| 623 | - | <dd>diff: split / unified / collapse all</dd> | 625 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 624 | </div> | 626 | </div> | ||
| 625 | <div> | 627 | <div> | ||
| 626 | <dt> | 628 | <dt> | ||
| @@ -794,9 +796,9 @@ | |||||
| 794 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 796 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 795 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 797 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 796 | }; | 798 | }; | ||
| 797 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 799 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 798 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 800 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 799 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 801 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 800 | k-permalink from:body -> { | 802 | k-permalink from:body -> { | ||
| 801 | let b = document.body.dataset; | 803 | let b = document.body.dataset; | ||
| 802 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 804 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commit-trojan.html +7 -5
| @@ -106,7 +106,9 @@ | |||
| 106 | 106 | </a> | |
| 107 | 107 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | |
| 108 | 108 | </a> | |
| 109 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | |
| 109 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> | |
| 110 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |
| 111 | + | <kbd aria-hidden="true">x</kbd> | |
| 110 | 112 | </button> | |
| 111 | 113 | </div> | |
| 112 | 114 | <p class="notice">this diff holds invisible characters (direction controls, zero-width characters). They are shown as <span class="inv"><U+XXXX></span> markers, never applied.</p> | |
| @@ -413,7 +415,7 @@ | |||
| 413 | 415 | <kbd>u</kbd> | |
| 414 | 416 | <kbd>x</kbd> | |
| 415 | 417 | </dt> | |
| 416 | - | <dd>diff: split / unified / collapse all</dd> | |
| 418 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 417 | 419 | </div> | |
| 418 | 420 | <div> | |
| 419 | 421 | <dt> | |
| @@ -587,9 +589,9 @@ | |||
| 587 | 589 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 588 | 590 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 589 | 591 | }; | |
| 590 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 591 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 592 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 592 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 593 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 594 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 593 | 595 | k-permalink from:body -> { | |
| 594 | 596 | let b = document.body.dataset; | |
| 595 | 597 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -106,7 +106,9 @@ | |||||
| 106 | </a> | 106 | </a> | ||
| 107 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | 107 | <a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" hx-on:click="event.preventDefault(); document.body.dispatchEvent(new CustomEvent('k-' + this.dataset.view))" :aria-current="q('#diffs').attr['data-diff'] === 'split' ? 'true' : false">Split<kbd aria-hidden="true">d</kbd> | ||
| 108 | </a> | 108 | </a> | ||
| 109 | - | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn">Collapse all<kbd aria-hidden="true">x</kbd> | 109 | + | <button type="button" aria-keyshortcuts="x" hx-on:click="document.body.dispatchEvent(new CustomEvent('k-collapse'))" class="btn"> |
| 110 | + | <span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span> | |||
| 111 | + | <kbd aria-hidden="true">x</kbd> | |||
| 110 | </button> | 112 | </button> | ||
| 111 | </div> | 113 | </div> | ||
| 112 | <p class="notice">this diff holds invisible characters (direction controls, zero-width characters). They are shown as <span class="inv"><U+XXXX></span> markers, never applied.</p> | 114 | <p class="notice">this diff holds invisible characters (direction controls, zero-width characters). They are shown as <span class="inv"><U+XXXX></span> markers, never applied.</p> | ||
| @@ -413,7 +415,7 @@ | |||||
| 413 | <kbd>u</kbd> | 415 | <kbd>u</kbd> | ||
| 414 | <kbd>x</kbd> | 416 | <kbd>x</kbd> | ||
| 415 | </dt> | 417 | </dt> | ||
| 416 | - | <dd>diff: split / unified / collapse all</dd> | 418 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 417 | </div> | 419 | </div> | ||
| 418 | <div> | 420 | <div> | ||
| 419 | <dt> | 421 | <dt> | ||
| @@ -587,9 +589,9 @@ | |||||
| 587 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 589 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 588 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 590 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 589 | }; | 591 | }; | ||
| 590 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 592 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 591 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 593 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 592 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 594 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 593 | k-permalink from:body -> { | 595 | k-permalink from:body -> { | ||
| 594 | let b = document.body.dataset; | 596 | let b = document.body.dataset; | ||
| 595 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 597 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commits-page2.html +4 -4
| @@ -238,7 +238,7 @@ | |||
| 238 | 238 | <kbd>u</kbd> | |
| 239 | 239 | <kbd>x</kbd> | |
| 240 | 240 | </dt> | |
| 241 | - | <dd>diff: split / unified / collapse all</dd> | |
| 241 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 242 | 242 | </div> | |
| 243 | 243 | <div> | |
| 244 | 244 | <dt> | |
| @@ -398,9 +398,9 @@ | |||
| 398 | 398 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 399 | 399 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 400 | 400 | }; | |
| 401 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 402 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 403 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 401 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 402 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 403 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 404 | 404 | k-permalink from:body -> { | |
| 405 | 405 | let b = document.body.dataset; | |
| 406 | 406 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -238,7 +238,7 @@ | |||||
| 238 | <kbd>u</kbd> | 238 | <kbd>u</kbd> | ||
| 239 | <kbd>x</kbd> | 239 | <kbd>x</kbd> | ||
| 240 | </dt> | 240 | </dt> | ||
| 241 | - | <dd>diff: split / unified / collapse all</dd> | 241 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 242 | </div> | 242 | </div> | ||
| 243 | <div> | 243 | <div> | ||
| 244 | <dt> | 244 | <dt> | ||
| @@ -398,9 +398,9 @@ | |||||
| 398 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 398 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 399 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 399 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 400 | }; | 400 | }; | ||
| 401 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 401 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 402 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 402 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 403 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 403 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 404 | k-permalink from:body -> { | 404 | k-permalink from:body -> { | ||
| 405 | let b = document.body.dataset; | 405 | let b = document.body.dataset; | ||
| 406 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 406 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commits-path.html +4 -4
| @@ -253,7 +253,7 @@ | |||
| 253 | 253 | <kbd>u</kbd> | |
| 254 | 254 | <kbd>x</kbd> | |
| 255 | 255 | </dt> | |
| 256 | - | <dd>diff: split / unified / collapse all</dd> | |
| 256 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 257 | 257 | </div> | |
| 258 | 258 | <div> | |
| 259 | 259 | <dt> | |
| @@ -413,9 +413,9 @@ | |||
| 413 | 413 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 414 | 414 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 415 | 415 | }; | |
| 416 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 417 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 418 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 416 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 417 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 418 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 419 | 419 | k-permalink from:body -> { | |
| 420 | 420 | let b = document.body.dataset; | |
| 421 | 421 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -253,7 +253,7 @@ | |||||
| 253 | <kbd>u</kbd> | 253 | <kbd>u</kbd> | ||
| 254 | <kbd>x</kbd> | 254 | <kbd>x</kbd> | ||
| 255 | </dt> | 255 | </dt> | ||
| 256 | - | <dd>diff: split / unified / collapse all</dd> | 256 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 257 | </div> | 257 | </div> | ||
| 258 | <div> | 258 | <div> | ||
| 259 | <dt> | 259 | <dt> | ||
| @@ -413,9 +413,9 @@ | |||||
| 413 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 413 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 414 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 414 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 415 | }; | 415 | }; | ||
| 416 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 416 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 417 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 417 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 418 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 418 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 419 | k-permalink from:body -> { | 419 | k-permalink from:body -> { | ||
| 420 | let b = document.body.dataset; | 420 | let b = document.body.dataset; | ||
| 421 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 421 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commits-root.html +4 -4
| @@ -1040,7 +1040,7 @@ | |||
| 1040 | 1040 | <kbd>u</kbd> | |
| 1041 | 1041 | <kbd>x</kbd> | |
| 1042 | 1042 | </dt> | |
| 1043 | - | <dd>diff: split / unified / collapse all</dd> | |
| 1043 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 1044 | 1044 | </div> | |
| 1045 | 1045 | <div> | |
| 1046 | 1046 | <dt> | |
| @@ -1200,9 +1200,9 @@ | |||
| 1200 | 1200 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 1201 | 1201 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 1202 | 1202 | }; | |
| 1203 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 1204 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 1205 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 1203 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 1204 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 1205 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 1206 | 1206 | k-permalink from:body -> { | |
| 1207 | 1207 | let b = document.body.dataset; | |
| 1208 | 1208 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -1040,7 +1040,7 @@ | |||||
| 1040 | <kbd>u</kbd> | 1040 | <kbd>u</kbd> | ||
| 1041 | <kbd>x</kbd> | 1041 | <kbd>x</kbd> | ||
| 1042 | </dt> | 1042 | </dt> | ||
| 1043 | - | <dd>diff: split / unified / collapse all</dd> | 1043 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 1044 | </div> | 1044 | </div> | ||
| 1045 | <div> | 1045 | <div> | ||
| 1046 | <dt> | 1046 | <dt> | ||
| @@ -1200,9 +1200,9 @@ | |||||
| 1200 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 1200 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 1201 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 1201 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 1202 | }; | 1202 | }; | ||
| 1203 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 1203 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 1204 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 1204 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 1205 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 1205 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 1206 | k-permalink from:body -> { | 1206 | k-permalink from:body -> { | ||
| 1207 | let b = document.body.dataset; | 1207 | let b = document.body.dataset; | ||
| 1208 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 1208 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/commits-small.html +4 -4
| @@ -385,7 +385,7 @@ | |||
| 385 | 385 | <kbd>u</kbd> | |
| 386 | 386 | <kbd>x</kbd> | |
| 387 | 387 | </dt> | |
| 388 | - | <dd>diff: split / unified / collapse all</dd> | |
| 388 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 389 | 389 | </div> | |
| 390 | 390 | <div> | |
| 391 | 391 | <dt> | |
| @@ -565,9 +565,9 @@ | |||
| 565 | 565 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 566 | 566 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 567 | 567 | }; | |
| 568 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 569 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 570 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 568 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 569 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 570 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 571 | 571 | k-permalink from:body -> { | |
| 572 | 572 | let b = document.body.dataset; | |
| 573 | 573 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -385,7 +385,7 @@ | |||||
| 385 | <kbd>u</kbd> | 385 | <kbd>u</kbd> | ||
| 386 | <kbd>x</kbd> | 386 | <kbd>x</kbd> | ||
| 387 | </dt> | 387 | </dt> | ||
| 388 | - | <dd>diff: split / unified / collapse all</dd> | 388 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 389 | </div> | 389 | </div> | ||
| 390 | <div> | 390 | <div> | ||
| 391 | <dt> | 391 | <dt> | ||
| @@ -565,9 +565,9 @@ | |||||
| 565 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 565 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 566 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 566 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 567 | }; | 567 | }; | ||
| 568 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 568 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 569 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 569 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 570 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 570 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 571 | k-permalink from:body -> { | 571 | k-permalink from:body -> { | ||
| 572 | let b = document.body.dataset; | 572 | let b = document.body.dataset; | ||
| 573 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 573 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/empty.html +4 -4
| @@ -162,7 +162,7 @@ | |||
| 162 | 162 | <kbd>u</kbd> | |
| 163 | 163 | <kbd>x</kbd> | |
| 164 | 164 | </dt> | |
| 165 | - | <dd>diff: split / unified / collapse all</dd> | |
| 165 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 166 | 166 | </div> | |
| 167 | 167 | <div> | |
| 168 | 168 | <dt> | |
| @@ -259,9 +259,9 @@ | |||
| 259 | 259 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 260 | 260 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 261 | 261 | }; | |
| 262 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 263 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 264 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 262 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 263 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 264 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 265 | 265 | k-permalink from:body -> { | |
| 266 | 266 | let b = document.body.dataset; | |
| 267 | 267 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -162,7 +162,7 @@ | |||||
| 162 | <kbd>u</kbd> | 162 | <kbd>u</kbd> | ||
| 163 | <kbd>x</kbd> | 163 | <kbd>x</kbd> | ||
| 164 | </dt> | 164 | </dt> | ||
| 165 | - | <dd>diff: split / unified / collapse all</dd> | 165 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 166 | </div> | 166 | </div> | ||
| 167 | <div> | 167 | <div> | ||
| 168 | <dt> | 168 | <dt> | ||
| @@ -259,9 +259,9 @@ | |||||
| 259 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 259 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 260 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 260 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 261 | }; | 261 | }; | ||
| 262 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 262 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 263 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 263 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 264 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 264 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 265 | k-permalink from:body -> { | 265 | k-permalink from:body -> { | ||
| 266 | let b = document.body.dataset; | 266 | let b = document.body.dataset; | ||
| 267 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 267 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/home.html +4 -4
| @@ -192,7 +192,7 @@ | |||
| 192 | 192 | <kbd>u</kbd> | |
| 193 | 193 | <kbd>x</kbd> | |
| 194 | 194 | </dt> | |
| 195 | - | <dd>diff: split / unified / collapse all</dd> | |
| 195 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 196 | 196 | </div> | |
| 197 | 197 | <div> | |
| 198 | 198 | <dt> | |
| @@ -295,9 +295,9 @@ | |||
| 295 | 295 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 296 | 296 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 297 | 297 | }; | |
| 298 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 299 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 300 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 298 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 299 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 300 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 301 | 301 | k-permalink from:body -> { | |
| 302 | 302 | let b = document.body.dataset; | |
| 303 | 303 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -192,7 +192,7 @@ | |||||
| 192 | <kbd>u</kbd> | 192 | <kbd>u</kbd> | ||
| 193 | <kbd>x</kbd> | 193 | <kbd>x</kbd> | ||
| 194 | </dt> | 194 | </dt> | ||
| 195 | - | <dd>diff: split / unified / collapse all</dd> | 195 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 196 | </div> | 196 | </div> | ||
| 197 | <div> | 197 | <div> | ||
| 198 | <dt> | 198 | <dt> | ||
| @@ -295,9 +295,9 @@ | |||||
| 295 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 295 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 296 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 296 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 297 | }; | 297 | }; | ||
| 298 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 298 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 299 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 299 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 300 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 300 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 301 | k-permalink from:body -> { | 301 | k-permalink from:body -> { | ||
| 302 | let b = document.body.dataset; | 302 | let b = document.body.dataset; | ||
| 303 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 303 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/not-found-page.html +4 -4
| @@ -151,7 +151,7 @@ | |||
| 151 | 151 | <kbd>u</kbd> | |
| 152 | 152 | <kbd>x</kbd> | |
| 153 | 153 | </dt> | |
| 154 | - | <dd>diff: split / unified / collapse all</dd> | |
| 154 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 155 | 155 | </div> | |
| 156 | 156 | <div> | |
| 157 | 157 | <dt> | |
| @@ -242,9 +242,9 @@ | |||
| 242 | 242 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 243 | 243 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 244 | 244 | }; | |
| 245 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 246 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 247 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 245 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 246 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 247 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 248 | 248 | k-permalink from:body -> { | |
| 249 | 249 | let b = document.body.dataset; | |
| 250 | 250 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -151,7 +151,7 @@ | |||||
| 151 | <kbd>u</kbd> | 151 | <kbd>u</kbd> | ||
| 152 | <kbd>x</kbd> | 152 | <kbd>x</kbd> | ||
| 153 | </dt> | 153 | </dt> | ||
| 154 | - | <dd>diff: split / unified / collapse all</dd> | 154 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 155 | </div> | 155 | </div> | ||
| 156 | <div> | 156 | <div> | ||
| 157 | <dt> | 157 | <dt> | ||
| @@ -242,9 +242,9 @@ | |||||
| 242 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 242 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 243 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 243 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 244 | }; | 244 | }; | ||
| 245 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 245 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 246 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 246 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 247 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 247 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 248 | k-permalink from:body -> { | 248 | k-permalink from:body -> { | ||
| 249 | let b = document.body.dataset; | 249 | let b = document.body.dataset; | ||
| 250 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 250 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/not-found.html +4 -4
| @@ -151,7 +151,7 @@ | |||
| 151 | 151 | <kbd>u</kbd> | |
| 152 | 152 | <kbd>x</kbd> | |
| 153 | 153 | </dt> | |
| 154 | - | <dd>diff: split / unified / collapse all</dd> | |
| 154 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 155 | 155 | </div> | |
| 156 | 156 | <div> | |
| 157 | 157 | <dt> | |
| @@ -242,9 +242,9 @@ | |||
| 242 | 242 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 243 | 243 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 244 | 244 | }; | |
| 245 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 246 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 247 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 245 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 246 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 247 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 248 | 248 | k-permalink from:body -> { | |
| 249 | 249 | let b = document.body.dataset; | |
| 250 | 250 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -151,7 +151,7 @@ | |||||
| 151 | <kbd>u</kbd> | 151 | <kbd>u</kbd> | ||
| 152 | <kbd>x</kbd> | 152 | <kbd>x</kbd> | ||
| 153 | </dt> | 153 | </dt> | ||
| 154 | - | <dd>diff: split / unified / collapse all</dd> | 154 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 155 | </div> | 155 | </div> | ||
| 156 | <div> | 156 | <div> | ||
| 157 | <dt> | 157 | <dt> | ||
| @@ -242,9 +242,9 @@ | |||||
| 242 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 242 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 243 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 243 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 244 | }; | 244 | }; | ||
| 245 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 245 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 246 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 246 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 247 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 247 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 248 | k-permalink from:body -> { | 248 | k-permalink from:body -> { | ||
| 249 | let b = document.body.dataset; | 249 | let b = document.body.dataset; | ||
| 250 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 250 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/refs.html +4 -4
| @@ -276,7 +276,7 @@ | |||
| 276 | 276 | <kbd>u</kbd> | |
| 277 | 277 | <kbd>x</kbd> | |
| 278 | 278 | </dt> | |
| 279 | - | <dd>diff: split / unified / collapse all</dd> | |
| 279 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 280 | 280 | </div> | |
| 281 | 281 | <div> | |
| 282 | 282 | <dt> | |
| @@ -466,9 +466,9 @@ | |||
| 466 | 466 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 467 | 467 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 468 | 468 | }; | |
| 469 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 470 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 471 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 469 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 470 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 471 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 472 | 472 | k-permalink from:body -> { | |
| 473 | 473 | let b = document.body.dataset; | |
| 474 | 474 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -276,7 +276,7 @@ | |||||
| 276 | <kbd>u</kbd> | 276 | <kbd>u</kbd> | ||
| 277 | <kbd>x</kbd> | 277 | <kbd>x</kbd> | ||
| 278 | </dt> | 278 | </dt> | ||
| 279 | - | <dd>diff: split / unified / collapse all</dd> | 279 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 280 | </div> | 280 | </div> | ||
| 281 | <div> | 281 | <div> | ||
| 282 | <dt> | 282 | <dt> | ||
| @@ -466,9 +466,9 @@ | |||||
| 466 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 466 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 467 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 467 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 468 | }; | 468 | }; | ||
| 469 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 469 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 470 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 470 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 471 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 471 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 472 | k-permalink from:body -> { | 472 | k-permalink from:body -> { | ||
| 473 | let b = document.body.dataset; | 473 | let b = document.body.dataset; | ||
| 474 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 474 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/summary.html +17 -6
| @@ -127,14 +127,25 @@ | |||
| 127 | 127 | </dd> | |
| 128 | 128 | <dt>branch</dt> | |
| 129 | 129 | <dd>main · 2 branches</dd> | |
| 130 | - | <dt>tag</dt> | |
| 131 | - | <dd>v0.2.0 · AGO · 2 tags</dd> | |
| 132 | 130 | <dt>created</dt> | |
| 133 | 131 | <dd> | |
| 134 | 132 | <time datetime="STAMP">STAMP</time> | |
| 135 | 133 | </dd> | |
| 136 | 134 | </dl> | |
| 137 | 135 | </section> | |
| 136 | + | <section aria-labelledby="r-tag"> | |
| 137 | + | <h2 id="r-tag">Tags <span class="count">2</span> | |
| 138 | + | <a href="/demo/refs">View all</a> | |
| 139 | + | </h2> | |
| 140 | + | <div class="latest-tag"> | |
| 141 | + | <a class="tag-name" href="/demo/tree/v0.2.0"> | |
| 142 | + | <span class="ico i-tag" aria-hidden="true"> | |
| 143 | + | </span>v0.2.0</a> | |
| 144 | + | <span class="pill">latest</span> | |
| 145 | + | <time class="dim" datetime="STAMP" title="STAMP">AGO</time> | |
| 146 | + | <p class="tag-sub dim">add main.go</p> | |
| 147 | + | </div> | |
| 148 | + | </section> | |
| 138 | 149 | <section aria-labelledby="r-recent"> | |
| 139 | 150 | <h2 id="r-recent">Recent commits <a href="/demo/commits/main">View all</a> | |
| 140 | 151 | </h2> | |
| @@ -281,7 +292,7 @@ | |||
| 281 | 292 | <kbd>u</kbd> | |
| 282 | 293 | <kbd>x</kbd> | |
| 283 | 294 | </dt> | |
| 284 | - | <dd>diff: split / unified / collapse all</dd> | |
| 295 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 285 | 296 | </div> | |
| 286 | 297 | <div> | |
| 287 | 298 | <dt> | |
| @@ -471,9 +482,9 @@ | |||
| 471 | 482 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 472 | 483 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 473 | 484 | }; | |
| 474 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 475 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 476 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 485 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 486 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 487 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 477 | 488 | k-permalink from:body -> { | |
| 478 | 489 | let b = document.body.dataset; | |
| 479 | 490 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -127,14 +127,25 @@ | |||||
| 127 | </dd> | 127 | </dd> | ||
| 128 | <dt>branch</dt> | 128 | <dt>branch</dt> | ||
| 129 | <dd>main · 2 branches</dd> | 129 | <dd>main · 2 branches</dd> | ||
| 130 | - | <dt>tag</dt> | |||
| 131 | - | <dd>v0.2.0 · AGO · 2 tags</dd> | |||
| 132 | <dt>created</dt> | 130 | <dt>created</dt> | ||
| 133 | <dd> | 131 | <dd> | ||
| 134 | <time datetime="STAMP">STAMP</time> | 132 | <time datetime="STAMP">STAMP</time> | ||
| 135 | </dd> | 133 | </dd> | ||
| 136 | </dl> | 134 | </dl> | ||
| 137 | </section> | 135 | </section> | ||
| 136 | + | <section aria-labelledby="r-tag"> | |||
| 137 | + | <h2 id="r-tag">Tags <span class="count">2</span> | |||
| 138 | + | <a href="/demo/refs">View all</a> | |||
| 139 | + | </h2> | |||
| 140 | + | <div class="latest-tag"> | |||
| 141 | + | <a class="tag-name" href="/demo/tree/v0.2.0"> | |||
| 142 | + | <span class="ico i-tag" aria-hidden="true"> | |||
| 143 | + | </span>v0.2.0</a> | |||
| 144 | + | <span class="pill">latest</span> | |||
| 145 | + | <time class="dim" datetime="STAMP" title="STAMP">AGO</time> | |||
| 146 | + | <p class="tag-sub dim">add main.go</p> | |||
| 147 | + | </div> | |||
| 148 | + | </section> | |||
| 138 | <section aria-labelledby="r-recent"> | 149 | <section aria-labelledby="r-recent"> | ||
| 139 | <h2 id="r-recent">Recent commits <a href="/demo/commits/main">View all</a> | 150 | <h2 id="r-recent">Recent commits <a href="/demo/commits/main">View all</a> | ||
| 140 | </h2> | 151 | </h2> | ||
| @@ -281,7 +292,7 @@ | |||||
| 281 | <kbd>u</kbd> | 292 | <kbd>u</kbd> | ||
| 282 | <kbd>x</kbd> | 293 | <kbd>x</kbd> | ||
| 283 | </dt> | 294 | </dt> | ||
| 284 | - | <dd>diff: split / unified / collapse all</dd> | 295 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 285 | </div> | 296 | </div> | ||
| 286 | <div> | 297 | <div> | ||
| 287 | <dt> | 298 | <dt> | ||
| @@ -471,9 +482,9 @@ | |||||
| 471 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 482 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 472 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 483 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 473 | }; | 484 | }; | ||
| 474 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 485 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 475 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 486 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 476 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 487 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 477 | k-permalink from:body -> { | 488 | k-permalink from:body -> { | ||
| 478 | let b = document.body.dataset; | 489 | let b = document.body.dataset; | ||
| 479 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 490 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/tree-nested.html +4 -4
| @@ -221,7 +221,7 @@ | |||
| 221 | 221 | <kbd>u</kbd> | |
| 222 | 222 | <kbd>x</kbd> | |
| 223 | 223 | </dt> | |
| 224 | - | <dd>diff: split / unified / collapse all</dd> | |
| 224 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 225 | 225 | </div> | |
| 226 | 226 | <div> | |
| 227 | 227 | <dt> | |
| @@ -401,9 +401,9 @@ | |||
| 401 | 401 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 402 | 402 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 403 | 403 | }; | |
| 404 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 405 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 406 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 404 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 405 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 406 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 407 | 407 | k-permalink from:body -> { | |
| 408 | 408 | let b = document.body.dataset; | |
| 409 | 409 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -221,7 +221,7 @@ | |||||
| 221 | <kbd>u</kbd> | 221 | <kbd>u</kbd> | ||
| 222 | <kbd>x</kbd> | 222 | <kbd>x</kbd> | ||
| 223 | </dt> | 223 | </dt> | ||
| 224 | - | <dd>diff: split / unified / collapse all</dd> | 224 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 225 | </div> | 225 | </div> | ||
| 226 | <div> | 226 | <div> | ||
| 227 | <dt> | 227 | <dt> | ||
| @@ -401,9 +401,9 @@ | |||||
| 401 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 401 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 402 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 402 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 403 | }; | 403 | }; | ||
| 404 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 404 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 405 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 405 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 406 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 406 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 407 | k-permalink from:body -> { | 407 | k-permalink from:body -> { | ||
| 408 | let b = document.body.dataset; | 408 | let b = document.body.dataset; | ||
| 409 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 409 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/tree-root.html +4 -4
| @@ -448,7 +448,7 @@ | |||
| 448 | 448 | <kbd>u</kbd> | |
| 449 | 449 | <kbd>x</kbd> | |
| 450 | 450 | </dt> | |
| 451 | - | <dd>diff: split / unified / collapse all</dd> | |
| 451 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 452 | 452 | </div> | |
| 453 | 453 | <div> | |
| 454 | 454 | <dt> | |
| @@ -700,9 +700,9 @@ | |||
| 700 | 700 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 701 | 701 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 702 | 702 | }; | |
| 703 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 704 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 705 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 703 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 704 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 705 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 706 | 706 | k-permalink from:body -> { | |
| 707 | 707 | let b = document.body.dataset; | |
| 708 | 708 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -448,7 +448,7 @@ | |||||
| 448 | <kbd>u</kbd> | 448 | <kbd>u</kbd> | ||
| 449 | <kbd>x</kbd> | 449 | <kbd>x</kbd> | ||
| 450 | </dt> | 450 | </dt> | ||
| 451 | - | <dd>diff: split / unified / collapse all</dd> | 451 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 452 | </div> | 452 | </div> | ||
| 453 | <div> | 453 | <div> | ||
| 454 | <dt> | 454 | <dt> | ||
| @@ -700,9 +700,9 @@ | |||||
| 700 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 700 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 701 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 701 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 702 | }; | 702 | }; | ||
| 703 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 703 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 704 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 704 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 705 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 705 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 706 | k-permalink from:body -> { | 706 | k-permalink from:body -> { | ||
| 707 | let b = document.body.dataset; | 707 | let b = document.body.dataset; | ||
| 708 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 708 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/tree-slash-ref.html +4 -4
| @@ -218,7 +218,7 @@ | |||
| 218 | 218 | <kbd>u</kbd> | |
| 219 | 219 | <kbd>x</kbd> | |
| 220 | 220 | </dt> | |
| 221 | - | <dd>diff: split / unified / collapse all</dd> | |
| 221 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 222 | 222 | </div> | |
| 223 | 223 | <div> | |
| 224 | 224 | <dt> | |
| @@ -398,9 +398,9 @@ | |||
| 398 | 398 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 399 | 399 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 400 | 400 | }; | |
| 401 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 402 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 403 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 401 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 402 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 403 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 404 | 404 | k-permalink from:body -> { | |
| 405 | 405 | let b = document.body.dataset; | |
| 406 | 406 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -218,7 +218,7 @@ | |||||
| 218 | <kbd>u</kbd> | 218 | <kbd>u</kbd> | ||
| 219 | <kbd>x</kbd> | 219 | <kbd>x</kbd> | ||
| 220 | </dt> | 220 | </dt> | ||
| 221 | - | <dd>diff: split / unified / collapse all</dd> | 221 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 222 | </div> | 222 | </div> | ||
| 223 | <div> | 223 | <div> | ||
| 224 | <dt> | 224 | <dt> | ||
| @@ -398,9 +398,9 @@ | |||||
| 398 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 398 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 399 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 399 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 400 | }; | 400 | }; | ||
| 401 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 401 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 402 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 402 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 403 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 403 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 404 | k-permalink from:body -> { | 404 | k-permalink from:body -> { | ||
| 405 | let b = document.body.dataset; | 405 | let b = document.body.dataset; | ||
| 406 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 406 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M cmd/ermite/testdata/web/tree-subdir.html +4 -4
| @@ -243,7 +243,7 @@ | |||
| 243 | 243 | <kbd>u</kbd> | |
| 244 | 244 | <kbd>x</kbd> | |
| 245 | 245 | </dt> | |
| 246 | - | <dd>diff: split / unified / collapse all</dd> | |
| 246 | + | <dd>diff: split / unified / collapse or expand all</dd> | |
| 247 | 247 | </div> | |
| 248 | 248 | <div> | |
| 249 | 249 | <dt> | |
| @@ -429,9 +429,9 @@ | |||
| 429 | 429 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | |
| 430 | 430 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | |
| 431 | 431 | }; | |
| 432 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | |
| 433 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | |
| 434 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | |
| 432 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 433 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); | |
| 434 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; | |
| 435 | 435 | k-permalink from:body -> { | |
| 436 | 436 | let b = document.body.dataset; | |
| 437 | 437 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | |
| @@ -243,7 +243,7 @@ | |||||
| 243 | <kbd>u</kbd> | 243 | <kbd>u</kbd> | ||
| 244 | <kbd>x</kbd> | 244 | <kbd>x</kbd> | ||
| 245 | </dt> | 245 | </dt> | ||
| 246 | - | <dd>diff: split / unified / collapse all</dd> | 246 | + | <dd>diff: split / unified / collapse or expand all</dd> |
| 247 | </div> | 247 | </div> | ||
| 248 | <div> | 248 | <div> | ||
| 249 | <dt> | 249 | <dt> | ||
| @@ -429,9 +429,9 @@ | |||||
| 429 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | 429 | let i = ns.findIndex(n => n.getBoundingClientRect().top > innerHeight / 3); | ||
| 430 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | 430 | let n = ns[i < 0 ? 0 : i]; n.closest('details') && (n.closest('details').open = true); n.scrollIntoView({ block: 'center' }) | ||
| 431 | }; | 431 | }; | ||
| 432 | - | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); | 432 | + | k-split from:body -> q('[data-diff]').attr['data-diff'] = 'split'; sessionStorage.setItem('diff', 'split'); q('[data-file]').arr().forEach(d => d.open = true); |
| 433 | - | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); | 433 | + | k-unified from:body -> q('[data-diff]').attr['data-diff'] = 'unified'; sessionStorage.setItem('diff', 'unified'); q('[data-file]').arr().forEach(d => d.open = true); |
| 434 | - | k-collapse from:body -> q('[data-file]').arr().forEach(d => d.open = false); | 434 | + | k-collapse from:body -> { let fs = q('[data-file]').arr(), open = !fs.some(d => d.open); fs.forEach(d => d.open = open) }; |
| 435 | k-permalink from:body -> { | 435 | k-permalink from:body -> { | ||
| 436 | let b = document.body.dataset; | 436 | let b = document.body.dataset; | ||
| 437 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | 437 | if (!b.sha) { b.flash = 'no ref to pin on this page'; await timeout('2s'); b.flash = ''; return } | ||
M internal/adapters/web/pages.templ +15 -0
| @@ -59,6 +59,21 @@ templ summaryRail(p SummaryPage) { | |||
| 59 | 59 | </section> | |
| 60 | 60 | <section aria-labelledby="r-facts"><h2 id="r-facts">About</h2>@Facts(p.Facts) | |
| 61 | 61 | </section> | |
| 62 | + | if p.Latest != nil { | |
| 63 | + | <section aria-labelledby="r-tag"> | |
| 64 | + | <h2 id="r-tag">Tags <span class="count">{ itoa(p.Latest.Count) }</span> <a href={ templ.SafeURL(p.Latest.RefsHref) }>View all</a></h2> | |
| 65 | + | if p.Latest.Name != "" { | |
| 66 | + | <div class="latest-tag"> | |
| 67 | + | <a class="tag-name" href={ templ.SafeURL(p.Latest.Href) }><span class="ico i-tag" aria-hidden="true"></span>{ p.Latest.Name }</a> | |
| 68 | + | <span class="pill">latest</span> | |
| 69 | + | <time class="dim" datetime={ p.Latest.WhenAt } title={ p.Latest.WhenAt }>{ p.Latest.When }</time> | |
| 70 | + | if p.Latest.Subject != "" { | |
| 71 | + | <p class="tag-sub dim">{ p.Latest.Subject }</p> | |
| 72 | + | } | |
| 73 | + | </div> | |
| 74 | + | } | |
| 75 | + | </section> | |
| 76 | + | } | |
| 62 | 77 | if len(p.Recent) > 0 { | |
| 63 | 78 | <section aria-labelledby="r-recent"><h2 id="r-recent">Recent commits <a href={ templ.SafeURL(p.AllHref) }>View all</a></h2>@CommitRows(p.Recent) | |
| 64 | 79 | </section> | |
| @@ -59,6 +59,21 @@ templ summaryRail(p SummaryPage) { | |||||
| 59 | </section> | 59 | </section> | ||
| 60 | <section aria-labelledby="r-facts"><h2 id="r-facts">About</h2>@Facts(p.Facts) | 60 | <section aria-labelledby="r-facts"><h2 id="r-facts">About</h2>@Facts(p.Facts) | ||
| 61 | </section> | 61 | </section> | ||
| 62 | + | if p.Latest != nil { | |||
| 63 | + | <section aria-labelledby="r-tag"> | |||
| 64 | + | <h2 id="r-tag">Tags <span class="count">{ itoa(p.Latest.Count) }</span> <a href={ templ.SafeURL(p.Latest.RefsHref) }>View all</a></h2> | |||
| 65 | + | if p.Latest.Name != "" { | |||
| 66 | + | <div class="latest-tag"> | |||
| 67 | + | <a class="tag-name" href={ templ.SafeURL(p.Latest.Href) }><span class="ico i-tag" aria-hidden="true"></span>{ p.Latest.Name }</a> | |||
| 68 | + | <span class="pill">latest</span> | |||
| 69 | + | <time class="dim" datetime={ p.Latest.WhenAt } title={ p.Latest.WhenAt }>{ p.Latest.When }</time> | |||
| 70 | + | if p.Latest.Subject != "" { | |||
| 71 | + | <p class="tag-sub dim">{ p.Latest.Subject }</p> | |||
| 72 | + | } | |||
| 73 | + | </div> | |||
| 74 | + | } | |||
| 75 | + | </section> | |||
| 76 | + | } | |||
| 62 | if len(p.Recent) > 0 { | 77 | if len(p.Recent) > 0 { | ||
| 63 | <section aria-labelledby="r-recent"><h2 id="r-recent">Recent commits <a href={ templ.SafeURL(p.AllHref) }>View all</a></h2>@CommitRows(p.Recent) | 78 | <section aria-labelledby="r-recent"><h2 id="r-recent">Recent commits <a href={ templ.SafeURL(p.AllHref) }>View all</a></h2>@CommitRows(p.Recent) | ||
| 64 | </section> | 79 | </section> | ||
M internal/adapters/web/pages_templ.go +281 -151
| @@ -256,21 +256,151 @@ func summaryRail(p SummaryPage) templ.Component { | |||
| 256 | 256 | if templ_7745c5c3_Err != nil { | |
| 257 | 257 | return templ_7745c5c3_Err | |
| 258 | 258 | } | |
| 259 | - | if len(p.Recent) > 0 { | |
| 260 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<section aria-labelledby=\"r-recent\"><h2 id=\"r-recent\">Recent commits <a href=\"") | |
| 259 | + | if p.Latest != nil { | |
| 260 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<section aria-labelledby=\"r-tag\"><h2 id=\"r-tag\">Tags <span class=\"count\">") | |
| 261 | 261 | if templ_7745c5c3_Err != nil { | |
| 262 | 262 | return templ_7745c5c3_Err | |
| 263 | 263 | } | |
| 264 | - | var templ_7745c5c3_Var12 templ.SafeURL | |
| 265 | - | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.AllHref)) | |
| 264 | + | var templ_7745c5c3_Var12 string | |
| 265 | + | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(p.Latest.Count)) | |
| 266 | 266 | if templ_7745c5c3_Err != nil { | |
| 267 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 63, Col: 105} | |
| 267 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 64, Col: 65} | |
| 268 | 268 | } | |
| 269 | 269 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) | |
| 270 | 270 | if templ_7745c5c3_Err != nil { | |
| 271 | 271 | return templ_7745c5c3_Err | |
| 272 | 272 | } | |
| 273 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\">View all</a></h2>") | |
| 273 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</span> <a href=\"") | |
| 274 | + | if templ_7745c5c3_Err != nil { | |
| 275 | + | return templ_7745c5c3_Err | |
| 276 | + | } | |
| 277 | + | var templ_7745c5c3_Var13 templ.SafeURL | |
| 278 | + | templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Latest.RefsHref)) | |
| 279 | + | if templ_7745c5c3_Err != nil { | |
| 280 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 64, Col: 117} | |
| 281 | + | } | |
| 282 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) | |
| 283 | + | if templ_7745c5c3_Err != nil { | |
| 284 | + | return templ_7745c5c3_Err | |
| 285 | + | } | |
| 286 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\">View all</a></h2>") | |
| 287 | + | if templ_7745c5c3_Err != nil { | |
| 288 | + | return templ_7745c5c3_Err | |
| 289 | + | } | |
| 290 | + | if p.Latest.Name != "" { | |
| 291 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<div class=\"latest-tag\"><a class=\"tag-name\" href=\"") | |
| 292 | + | if templ_7745c5c3_Err != nil { | |
| 293 | + | return templ_7745c5c3_Err | |
| 294 | + | } | |
| 295 | + | var templ_7745c5c3_Var14 templ.SafeURL | |
| 296 | + | templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Latest.Href)) | |
| 297 | + | if templ_7745c5c3_Err != nil { | |
| 298 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 67, Col: 60} | |
| 299 | + | } | |
| 300 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) | |
| 301 | + | if templ_7745c5c3_Err != nil { | |
| 302 | + | return templ_7745c5c3_Err | |
| 303 | + | } | |
| 304 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\"><span class=\"ico i-tag\" aria-hidden=\"true\"></span>") | |
| 305 | + | if templ_7745c5c3_Err != nil { | |
| 306 | + | return templ_7745c5c3_Err | |
| 307 | + | } | |
| 308 | + | var templ_7745c5c3_Var15 string | |
| 309 | + | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(p.Latest.Name) | |
| 310 | + | if templ_7745c5c3_Err != nil { | |
| 311 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 67, Col: 128} | |
| 312 | + | } | |
| 313 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) | |
| 314 | + | if templ_7745c5c3_Err != nil { | |
| 315 | + | return templ_7745c5c3_Err | |
| 316 | + | } | |
| 317 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "</a> <span class=\"pill\">latest</span> <time class=\"dim\" datetime=\"") | |
| 318 | + | if templ_7745c5c3_Err != nil { | |
| 319 | + | return templ_7745c5c3_Err | |
| 320 | + | } | |
| 321 | + | var templ_7745c5c3_Var16 string | |
| 322 | + | templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Latest.WhenAt) | |
| 323 | + | if templ_7745c5c3_Err != nil { | |
| 324 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 69, Col: 49} | |
| 325 | + | } | |
| 326 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16) | |
| 327 | + | if templ_7745c5c3_Err != nil { | |
| 328 | + | return templ_7745c5c3_Err | |
| 329 | + | } | |
| 330 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" title=\"") | |
| 331 | + | if templ_7745c5c3_Err != nil { | |
| 332 | + | return templ_7745c5c3_Err | |
| 333 | + | } | |
| 334 | + | var templ_7745c5c3_Var17 string | |
| 335 | + | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Latest.WhenAt) | |
| 336 | + | if templ_7745c5c3_Err != nil { | |
| 337 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 69, Col: 75} | |
| 338 | + | } | |
| 339 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17) | |
| 340 | + | if templ_7745c5c3_Err != nil { | |
| 341 | + | return templ_7745c5c3_Err | |
| 342 | + | } | |
| 343 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\">") | |
| 344 | + | if templ_7745c5c3_Err != nil { | |
| 345 | + | return templ_7745c5c3_Err | |
| 346 | + | } | |
| 347 | + | var templ_7745c5c3_Var18 string | |
| 348 | + | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(p.Latest.When) | |
| 349 | + | if templ_7745c5c3_Err != nil { | |
| 350 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 69, Col: 93} | |
| 351 | + | } | |
| 352 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18)) | |
| 353 | + | if templ_7745c5c3_Err != nil { | |
| 354 | + | return templ_7745c5c3_Err | |
| 355 | + | } | |
| 356 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</time> ") | |
| 357 | + | if templ_7745c5c3_Err != nil { | |
| 358 | + | return templ_7745c5c3_Err | |
| 359 | + | } | |
| 360 | + | if p.Latest.Subject != "" { | |
| 361 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<p class=\"tag-sub dim\">") | |
| 362 | + | if templ_7745c5c3_Err != nil { | |
| 363 | + | return templ_7745c5c3_Err | |
| 364 | + | } | |
| 365 | + | var templ_7745c5c3_Var19 string | |
| 366 | + | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(p.Latest.Subject) | |
| 367 | + | if templ_7745c5c3_Err != nil { | |
| 368 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 71, Col: 47} | |
| 369 | + | } | |
| 370 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) | |
| 371 | + | if templ_7745c5c3_Err != nil { | |
| 372 | + | return templ_7745c5c3_Err | |
| 373 | + | } | |
| 374 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</p>") | |
| 375 | + | if templ_7745c5c3_Err != nil { | |
| 376 | + | return templ_7745c5c3_Err | |
| 377 | + | } | |
| 378 | + | } | |
| 379 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</div>") | |
| 380 | + | if templ_7745c5c3_Err != nil { | |
| 381 | + | return templ_7745c5c3_Err | |
| 382 | + | } | |
| 383 | + | } | |
| 384 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</section>") | |
| 385 | + | if templ_7745c5c3_Err != nil { | |
| 386 | + | return templ_7745c5c3_Err | |
| 387 | + | } | |
| 388 | + | } | |
| 389 | + | if len(p.Recent) > 0 { | |
| 390 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<section aria-labelledby=\"r-recent\"><h2 id=\"r-recent\">Recent commits <a href=\"") | |
| 391 | + | if templ_7745c5c3_Err != nil { | |
| 392 | + | return templ_7745c5c3_Err | |
| 393 | + | } | |
| 394 | + | var templ_7745c5c3_Var20 templ.SafeURL | |
| 395 | + | templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.AllHref)) | |
| 396 | + | if templ_7745c5c3_Err != nil { | |
| 397 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 78, Col: 105} | |
| 398 | + | } | |
| 399 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) | |
| 400 | + | if templ_7745c5c3_Err != nil { | |
| 401 | + | return templ_7745c5c3_Err | |
| 402 | + | } | |
| 403 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\">View all</a></h2>") | |
| 274 | 404 | if templ_7745c5c3_Err != nil { | |
| 275 | 405 | return templ_7745c5c3_Err | |
| 276 | 406 | } | |
| @@ -278,13 +408,13 @@ func summaryRail(p SummaryPage) templ.Component { | |||
| 278 | 408 | if templ_7745c5c3_Err != nil { | |
| 279 | 409 | return templ_7745c5c3_Err | |
| 280 | 410 | } | |
| 281 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</section>") | |
| 411 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</section>") | |
| 282 | 412 | if templ_7745c5c3_Err != nil { | |
| 283 | 413 | return templ_7745c5c3_Err | |
| 284 | 414 | } | |
| 285 | 415 | } | |
| 286 | 416 | if len(p.Outline) > 0 && p.Readme != nil { | |
| 287 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<section aria-labelledby=\"r-outline\"><h2 id=\"r-outline\">On this page</h2>") | |
| 417 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "<section aria-labelledby=\"r-outline\"><h2 id=\"r-outline\">On this page</h2>") | |
| 288 | 418 | if templ_7745c5c3_Err != nil { | |
| 289 | 419 | return templ_7745c5c3_Err | |
| 290 | 420 | } | |
| @@ -292,7 +422,7 @@ func summaryRail(p SummaryPage) templ.Component { | |||
| 292 | 422 | if templ_7745c5c3_Err != nil { | |
| 293 | 423 | return templ_7745c5c3_Err | |
| 294 | 424 | } | |
| 295 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</section>") | |
| 425 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</section>") | |
| 296 | 426 | if templ_7745c5c3_Err != nil { | |
| 297 | 427 | return templ_7745c5c3_Err | |
| 298 | 428 | } | |
| @@ -318,12 +448,12 @@ func Refs(l Layout, p RefsPage) templ.Component { | |||
| 318 | 448 | }() | |
| 319 | 449 | } | |
| 320 | 450 | ctx = templ.InitializeContext(ctx) | |
| 321 | - | templ_7745c5c3_Var13 := templ.GetChildren(ctx) | |
| 322 | - | if templ_7745c5c3_Var13 == nil { | |
| 323 | - | templ_7745c5c3_Var13 = templ.NopComponent | |
| 451 | + | templ_7745c5c3_Var21 := templ.GetChildren(ctx) | |
| 452 | + | if templ_7745c5c3_Var21 == nil { | |
| 453 | + | templ_7745c5c3_Var21 = templ.NopComponent | |
| 324 | 454 | } | |
| 325 | 455 | ctx = templ.ClearChildren(ctx) | |
| 326 | - | templ_7745c5c3_Var14 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | |
| 456 | + | templ_7745c5c3_Var22 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | |
| 327 | 457 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | |
| 328 | 458 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | |
| 329 | 459 | if !templ_7745c5c3_IsBuffer { | |
| @@ -335,7 +465,7 @@ func Refs(l Layout, p RefsPage) templ.Component { | |||
| 335 | 465 | }() | |
| 336 | 466 | } | |
| 337 | 467 | ctx = templ.InitializeContext(ctx) | |
| 338 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<div class=\"filter\"><label for=\"ref-filter\" class=\"sr\">filter</label> <input id=\"ref-filter\" type=\"search\" data-filter placeholder=\"Filter branches and tags…\" autocomplete=\"off\" hx-on:input=\"let t = this.value.toLowerCase(); q('#ref-rows > tr').arr().forEach(r => r.hidden = !r.textContent.toLowerCase().includes(t));\n let first = q('#ref-rows > tr:not([hidden])').arr()[0]; first && q(first).take('data-cursor', '#ref-rows > tr')\"></div><table class=\"list refs\" aria-label=\"Branches and tags\"><thead><tr><th class=\"cur\"></th><th class=\"c-kind\">kind</th><th class=\"c-name\">name</th><th class=\"c-sha\">commit</th><th class=\"c-sub\">subject</th><th class=\"c-when\">date</th></tr></thead>") | |
| 468 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<div class=\"filter\"><label for=\"ref-filter\" class=\"sr\">filter</label> <input id=\"ref-filter\" type=\"search\" data-filter placeholder=\"Filter branches and tags…\" autocomplete=\"off\" hx-on:input=\"let t = this.value.toLowerCase(); q('#ref-rows > tr').arr().forEach(r => r.hidden = !r.textContent.toLowerCase().includes(t));\n let first = q('#ref-rows > tr:not([hidden])').arr()[0]; first && q(first).take('data-cursor', '#ref-rows > tr')\"></div><table class=\"list refs\" aria-label=\"Branches and tags\"><thead><tr><th class=\"cur\"></th><th class=\"c-kind\">kind</th><th class=\"c-name\">name</th><th class=\"c-sha\">commit</th><th class=\"c-sub\">subject</th><th class=\"c-when\">date</th></tr></thead>") | |
| 339 | 469 | if templ_7745c5c3_Err != nil { | |
| 340 | 470 | return templ_7745c5c3_Err | |
| 341 | 471 | } | |
| @@ -343,32 +473,32 @@ func Refs(l Layout, p RefsPage) templ.Component { | |||
| 343 | 473 | if templ_7745c5c3_Err != nil { | |
| 344 | 474 | return templ_7745c5c3_Err | |
| 345 | 475 | } | |
| 346 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</table>") | |
| 476 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "</table>") | |
| 347 | 477 | if templ_7745c5c3_Err != nil { | |
| 348 | 478 | return templ_7745c5c3_Err | |
| 349 | 479 | } | |
| 350 | 480 | if p.Note != "" { | |
| 351 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<p class=\"note\">") | |
| 481 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<p class=\"note\">") | |
| 352 | 482 | if templ_7745c5c3_Err != nil { | |
| 353 | 483 | return templ_7745c5c3_Err | |
| 354 | 484 | } | |
| 355 | - | var templ_7745c5c3_Var15 string | |
| 356 | - | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(p.Note) | |
| 485 | + | var templ_7745c5c3_Var23 string | |
| 486 | + | templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(p.Note) | |
| 357 | 487 | if templ_7745c5c3_Err != nil { | |
| 358 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 94, Col: 27} | |
| 488 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 109, Col: 27} | |
| 359 | 489 | } | |
| 360 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) | |
| 490 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) | |
| 361 | 491 | if templ_7745c5c3_Err != nil { | |
| 362 | 492 | return templ_7745c5c3_Err | |
| 363 | 493 | } | |
| 364 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</p>") | |
| 494 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</p>") | |
| 365 | 495 | if templ_7745c5c3_Err != nil { | |
| 366 | 496 | return templ_7745c5c3_Err | |
| 367 | 497 | } | |
| 368 | 498 | } | |
| 369 | 499 | return nil | |
| 370 | 500 | }) | |
| 371 | - | templ_7745c5c3_Err = Shell(l, refsRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var14), templ_7745c5c3_Buffer) | |
| 501 | + | templ_7745c5c3_Err = Shell(l, refsRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var22), templ_7745c5c3_Buffer) | |
| 372 | 502 | if templ_7745c5c3_Err != nil { | |
| 373 | 503 | return templ_7745c5c3_Err | |
| 374 | 504 | } | |
| @@ -392,179 +522,179 @@ func refRow(kind string, r RefRow) templ.Component { | |||
| 392 | 522 | }() | |
| 393 | 523 | } | |
| 394 | 524 | ctx = templ.InitializeContext(ctx) | |
| 395 | - | templ_7745c5c3_Var16 := templ.GetChildren(ctx) | |
| 396 | - | if templ_7745c5c3_Var16 == nil { | |
| 397 | - | templ_7745c5c3_Var16 = templ.NopComponent | |
| 525 | + | templ_7745c5c3_Var24 := templ.GetChildren(ctx) | |
| 526 | + | if templ_7745c5c3_Var24 == nil { | |
| 527 | + | templ_7745c5c3_Var24 = templ.NopComponent | |
| 398 | 528 | } | |
| 399 | 529 | ctx = templ.ClearChildren(ctx) | |
| 400 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<tr") | |
| 530 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<tr") | |
| 401 | 531 | if templ_7745c5c3_Err != nil { | |
| 402 | 532 | return templ_7745c5c3_Err | |
| 403 | 533 | } | |
| 404 | 534 | if r.Cursor { | |
| 405 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, " data-cursor") | |
| 535 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, " data-cursor") | |
| 406 | 536 | if templ_7745c5c3_Err != nil { | |
| 407 | 537 | return templ_7745c5c3_Err | |
| 408 | 538 | } | |
| 409 | 539 | } | |
| 410 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "><td class=\"cur\" aria-hidden=\"true\"></td><td class=\"c-kind mute\">") | |
| 540 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "><td class=\"cur\" aria-hidden=\"true\"></td><td class=\"c-kind mute\">") | |
| 411 | 541 | if templ_7745c5c3_Err != nil { | |
| 412 | 542 | return templ_7745c5c3_Err | |
| 413 | 543 | } | |
| 414 | - | var templ_7745c5c3_Var17 string | |
| 415 | - | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(kind) | |
| 544 | + | var templ_7745c5c3_Var25 string | |
| 545 | + | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(kind) | |
| 416 | 546 | if templ_7745c5c3_Err != nil { | |
| 417 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 102, Col: 32} | |
| 547 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 117, Col: 32} | |
| 418 | 548 | } | |
| 419 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17)) | |
| 549 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) | |
| 420 | 550 | if templ_7745c5c3_Err != nil { | |
| 421 | 551 | return templ_7745c5c3_Err | |
| 422 | 552 | } | |
| 423 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</td><td class=\"c-name\"><a href=\"") | |
| 553 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</td><td class=\"c-name\"><a href=\"") | |
| 424 | 554 | if templ_7745c5c3_Err != nil { | |
| 425 | 555 | return templ_7745c5c3_Err | |
| 426 | 556 | } | |
| 427 | - | var templ_7745c5c3_Var18 templ.SafeURL | |
| 428 | - | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.Href)) | |
| 557 | + | var templ_7745c5c3_Var26 templ.SafeURL | |
| 558 | + | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.Href)) | |
| 429 | 559 | if templ_7745c5c3_Err != nil { | |
| 430 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 104, Col: 34} | |
| 560 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 119, Col: 34} | |
| 431 | 561 | } | |
| 432 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18)) | |
| 562 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) | |
| 433 | 563 | if templ_7745c5c3_Err != nil { | |
| 434 | 564 | return templ_7745c5c3_Err | |
| 435 | 565 | } | |
| 436 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\">") | |
| 566 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\">") | |
| 437 | 567 | if templ_7745c5c3_Err != nil { | |
| 438 | 568 | return templ_7745c5c3_Err | |
| 439 | 569 | } | |
| 440 | - | var templ_7745c5c3_Var19 string | |
| 441 | - | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) | |
| 570 | + | var templ_7745c5c3_Var27 string | |
| 571 | + | templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) | |
| 442 | 572 | if templ_7745c5c3_Err != nil { | |
| 443 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 104, Col: 45} | |
| 573 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 119, Col: 45} | |
| 444 | 574 | } | |
| 445 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) | |
| 575 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27)) | |
| 446 | 576 | if templ_7745c5c3_Err != nil { | |
| 447 | 577 | return templ_7745c5c3_Err | |
| 448 | 578 | } | |
| 449 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</a> ") | |
| 579 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "</a> ") | |
| 450 | 580 | if templ_7745c5c3_Err != nil { | |
| 451 | 581 | return templ_7745c5c3_Err | |
| 452 | 582 | } | |
| 453 | 583 | if r.Default { | |
| 454 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<span class=\"pill\">default</span>") | |
| 584 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "<span class=\"pill\">default</span>") | |
| 455 | 585 | if templ_7745c5c3_Err != nil { | |
| 456 | 586 | return templ_7745c5c3_Err | |
| 457 | 587 | } | |
| 458 | 588 | } | |
| 459 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</td><td class=\"c-sha\">") | |
| 589 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</td><td class=\"c-sha\">") | |
| 460 | 590 | if templ_7745c5c3_Err != nil { | |
| 461 | 591 | return templ_7745c5c3_Err | |
| 462 | 592 | } | |
| 463 | 593 | if r.CHref != "" { | |
| 464 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "<a href=\"") | |
| 594 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<a href=\"") | |
| 465 | 595 | if templ_7745c5c3_Err != nil { | |
| 466 | 596 | return templ_7745c5c3_Err | |
| 467 | 597 | } | |
| 468 | - | var templ_7745c5c3_Var20 templ.SafeURL | |
| 469 | - | templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.CHref)) | |
| 598 | + | var templ_7745c5c3_Var28 templ.SafeURL | |
| 599 | + | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.CHref)) | |
| 470 | 600 | if templ_7745c5c3_Err != nil { | |
| 471 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 111, Col: 36} | |
| 601 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 126, Col: 36} | |
| 472 | 602 | } | |
| 473 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) | |
| 603 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28)) | |
| 474 | 604 | if templ_7745c5c3_Err != nil { | |
| 475 | 605 | return templ_7745c5c3_Err | |
| 476 | 606 | } | |
| 477 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\">") | |
| 607 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\">") | |
| 478 | 608 | if templ_7745c5c3_Err != nil { | |
| 479 | 609 | return templ_7745c5c3_Err | |
| 480 | 610 | } | |
| 481 | - | var templ_7745c5c3_Var21 string | |
| 482 | - | templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(r.Short) | |
| 611 | + | var templ_7745c5c3_Var29 string | |
| 612 | + | templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(r.Short) | |
| 483 | 613 | if templ_7745c5c3_Err != nil { | |
| 484 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 111, Col: 48} | |
| 614 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 126, Col: 48} | |
| 485 | 615 | } | |
| 486 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21)) | |
| 616 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) | |
| 487 | 617 | if templ_7745c5c3_Err != nil { | |
| 488 | 618 | return templ_7745c5c3_Err | |
| 489 | 619 | } | |
| 490 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "</a>") | |
| 620 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</a>") | |
| 491 | 621 | if templ_7745c5c3_Err != nil { | |
| 492 | 622 | return templ_7745c5c3_Err | |
| 493 | 623 | } | |
| 494 | 624 | } else { | |
| 495 | - | var templ_7745c5c3_Var22 string | |
| 496 | - | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(r.Short) | |
| 625 | + | var templ_7745c5c3_Var30 string | |
| 626 | + | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(r.Short) | |
| 497 | 627 | if templ_7745c5c3_Err != nil { | |
| 498 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 113, Col: 13} | |
| 628 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 128, Col: 13} | |
| 499 | 629 | } | |
| 500 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) | |
| 630 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) | |
| 501 | 631 | if templ_7745c5c3_Err != nil { | |
| 502 | 632 | return templ_7745c5c3_Err | |
| 503 | 633 | } | |
| 504 | 634 | } | |
| 505 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</td><td class=\"c-sub\">") | |
| 635 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</td><td class=\"c-sub\">") | |
| 506 | 636 | if templ_7745c5c3_Err != nil { | |
| 507 | 637 | return templ_7745c5c3_Err | |
| 508 | 638 | } | |
| 509 | - | var templ_7745c5c3_Var23 string | |
| 510 | - | templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(r.Subject) | |
| 639 | + | var templ_7745c5c3_Var31 string | |
| 640 | + | templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(r.Subject) | |
| 511 | 641 | if templ_7745c5c3_Err != nil { | |
| 512 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 116, Col: 31} | |
| 642 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 131, Col: 31} | |
| 513 | 643 | } | |
| 514 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) | |
| 644 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31)) | |
| 515 | 645 | if templ_7745c5c3_Err != nil { | |
| 516 | 646 | return templ_7745c5c3_Err | |
| 517 | 647 | } | |
| 518 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</td><td class=\"c-when dim\">") | |
| 648 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "</td><td class=\"c-when dim\">") | |
| 519 | 649 | if templ_7745c5c3_Err != nil { | |
| 520 | 650 | return templ_7745c5c3_Err | |
| 521 | 651 | } | |
| 522 | 652 | if r.WhenAt != "" { | |
| 523 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<time datetime=\"") | |
| 653 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "<time datetime=\"") | |
| 524 | 654 | if templ_7745c5c3_Err != nil { | |
| 525 | 655 | return templ_7745c5c3_Err | |
| 526 | 656 | } | |
| 527 | - | var templ_7745c5c3_Var24 string | |
| 528 | - | templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt) | |
| 657 | + | var templ_7745c5c3_Var32 string | |
| 658 | + | templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt) | |
| 529 | 659 | if templ_7745c5c3_Err != nil { | |
| 530 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 119, Col: 29} | |
| 660 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 134, Col: 29} | |
| 531 | 661 | } | |
| 532 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var24) | |
| 662 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var32) | |
| 533 | 663 | if templ_7745c5c3_Err != nil { | |
| 534 | 664 | return templ_7745c5c3_Err | |
| 535 | 665 | } | |
| 536 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "\" title=\"") | |
| 666 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "\" title=\"") | |
| 537 | 667 | if templ_7745c5c3_Err != nil { | |
| 538 | 668 | return templ_7745c5c3_Err | |
| 539 | 669 | } | |
| 540 | - | var templ_7745c5c3_Var25 string | |
| 541 | - | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt) | |
| 670 | + | var templ_7745c5c3_Var33 string | |
| 671 | + | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt) | |
| 542 | 672 | if templ_7745c5c3_Err != nil { | |
| 543 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 119, Col: 48} | |
| 673 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 134, Col: 48} | |
| 544 | 674 | } | |
| 545 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var25) | |
| 675 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33) | |
| 546 | 676 | if templ_7745c5c3_Err != nil { | |
| 547 | 677 | return templ_7745c5c3_Err | |
| 548 | 678 | } | |
| 549 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "\">") | |
| 679 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "\">") | |
| 550 | 680 | if templ_7745c5c3_Err != nil { | |
| 551 | 681 | return templ_7745c5c3_Err | |
| 552 | 682 | } | |
| 553 | - | var templ_7745c5c3_Var26 string | |
| 554 | - | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(r.When) | |
| 683 | + | var templ_7745c5c3_Var34 string | |
| 684 | + | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(r.When) | |
| 555 | 685 | if templ_7745c5c3_Err != nil { | |
| 556 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 119, Col: 59} | |
| 686 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 134, Col: 59} | |
| 557 | 687 | } | |
| 558 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) | |
| 688 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) | |
| 559 | 689 | if templ_7745c5c3_Err != nil { | |
| 560 | 690 | return templ_7745c5c3_Err | |
| 561 | 691 | } | |
| 562 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</time>") | |
| 692 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</time>") | |
| 563 | 693 | if templ_7745c5c3_Err != nil { | |
| 564 | 694 | return templ_7745c5c3_Err | |
| 565 | 695 | } | |
| 566 | 696 | } | |
| 567 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</td></tr>") | |
| 697 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "</td></tr>") | |
| 568 | 698 | if templ_7745c5c3_Err != nil { | |
| 569 | 699 | return templ_7745c5c3_Err | |
| 570 | 700 | } | |
| @@ -588,12 +718,12 @@ func refsRail(p RefsPage) templ.Component { | |||
| 588 | 718 | }() | |
| 589 | 719 | } | |
| 590 | 720 | ctx = templ.InitializeContext(ctx) | |
| 591 | - | templ_7745c5c3_Var27 := templ.GetChildren(ctx) | |
| 592 | - | if templ_7745c5c3_Var27 == nil { | |
| 593 | - | templ_7745c5c3_Var27 = templ.NopComponent | |
| 721 | + | templ_7745c5c3_Var35 := templ.GetChildren(ctx) | |
| 722 | + | if templ_7745c5c3_Var35 == nil { | |
| 723 | + | templ_7745c5c3_Var35 = templ.NopComponent | |
| 594 | 724 | } | |
| 595 | 725 | ctx = templ.ClearChildren(ctx) | |
| 596 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<section aria-labelledby=\"r-refs\"><h2 id=\"r-refs\">Overview</h2>") | |
| 726 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<section aria-labelledby=\"r-refs\"><h2 id=\"r-refs\">Overview</h2>") | |
| 597 | 727 | if templ_7745c5c3_Err != nil { | |
| 598 | 728 | return templ_7745c5c3_Err | |
| 599 | 729 | } | |
| @@ -601,7 +731,7 @@ func refsRail(p RefsPage) templ.Component { | |||
| 601 | 731 | if templ_7745c5c3_Err != nil { | |
| 602 | 732 | return templ_7745c5c3_Err | |
| 603 | 733 | } | |
| 604 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "</section>") | |
| 734 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "</section>") | |
| 605 | 735 | if templ_7745c5c3_Err != nil { | |
| 606 | 736 | return templ_7745c5c3_Err | |
| 607 | 737 | } | |
| @@ -626,12 +756,12 @@ func State(l Layout, p StatePage) templ.Component { | |||
| 626 | 756 | }() | |
| 627 | 757 | } | |
| 628 | 758 | ctx = templ.InitializeContext(ctx) | |
| 629 | - | templ_7745c5c3_Var28 := templ.GetChildren(ctx) | |
| 630 | - | if templ_7745c5c3_Var28 == nil { | |
| 631 | - | templ_7745c5c3_Var28 = templ.NopComponent | |
| 759 | + | templ_7745c5c3_Var36 := templ.GetChildren(ctx) | |
| 760 | + | if templ_7745c5c3_Var36 == nil { | |
| 761 | + | templ_7745c5c3_Var36 = templ.NopComponent | |
| 632 | 762 | } | |
| 633 | 763 | ctx = templ.ClearChildren(ctx) | |
| 634 | - | templ_7745c5c3_Var29 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | |
| 764 | + | templ_7745c5c3_Var37 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | |
| 635 | 765 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | |
| 636 | 766 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | |
| 637 | 767 | if !templ_7745c5c3_IsBuffer { | |
| @@ -643,51 +773,51 @@ func State(l Layout, p StatePage) templ.Component { | |||
| 643 | 773 | }() | |
| 644 | 774 | } | |
| 645 | 775 | ctx = templ.InitializeContext(ctx) | |
| 646 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<section class=\"state\" aria-labelledby=\"state-title\"><p class=\"eyebrow\">") | |
| 776 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<section class=\"state\" aria-labelledby=\"state-title\"><p class=\"eyebrow\">") | |
| 647 | 777 | if templ_7745c5c3_Err != nil { | |
| 648 | 778 | return templ_7745c5c3_Err | |
| 649 | 779 | } | |
| 650 | - | var templ_7745c5c3_Var30 string | |
| 651 | - | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(p.Code) | |
| 780 | + | var templ_7745c5c3_Var38 string | |
| 781 | + | templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(p.Code) | |
| 652 | 782 | if templ_7745c5c3_Err != nil { | |
| 653 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 136, Col: 30} | |
| 783 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 151, Col: 30} | |
| 654 | 784 | } | |
| 655 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) | |
| 785 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) | |
| 656 | 786 | if templ_7745c5c3_Err != nil { | |
| 657 | 787 | return templ_7745c5c3_Err | |
| 658 | 788 | } | |
| 659 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</p><h1 id=\"state-title\">") | |
| 789 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</p><h1 id=\"state-title\">") | |
| 660 | 790 | if templ_7745c5c3_Err != nil { | |
| 661 | 791 | return templ_7745c5c3_Err | |
| 662 | 792 | } | |
| 663 | - | var templ_7745c5c3_Var31 string | |
| 664 | - | templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(p.Title) | |
| 793 | + | var templ_7745c5c3_Var39 string | |
| 794 | + | templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(p.Title) | |
| 665 | 795 | if templ_7745c5c3_Err != nil { | |
| 666 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 137, Col: 33} | |
| 796 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 152, Col: 33} | |
| 667 | 797 | } | |
| 668 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31)) | |
| 798 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) | |
| 669 | 799 | if templ_7745c5c3_Err != nil { | |
| 670 | 800 | return templ_7745c5c3_Err | |
| 671 | 801 | } | |
| 672 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "</h1>") | |
| 802 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "</h1>") | |
| 673 | 803 | if templ_7745c5c3_Err != nil { | |
| 674 | 804 | return templ_7745c5c3_Err | |
| 675 | 805 | } | |
| 676 | 806 | for _, line := range p.Lines { | |
| 677 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "<p class=\"dim\">") | |
| 807 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<p class=\"dim\">") | |
| 678 | 808 | if templ_7745c5c3_Err != nil { | |
| 679 | 809 | return templ_7745c5c3_Err | |
| 680 | 810 | } | |
| 681 | - | var templ_7745c5c3_Var32 string | |
| 682 | - | templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(line) | |
| 811 | + | var templ_7745c5c3_Var40 string | |
| 812 | + | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(line) | |
| 683 | 813 | if templ_7745c5c3_Err != nil { | |
| 684 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 139, Col: 25} | |
| 814 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 154, Col: 25} | |
| 685 | 815 | } | |
| 686 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32)) | |
| 816 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) | |
| 687 | 817 | if templ_7745c5c3_Err != nil { | |
| 688 | 818 | return templ_7745c5c3_Err | |
| 689 | 819 | } | |
| 690 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</p>") | |
| 820 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "</p>") | |
| 691 | 821 | if templ_7745c5c3_Err != nil { | |
| 692 | 822 | return templ_7745c5c3_Err | |
| 693 | 823 | } | |
| @@ -698,49 +828,49 @@ func State(l Layout, p StatePage) templ.Component { | |||
| 698 | 828 | return templ_7745c5c3_Err | |
| 699 | 829 | } | |
| 700 | 830 | } | |
| 701 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<p class=\"state-back\">") | |
| 831 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "<p class=\"state-back\">") | |
| 702 | 832 | if templ_7745c5c3_Err != nil { | |
| 703 | 833 | return templ_7745c5c3_Err | |
| 704 | 834 | } | |
| 705 | 835 | for _, b := range p.Back { | |
| 706 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "<a href=\"") | |
| 836 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "<a href=\"") | |
| 707 | 837 | if templ_7745c5c3_Err != nil { | |
| 708 | 838 | return templ_7745c5c3_Err | |
| 709 | 839 | } | |
| 710 | - | var templ_7745c5c3_Var33 templ.SafeURL | |
| 711 | - | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(b.Href)) | |
| 840 | + | var templ_7745c5c3_Var41 templ.SafeURL | |
| 841 | + | templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(b.Href)) | |
| 712 | 842 | if templ_7745c5c3_Err != nil { | |
| 713 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 146, Col: 36} | |
| 843 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 161, Col: 36} | |
| 714 | 844 | } | |
| 715 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33)) | |
| 845 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41)) | |
| 716 | 846 | if templ_7745c5c3_Err != nil { | |
| 717 | 847 | return templ_7745c5c3_Err | |
| 718 | 848 | } | |
| 719 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "\">") | |
| 849 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "\">") | |
| 720 | 850 | if templ_7745c5c3_Err != nil { | |
| 721 | 851 | return templ_7745c5c3_Err | |
| 722 | 852 | } | |
| 723 | - | var templ_7745c5c3_Var34 string | |
| 724 | - | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(b.Label) | |
| 853 | + | var templ_7745c5c3_Var42 string | |
| 854 | + | templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(b.Label) | |
| 725 | 855 | if templ_7745c5c3_Err != nil { | |
| 726 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 146, Col: 48} | |
| 856 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 161, Col: 48} | |
| 727 | 857 | } | |
| 728 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) | |
| 858 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42)) | |
| 729 | 859 | if templ_7745c5c3_Err != nil { | |
| 730 | 860 | return templ_7745c5c3_Err | |
| 731 | 861 | } | |
| 732 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</a>") | |
| 862 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "</a>") | |
| 733 | 863 | if templ_7745c5c3_Err != nil { | |
| 734 | 864 | return templ_7745c5c3_Err | |
| 735 | 865 | } | |
| 736 | 866 | } | |
| 737 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</p></section>") | |
| 867 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "</p></section>") | |
| 738 | 868 | if templ_7745c5c3_Err != nil { | |
| 739 | 869 | return templ_7745c5c3_Err | |
| 740 | 870 | } | |
| 741 | 871 | return nil | |
| 742 | 872 | }) | |
| 743 | - | templ_7745c5c3_Err = Shell(l, nil).Render(templ.WithChildren(ctx, templ_7745c5c3_Var29), templ_7745c5c3_Buffer) | |
| 873 | + | templ_7745c5c3_Err = Shell(l, nil).Render(templ.WithChildren(ctx, templ_7745c5c3_Var37), templ_7745c5c3_Buffer) | |
| 744 | 874 | if templ_7745c5c3_Err != nil { | |
| 745 | 875 | return templ_7745c5c3_Err | |
| 746 | 876 | } | |
| @@ -766,12 +896,12 @@ func Login(l Layout, p LoginPage) templ.Component { | |||
| 766 | 896 | }() | |
| 767 | 897 | } | |
| 768 | 898 | ctx = templ.InitializeContext(ctx) | |
| 769 | - | templ_7745c5c3_Var35 := templ.GetChildren(ctx) | |
| 770 | - | if templ_7745c5c3_Var35 == nil { | |
| 771 | - | templ_7745c5c3_Var35 = templ.NopComponent | |
| 899 | + | templ_7745c5c3_Var43 := templ.GetChildren(ctx) | |
| 900 | + | if templ_7745c5c3_Var43 == nil { | |
| 901 | + | templ_7745c5c3_Var43 = templ.NopComponent | |
| 772 | 902 | } | |
| 773 | 903 | ctx = templ.ClearChildren(ctx) | |
| 774 | - | templ_7745c5c3_Var36 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | |
| 904 | + | templ_7745c5c3_Var44 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | |
| 775 | 905 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | |
| 776 | 906 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | |
| 777 | 907 | if !templ_7745c5c3_IsBuffer { | |
| @@ -783,75 +913,75 @@ func Login(l Layout, p LoginPage) templ.Component { | |||
| 783 | 913 | }() | |
| 784 | 914 | } | |
| 785 | 915 | ctx = templ.InitializeContext(ctx) | |
| 786 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "<section class=\"state\" aria-labelledby=\"state-title\"><h1 id=\"state-title\">") | |
| 916 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<section class=\"state\" aria-labelledby=\"state-title\"><h1 id=\"state-title\">") | |
| 787 | 917 | if templ_7745c5c3_Err != nil { | |
| 788 | 918 | return templ_7745c5c3_Err | |
| 789 | 919 | } | |
| 790 | - | var templ_7745c5c3_Var37 string | |
| 791 | - | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(p.Title) | |
| 920 | + | var templ_7745c5c3_Var45 string | |
| 921 | + | templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(p.Title) | |
| 792 | 922 | if templ_7745c5c3_Err != nil { | |
| 793 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 158, Col: 33} | |
| 923 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 173, Col: 33} | |
| 794 | 924 | } | |
| 795 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) | |
| 925 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45)) | |
| 796 | 926 | if templ_7745c5c3_Err != nil { | |
| 797 | 927 | return templ_7745c5c3_Err | |
| 798 | 928 | } | |
| 799 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</h1>") | |
| 929 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "</h1>") | |
| 800 | 930 | if templ_7745c5c3_Err != nil { | |
| 801 | 931 | return templ_7745c5c3_Err | |
| 802 | 932 | } | |
| 803 | 933 | for _, line := range p.Lines { | |
| 804 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<p class=\"dim\">") | |
| 934 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<p class=\"dim\">") | |
| 805 | 935 | if templ_7745c5c3_Err != nil { | |
| 806 | 936 | return templ_7745c5c3_Err | |
| 807 | 937 | } | |
| 808 | - | var templ_7745c5c3_Var38 string | |
| 809 | - | templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(line) | |
| 938 | + | var templ_7745c5c3_Var46 string | |
| 939 | + | templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(line) | |
| 810 | 940 | if templ_7745c5c3_Err != nil { | |
| 811 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 160, Col: 25} | |
| 941 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 175, Col: 25} | |
| 812 | 942 | } | |
| 813 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) | |
| 943 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46)) | |
| 814 | 944 | if templ_7745c5c3_Err != nil { | |
| 815 | 945 | return templ_7745c5c3_Err | |
| 816 | 946 | } | |
| 817 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</p>") | |
| 947 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "</p>") | |
| 818 | 948 | if templ_7745c5c3_Err != nil { | |
| 819 | 949 | return templ_7745c5c3_Err | |
| 820 | 950 | } | |
| 821 | 951 | } | |
| 822 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<form class=\"state-act\" method=\"post\" action=\"") | |
| 952 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<form class=\"state-act\" method=\"post\" action=\"") | |
| 823 | 953 | if templ_7745c5c3_Err != nil { | |
| 824 | 954 | return templ_7745c5c3_Err | |
| 825 | 955 | } | |
| 826 | - | var templ_7745c5c3_Var39 templ.SafeURL | |
| 827 | - | templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Action)) | |
| 956 | + | var templ_7745c5c3_Var47 templ.SafeURL | |
| 957 | + | templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Action)) | |
| 828 | 958 | if templ_7745c5c3_Err != nil { | |
| 829 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 162, Col: 73} | |
| 959 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 177, Col: 73} | |
| 830 | 960 | } | |
| 831 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) | |
| 961 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) | |
| 832 | 962 | if templ_7745c5c3_Err != nil { | |
| 833 | 963 | return templ_7745c5c3_Err | |
| 834 | 964 | } | |
| 835 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "\"><button type=\"submit\" class=\"btn primary\">") | |
| 965 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "\"><button type=\"submit\" class=\"btn primary\">") | |
| 836 | 966 | if templ_7745c5c3_Err != nil { | |
| 837 | 967 | return templ_7745c5c3_Err | |
| 838 | 968 | } | |
| 839 | - | var templ_7745c5c3_Var40 string | |
| 840 | - | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(p.Button) | |
| 969 | + | var templ_7745c5c3_Var48 string | |
| 970 | + | templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(p.Button) | |
| 841 | 971 | if templ_7745c5c3_Err != nil { | |
| 842 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 163, Col: 56} | |
| 972 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 178, Col: 56} | |
| 843 | 973 | } | |
| 844 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) | |
| 974 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48)) | |
| 845 | 975 | if templ_7745c5c3_Err != nil { | |
| 846 | 976 | return templ_7745c5c3_Err | |
| 847 | 977 | } | |
| 848 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "</button></form><p class=\"state-back\"><a href=\"/\">Back to home</a></p></section>") | |
| 978 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "</button></form><p class=\"state-back\"><a href=\"/\">Back to home</a></p></section>") | |
| 849 | 979 | if templ_7745c5c3_Err != nil { | |
| 850 | 980 | return templ_7745c5c3_Err | |
| 851 | 981 | } | |
| 852 | 982 | return nil | |
| 853 | 983 | }) | |
| 854 | - | templ_7745c5c3_Err = Shell(l, nil).Render(templ.WithChildren(ctx, templ_7745c5c3_Var36), templ_7745c5c3_Buffer) | |
| 984 | + | templ_7745c5c3_Err = Shell(l, nil).Render(templ.WithChildren(ctx, templ_7745c5c3_Var44), templ_7745c5c3_Buffer) | |
| 855 | 985 | if templ_7745c5c3_Err != nil { | |
| 856 | 986 | return templ_7745c5c3_Err | |
| 857 | 987 | } | |
| @@ -256,21 +256,151 @@ func summaryRail(p SummaryPage) templ.Component { | |||||
| 256 | if templ_7745c5c3_Err != nil { | 256 | if templ_7745c5c3_Err != nil { | ||
| 257 | return templ_7745c5c3_Err | 257 | return templ_7745c5c3_Err | ||
| 258 | } | 258 | } | ||
| 259 | - | if len(p.Recent) > 0 { | 259 | + | if p.Latest != nil { |
| 260 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<section aria-labelledby=\"r-recent\"><h2 id=\"r-recent\">Recent commits <a href=\"") | 260 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<section aria-labelledby=\"r-tag\"><h2 id=\"r-tag\">Tags <span class=\"count\">") |
| 261 | if templ_7745c5c3_Err != nil { | 261 | if templ_7745c5c3_Err != nil { | ||
| 262 | return templ_7745c5c3_Err | 262 | return templ_7745c5c3_Err | ||
| 263 | } | 263 | } | ||
| 264 | - | var templ_7745c5c3_Var12 templ.SafeURL | 264 | + | var templ_7745c5c3_Var12 string |
| 265 | - | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.AllHref)) | 265 | + | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(p.Latest.Count)) |
| 266 | if templ_7745c5c3_Err != nil { | 266 | if templ_7745c5c3_Err != nil { | ||
| 267 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 63, Col: 105} | 267 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 64, Col: 65} |
| 268 | } | 268 | } | ||
| 269 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) | 269 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) | ||
| 270 | if templ_7745c5c3_Err != nil { | 270 | if templ_7745c5c3_Err != nil { | ||
| 271 | return templ_7745c5c3_Err | 271 | return templ_7745c5c3_Err | ||
| 272 | } | 272 | } | ||
| 273 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\">View all</a></h2>") | 273 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</span> <a href=\"") |
| 274 | + | if templ_7745c5c3_Err != nil { | |||
| 275 | + | return templ_7745c5c3_Err | |||
| 276 | + | } | |||
| 277 | + | var templ_7745c5c3_Var13 templ.SafeURL | |||
| 278 | + | templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Latest.RefsHref)) | |||
| 279 | + | if templ_7745c5c3_Err != nil { | |||
| 280 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 64, Col: 117} | |||
| 281 | + | } | |||
| 282 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) | |||
| 283 | + | if templ_7745c5c3_Err != nil { | |||
| 284 | + | return templ_7745c5c3_Err | |||
| 285 | + | } | |||
| 286 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\">View all</a></h2>") | |||
| 287 | + | if templ_7745c5c3_Err != nil { | |||
| 288 | + | return templ_7745c5c3_Err | |||
| 289 | + | } | |||
| 290 | + | if p.Latest.Name != "" { | |||
| 291 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<div class=\"latest-tag\"><a class=\"tag-name\" href=\"") | |||
| 292 | + | if templ_7745c5c3_Err != nil { | |||
| 293 | + | return templ_7745c5c3_Err | |||
| 294 | + | } | |||
| 295 | + | var templ_7745c5c3_Var14 templ.SafeURL | |||
| 296 | + | templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Latest.Href)) | |||
| 297 | + | if templ_7745c5c3_Err != nil { | |||
| 298 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 67, Col: 60} | |||
| 299 | + | } | |||
| 300 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) | |||
| 301 | + | if templ_7745c5c3_Err != nil { | |||
| 302 | + | return templ_7745c5c3_Err | |||
| 303 | + | } | |||
| 304 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\"><span class=\"ico i-tag\" aria-hidden=\"true\"></span>") | |||
| 305 | + | if templ_7745c5c3_Err != nil { | |||
| 306 | + | return templ_7745c5c3_Err | |||
| 307 | + | } | |||
| 308 | + | var templ_7745c5c3_Var15 string | |||
| 309 | + | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(p.Latest.Name) | |||
| 310 | + | if templ_7745c5c3_Err != nil { | |||
| 311 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 67, Col: 128} | |||
| 312 | + | } | |||
| 313 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) | |||
| 314 | + | if templ_7745c5c3_Err != nil { | |||
| 315 | + | return templ_7745c5c3_Err | |||
| 316 | + | } | |||
| 317 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "</a> <span class=\"pill\">latest</span> <time class=\"dim\" datetime=\"") | |||
| 318 | + | if templ_7745c5c3_Err != nil { | |||
| 319 | + | return templ_7745c5c3_Err | |||
| 320 | + | } | |||
| 321 | + | var templ_7745c5c3_Var16 string | |||
| 322 | + | templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Latest.WhenAt) | |||
| 323 | + | if templ_7745c5c3_Err != nil { | |||
| 324 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 69, Col: 49} | |||
| 325 | + | } | |||
| 326 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16) | |||
| 327 | + | if templ_7745c5c3_Err != nil { | |||
| 328 | + | return templ_7745c5c3_Err | |||
| 329 | + | } | |||
| 330 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" title=\"") | |||
| 331 | + | if templ_7745c5c3_Err != nil { | |||
| 332 | + | return templ_7745c5c3_Err | |||
| 333 | + | } | |||
| 334 | + | var templ_7745c5c3_Var17 string | |||
| 335 | + | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Latest.WhenAt) | |||
| 336 | + | if templ_7745c5c3_Err != nil { | |||
| 337 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 69, Col: 75} | |||
| 338 | + | } | |||
| 339 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17) | |||
| 340 | + | if templ_7745c5c3_Err != nil { | |||
| 341 | + | return templ_7745c5c3_Err | |||
| 342 | + | } | |||
| 343 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\">") | |||
| 344 | + | if templ_7745c5c3_Err != nil { | |||
| 345 | + | return templ_7745c5c3_Err | |||
| 346 | + | } | |||
| 347 | + | var templ_7745c5c3_Var18 string | |||
| 348 | + | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(p.Latest.When) | |||
| 349 | + | if templ_7745c5c3_Err != nil { | |||
| 350 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 69, Col: 93} | |||
| 351 | + | } | |||
| 352 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18)) | |||
| 353 | + | if templ_7745c5c3_Err != nil { | |||
| 354 | + | return templ_7745c5c3_Err | |||
| 355 | + | } | |||
| 356 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</time> ") | |||
| 357 | + | if templ_7745c5c3_Err != nil { | |||
| 358 | + | return templ_7745c5c3_Err | |||
| 359 | + | } | |||
| 360 | + | if p.Latest.Subject != "" { | |||
| 361 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<p class=\"tag-sub dim\">") | |||
| 362 | + | if templ_7745c5c3_Err != nil { | |||
| 363 | + | return templ_7745c5c3_Err | |||
| 364 | + | } | |||
| 365 | + | var templ_7745c5c3_Var19 string | |||
| 366 | + | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(p.Latest.Subject) | |||
| 367 | + | if templ_7745c5c3_Err != nil { | |||
| 368 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 71, Col: 47} | |||
| 369 | + | } | |||
| 370 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) | |||
| 371 | + | if templ_7745c5c3_Err != nil { | |||
| 372 | + | return templ_7745c5c3_Err | |||
| 373 | + | } | |||
| 374 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</p>") | |||
| 375 | + | if templ_7745c5c3_Err != nil { | |||
| 376 | + | return templ_7745c5c3_Err | |||
| 377 | + | } | |||
| 378 | + | } | |||
| 379 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</div>") | |||
| 380 | + | if templ_7745c5c3_Err != nil { | |||
| 381 | + | return templ_7745c5c3_Err | |||
| 382 | + | } | |||
| 383 | + | } | |||
| 384 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</section>") | |||
| 385 | + | if templ_7745c5c3_Err != nil { | |||
| 386 | + | return templ_7745c5c3_Err | |||
| 387 | + | } | |||
| 388 | + | } | |||
| 389 | + | if len(p.Recent) > 0 { | |||
| 390 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<section aria-labelledby=\"r-recent\"><h2 id=\"r-recent\">Recent commits <a href=\"") | |||
| 391 | + | if templ_7745c5c3_Err != nil { | |||
| 392 | + | return templ_7745c5c3_Err | |||
| 393 | + | } | |||
| 394 | + | var templ_7745c5c3_Var20 templ.SafeURL | |||
| 395 | + | templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.AllHref)) | |||
| 396 | + | if templ_7745c5c3_Err != nil { | |||
| 397 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 78, Col: 105} | |||
| 398 | + | } | |||
| 399 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) | |||
| 400 | + | if templ_7745c5c3_Err != nil { | |||
| 401 | + | return templ_7745c5c3_Err | |||
| 402 | + | } | |||
| 403 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\">View all</a></h2>") | |||
| 274 | if templ_7745c5c3_Err != nil { | 404 | if templ_7745c5c3_Err != nil { | ||
| 275 | return templ_7745c5c3_Err | 405 | return templ_7745c5c3_Err | ||
| 276 | } | 406 | } | ||
| @@ -278,13 +408,13 @@ func summaryRail(p SummaryPage) templ.Component { | |||||
| 278 | if templ_7745c5c3_Err != nil { | 408 | if templ_7745c5c3_Err != nil { | ||
| 279 | return templ_7745c5c3_Err | 409 | return templ_7745c5c3_Err | ||
| 280 | } | 410 | } | ||
| 281 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</section>") | 411 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</section>") |
| 282 | if templ_7745c5c3_Err != nil { | 412 | if templ_7745c5c3_Err != nil { | ||
| 283 | return templ_7745c5c3_Err | 413 | return templ_7745c5c3_Err | ||
| 284 | } | 414 | } | ||
| 285 | } | 415 | } | ||
| 286 | if len(p.Outline) > 0 && p.Readme != nil { | 416 | if len(p.Outline) > 0 && p.Readme != nil { | ||
| 287 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<section aria-labelledby=\"r-outline\"><h2 id=\"r-outline\">On this page</h2>") | 417 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "<section aria-labelledby=\"r-outline\"><h2 id=\"r-outline\">On this page</h2>") |
| 288 | if templ_7745c5c3_Err != nil { | 418 | if templ_7745c5c3_Err != nil { | ||
| 289 | return templ_7745c5c3_Err | 419 | return templ_7745c5c3_Err | ||
| 290 | } | 420 | } | ||
| @@ -292,7 +422,7 @@ func summaryRail(p SummaryPage) templ.Component { | |||||
| 292 | if templ_7745c5c3_Err != nil { | 422 | if templ_7745c5c3_Err != nil { | ||
| 293 | return templ_7745c5c3_Err | 423 | return templ_7745c5c3_Err | ||
| 294 | } | 424 | } | ||
| 295 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</section>") | 425 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</section>") |
| 296 | if templ_7745c5c3_Err != nil { | 426 | if templ_7745c5c3_Err != nil { | ||
| 297 | return templ_7745c5c3_Err | 427 | return templ_7745c5c3_Err | ||
| 298 | } | 428 | } | ||
| @@ -318,12 +448,12 @@ func Refs(l Layout, p RefsPage) templ.Component { | |||||
| 318 | }() | 448 | }() | ||
| 319 | } | 449 | } | ||
| 320 | ctx = templ.InitializeContext(ctx) | 450 | ctx = templ.InitializeContext(ctx) | ||
| 321 | - | templ_7745c5c3_Var13 := templ.GetChildren(ctx) | 451 | + | templ_7745c5c3_Var21 := templ.GetChildren(ctx) |
| 322 | - | if templ_7745c5c3_Var13 == nil { | 452 | + | if templ_7745c5c3_Var21 == nil { |
| 323 | - | templ_7745c5c3_Var13 = templ.NopComponent | 453 | + | templ_7745c5c3_Var21 = templ.NopComponent |
| 324 | } | 454 | } | ||
| 325 | ctx = templ.ClearChildren(ctx) | 455 | ctx = templ.ClearChildren(ctx) | ||
| 326 | - | templ_7745c5c3_Var14 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | 456 | + | templ_7745c5c3_Var22 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { |
| 327 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | 457 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | ||
| 328 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | 458 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | ||
| 329 | if !templ_7745c5c3_IsBuffer { | 459 | if !templ_7745c5c3_IsBuffer { | ||
| @@ -335,7 +465,7 @@ func Refs(l Layout, p RefsPage) templ.Component { | |||||
| 335 | }() | 465 | }() | ||
| 336 | } | 466 | } | ||
| 337 | ctx = templ.InitializeContext(ctx) | 467 | ctx = templ.InitializeContext(ctx) | ||
| 338 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<div class=\"filter\"><label for=\"ref-filter\" class=\"sr\">filter</label> <input id=\"ref-filter\" type=\"search\" data-filter placeholder=\"Filter branches and tags…\" autocomplete=\"off\" hx-on:input=\"let t = this.value.toLowerCase(); q('#ref-rows > tr').arr().forEach(r => r.hidden = !r.textContent.toLowerCase().includes(t));\n let first = q('#ref-rows > tr:not([hidden])').arr()[0]; first && q(first).take('data-cursor', '#ref-rows > tr')\"></div><table class=\"list refs\" aria-label=\"Branches and tags\"><thead><tr><th class=\"cur\"></th><th class=\"c-kind\">kind</th><th class=\"c-name\">name</th><th class=\"c-sha\">commit</th><th class=\"c-sub\">subject</th><th class=\"c-when\">date</th></tr></thead>") | 468 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<div class=\"filter\"><label for=\"ref-filter\" class=\"sr\">filter</label> <input id=\"ref-filter\" type=\"search\" data-filter placeholder=\"Filter branches and tags…\" autocomplete=\"off\" hx-on:input=\"let t = this.value.toLowerCase(); q('#ref-rows > tr').arr().forEach(r => r.hidden = !r.textContent.toLowerCase().includes(t));\n let first = q('#ref-rows > tr:not([hidden])').arr()[0]; first && q(first).take('data-cursor', '#ref-rows > tr')\"></div><table class=\"list refs\" aria-label=\"Branches and tags\"><thead><tr><th class=\"cur\"></th><th class=\"c-kind\">kind</th><th class=\"c-name\">name</th><th class=\"c-sha\">commit</th><th class=\"c-sub\">subject</th><th class=\"c-when\">date</th></tr></thead>") |
| 339 | if templ_7745c5c3_Err != nil { | 469 | if templ_7745c5c3_Err != nil { | ||
| 340 | return templ_7745c5c3_Err | 470 | return templ_7745c5c3_Err | ||
| 341 | } | 471 | } | ||
| @@ -343,32 +473,32 @@ func Refs(l Layout, p RefsPage) templ.Component { | |||||
| 343 | if templ_7745c5c3_Err != nil { | 473 | if templ_7745c5c3_Err != nil { | ||
| 344 | return templ_7745c5c3_Err | 474 | return templ_7745c5c3_Err | ||
| 345 | } | 475 | } | ||
| 346 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</table>") | 476 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "</table>") |
| 347 | if templ_7745c5c3_Err != nil { | 477 | if templ_7745c5c3_Err != nil { | ||
| 348 | return templ_7745c5c3_Err | 478 | return templ_7745c5c3_Err | ||
| 349 | } | 479 | } | ||
| 350 | if p.Note != "" { | 480 | if p.Note != "" { | ||
| 351 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<p class=\"note\">") | 481 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<p class=\"note\">") |
| 352 | if templ_7745c5c3_Err != nil { | 482 | if templ_7745c5c3_Err != nil { | ||
| 353 | return templ_7745c5c3_Err | 483 | return templ_7745c5c3_Err | ||
| 354 | } | 484 | } | ||
| 355 | - | var templ_7745c5c3_Var15 string | 485 | + | var templ_7745c5c3_Var23 string |
| 356 | - | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(p.Note) | 486 | + | templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(p.Note) |
| 357 | if templ_7745c5c3_Err != nil { | 487 | if templ_7745c5c3_Err != nil { | ||
| 358 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 94, Col: 27} | 488 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 109, Col: 27} |
| 359 | } | 489 | } | ||
| 360 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) | 490 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) |
| 361 | if templ_7745c5c3_Err != nil { | 491 | if templ_7745c5c3_Err != nil { | ||
| 362 | return templ_7745c5c3_Err | 492 | return templ_7745c5c3_Err | ||
| 363 | } | 493 | } | ||
| 364 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</p>") | 494 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</p>") |
| 365 | if templ_7745c5c3_Err != nil { | 495 | if templ_7745c5c3_Err != nil { | ||
| 366 | return templ_7745c5c3_Err | 496 | return templ_7745c5c3_Err | ||
| 367 | } | 497 | } | ||
| 368 | } | 498 | } | ||
| 369 | return nil | 499 | return nil | ||
| 370 | }) | 500 | }) | ||
| 371 | - | templ_7745c5c3_Err = Shell(l, refsRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var14), templ_7745c5c3_Buffer) | 501 | + | templ_7745c5c3_Err = Shell(l, refsRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var22), templ_7745c5c3_Buffer) |
| 372 | if templ_7745c5c3_Err != nil { | 502 | if templ_7745c5c3_Err != nil { | ||
| 373 | return templ_7745c5c3_Err | 503 | return templ_7745c5c3_Err | ||
| 374 | } | 504 | } | ||
| @@ -392,179 +522,179 @@ func refRow(kind string, r RefRow) templ.Component { | |||||
| 392 | }() | 522 | }() | ||
| 393 | } | 523 | } | ||
| 394 | ctx = templ.InitializeContext(ctx) | 524 | ctx = templ.InitializeContext(ctx) | ||
| 395 | - | templ_7745c5c3_Var16 := templ.GetChildren(ctx) | 525 | + | templ_7745c5c3_Var24 := templ.GetChildren(ctx) |
| 396 | - | if templ_7745c5c3_Var16 == nil { | 526 | + | if templ_7745c5c3_Var24 == nil { |
| 397 | - | templ_7745c5c3_Var16 = templ.NopComponent | 527 | + | templ_7745c5c3_Var24 = templ.NopComponent |
| 398 | } | 528 | } | ||
| 399 | ctx = templ.ClearChildren(ctx) | 529 | ctx = templ.ClearChildren(ctx) | ||
| 400 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<tr") | 530 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<tr") |
| 401 | if templ_7745c5c3_Err != nil { | 531 | if templ_7745c5c3_Err != nil { | ||
| 402 | return templ_7745c5c3_Err | 532 | return templ_7745c5c3_Err | ||
| 403 | } | 533 | } | ||
| 404 | if r.Cursor { | 534 | if r.Cursor { | ||
| 405 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, " data-cursor") | 535 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, " data-cursor") |
| 406 | if templ_7745c5c3_Err != nil { | 536 | if templ_7745c5c3_Err != nil { | ||
| 407 | return templ_7745c5c3_Err | 537 | return templ_7745c5c3_Err | ||
| 408 | } | 538 | } | ||
| 409 | } | 539 | } | ||
| 410 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "><td class=\"cur\" aria-hidden=\"true\"></td><td class=\"c-kind mute\">") | 540 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "><td class=\"cur\" aria-hidden=\"true\"></td><td class=\"c-kind mute\">") |
| 411 | if templ_7745c5c3_Err != nil { | 541 | if templ_7745c5c3_Err != nil { | ||
| 412 | return templ_7745c5c3_Err | 542 | return templ_7745c5c3_Err | ||
| 413 | } | 543 | } | ||
| 414 | - | var templ_7745c5c3_Var17 string | 544 | + | var templ_7745c5c3_Var25 string |
| 415 | - | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(kind) | 545 | + | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(kind) |
| 416 | if templ_7745c5c3_Err != nil { | 546 | if templ_7745c5c3_Err != nil { | ||
| 417 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 102, Col: 32} | 547 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 117, Col: 32} |
| 418 | } | 548 | } | ||
| 419 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17)) | 549 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) |
| 420 | if templ_7745c5c3_Err != nil { | 550 | if templ_7745c5c3_Err != nil { | ||
| 421 | return templ_7745c5c3_Err | 551 | return templ_7745c5c3_Err | ||
| 422 | } | 552 | } | ||
| 423 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</td><td class=\"c-name\"><a href=\"") | 553 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</td><td class=\"c-name\"><a href=\"") |
| 424 | if templ_7745c5c3_Err != nil { | 554 | if templ_7745c5c3_Err != nil { | ||
| 425 | return templ_7745c5c3_Err | 555 | return templ_7745c5c3_Err | ||
| 426 | } | 556 | } | ||
| 427 | - | var templ_7745c5c3_Var18 templ.SafeURL | 557 | + | var templ_7745c5c3_Var26 templ.SafeURL |
| 428 | - | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.Href)) | 558 | + | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.Href)) |
| 429 | if templ_7745c5c3_Err != nil { | 559 | if templ_7745c5c3_Err != nil { | ||
| 430 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 104, Col: 34} | 560 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 119, Col: 34} |
| 431 | } | 561 | } | ||
| 432 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18)) | 562 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) |
| 433 | if templ_7745c5c3_Err != nil { | 563 | if templ_7745c5c3_Err != nil { | ||
| 434 | return templ_7745c5c3_Err | 564 | return templ_7745c5c3_Err | ||
| 435 | } | 565 | } | ||
| 436 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\">") | 566 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\">") |
| 437 | if templ_7745c5c3_Err != nil { | 567 | if templ_7745c5c3_Err != nil { | ||
| 438 | return templ_7745c5c3_Err | 568 | return templ_7745c5c3_Err | ||
| 439 | } | 569 | } | ||
| 440 | - | var templ_7745c5c3_Var19 string | 570 | + | var templ_7745c5c3_Var27 string |
| 441 | - | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) | 571 | + | templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name) |
| 442 | if templ_7745c5c3_Err != nil { | 572 | if templ_7745c5c3_Err != nil { | ||
| 443 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 104, Col: 45} | 573 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 119, Col: 45} |
| 444 | } | 574 | } | ||
| 445 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) | 575 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27)) |
| 446 | if templ_7745c5c3_Err != nil { | 576 | if templ_7745c5c3_Err != nil { | ||
| 447 | return templ_7745c5c3_Err | 577 | return templ_7745c5c3_Err | ||
| 448 | } | 578 | } | ||
| 449 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</a> ") | 579 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "</a> ") |
| 450 | if templ_7745c5c3_Err != nil { | 580 | if templ_7745c5c3_Err != nil { | ||
| 451 | return templ_7745c5c3_Err | 581 | return templ_7745c5c3_Err | ||
| 452 | } | 582 | } | ||
| 453 | if r.Default { | 583 | if r.Default { | ||
| 454 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<span class=\"pill\">default</span>") | 584 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "<span class=\"pill\">default</span>") |
| 455 | if templ_7745c5c3_Err != nil { | 585 | if templ_7745c5c3_Err != nil { | ||
| 456 | return templ_7745c5c3_Err | 586 | return templ_7745c5c3_Err | ||
| 457 | } | 587 | } | ||
| 458 | } | 588 | } | ||
| 459 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</td><td class=\"c-sha\">") | 589 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</td><td class=\"c-sha\">") |
| 460 | if templ_7745c5c3_Err != nil { | 590 | if templ_7745c5c3_Err != nil { | ||
| 461 | return templ_7745c5c3_Err | 591 | return templ_7745c5c3_Err | ||
| 462 | } | 592 | } | ||
| 463 | if r.CHref != "" { | 593 | if r.CHref != "" { | ||
| 464 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "<a href=\"") | 594 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<a href=\"") |
| 465 | if templ_7745c5c3_Err != nil { | 595 | if templ_7745c5c3_Err != nil { | ||
| 466 | return templ_7745c5c3_Err | 596 | return templ_7745c5c3_Err | ||
| 467 | } | 597 | } | ||
| 468 | - | var templ_7745c5c3_Var20 templ.SafeURL | 598 | + | var templ_7745c5c3_Var28 templ.SafeURL |
| 469 | - | templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.CHref)) | 599 | + | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.CHref)) |
| 470 | if templ_7745c5c3_Err != nil { | 600 | if templ_7745c5c3_Err != nil { | ||
| 471 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 111, Col: 36} | 601 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 126, Col: 36} |
| 472 | } | 602 | } | ||
| 473 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) | 603 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28)) |
| 474 | if templ_7745c5c3_Err != nil { | 604 | if templ_7745c5c3_Err != nil { | ||
| 475 | return templ_7745c5c3_Err | 605 | return templ_7745c5c3_Err | ||
| 476 | } | 606 | } | ||
| 477 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\">") | 607 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\">") |
| 478 | if templ_7745c5c3_Err != nil { | 608 | if templ_7745c5c3_Err != nil { | ||
| 479 | return templ_7745c5c3_Err | 609 | return templ_7745c5c3_Err | ||
| 480 | } | 610 | } | ||
| 481 | - | var templ_7745c5c3_Var21 string | 611 | + | var templ_7745c5c3_Var29 string |
| 482 | - | templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(r.Short) | 612 | + | templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(r.Short) |
| 483 | if templ_7745c5c3_Err != nil { | 613 | if templ_7745c5c3_Err != nil { | ||
| 484 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 111, Col: 48} | 614 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 126, Col: 48} |
| 485 | } | 615 | } | ||
| 486 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21)) | 616 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) |
| 487 | if templ_7745c5c3_Err != nil { | 617 | if templ_7745c5c3_Err != nil { | ||
| 488 | return templ_7745c5c3_Err | 618 | return templ_7745c5c3_Err | ||
| 489 | } | 619 | } | ||
| 490 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "</a>") | 620 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</a>") |
| 491 | if templ_7745c5c3_Err != nil { | 621 | if templ_7745c5c3_Err != nil { | ||
| 492 | return templ_7745c5c3_Err | 622 | return templ_7745c5c3_Err | ||
| 493 | } | 623 | } | ||
| 494 | } else { | 624 | } else { | ||
| 495 | - | var templ_7745c5c3_Var22 string | 625 | + | var templ_7745c5c3_Var30 string |
| 496 | - | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(r.Short) | 626 | + | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(r.Short) |
| 497 | if templ_7745c5c3_Err != nil { | 627 | if templ_7745c5c3_Err != nil { | ||
| 498 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 113, Col: 13} | 628 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 128, Col: 13} |
| 499 | } | 629 | } | ||
| 500 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) | 630 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) |
| 501 | if templ_7745c5c3_Err != nil { | 631 | if templ_7745c5c3_Err != nil { | ||
| 502 | return templ_7745c5c3_Err | 632 | return templ_7745c5c3_Err | ||
| 503 | } | 633 | } | ||
| 504 | } | 634 | } | ||
| 505 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</td><td class=\"c-sub\">") | 635 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</td><td class=\"c-sub\">") |
| 506 | if templ_7745c5c3_Err != nil { | 636 | if templ_7745c5c3_Err != nil { | ||
| 507 | return templ_7745c5c3_Err | 637 | return templ_7745c5c3_Err | ||
| 508 | } | 638 | } | ||
| 509 | - | var templ_7745c5c3_Var23 string | 639 | + | var templ_7745c5c3_Var31 string |
| 510 | - | templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(r.Subject) | 640 | + | templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(r.Subject) |
| 511 | if templ_7745c5c3_Err != nil { | 641 | if templ_7745c5c3_Err != nil { | ||
| 512 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 116, Col: 31} | 642 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 131, Col: 31} |
| 513 | } | 643 | } | ||
| 514 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) | 644 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31)) |
| 515 | if templ_7745c5c3_Err != nil { | 645 | if templ_7745c5c3_Err != nil { | ||
| 516 | return templ_7745c5c3_Err | 646 | return templ_7745c5c3_Err | ||
| 517 | } | 647 | } | ||
| 518 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</td><td class=\"c-when dim\">") | 648 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "</td><td class=\"c-when dim\">") |
| 519 | if templ_7745c5c3_Err != nil { | 649 | if templ_7745c5c3_Err != nil { | ||
| 520 | return templ_7745c5c3_Err | 650 | return templ_7745c5c3_Err | ||
| 521 | } | 651 | } | ||
| 522 | if r.WhenAt != "" { | 652 | if r.WhenAt != "" { | ||
| 523 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<time datetime=\"") | 653 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "<time datetime=\"") |
| 524 | if templ_7745c5c3_Err != nil { | 654 | if templ_7745c5c3_Err != nil { | ||
| 525 | return templ_7745c5c3_Err | 655 | return templ_7745c5c3_Err | ||
| 526 | } | 656 | } | ||
| 527 | - | var templ_7745c5c3_Var24 string | 657 | + | var templ_7745c5c3_Var32 string |
| 528 | - | templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt) | 658 | + | templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt) |
| 529 | if templ_7745c5c3_Err != nil { | 659 | if templ_7745c5c3_Err != nil { | ||
| 530 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 119, Col: 29} | 660 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 134, Col: 29} |
| 531 | } | 661 | } | ||
| 532 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var24) | 662 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var32) |
| 533 | if templ_7745c5c3_Err != nil { | 663 | if templ_7745c5c3_Err != nil { | ||
| 534 | return templ_7745c5c3_Err | 664 | return templ_7745c5c3_Err | ||
| 535 | } | 665 | } | ||
| 536 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "\" title=\"") | 666 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "\" title=\"") |
| 537 | if templ_7745c5c3_Err != nil { | 667 | if templ_7745c5c3_Err != nil { | ||
| 538 | return templ_7745c5c3_Err | 668 | return templ_7745c5c3_Err | ||
| 539 | } | 669 | } | ||
| 540 | - | var templ_7745c5c3_Var25 string | 670 | + | var templ_7745c5c3_Var33 string |
| 541 | - | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt) | 671 | + | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt) |
| 542 | if templ_7745c5c3_Err != nil { | 672 | if templ_7745c5c3_Err != nil { | ||
| 543 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 119, Col: 48} | 673 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 134, Col: 48} |
| 544 | } | 674 | } | ||
| 545 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var25) | 675 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33) |
| 546 | if templ_7745c5c3_Err != nil { | 676 | if templ_7745c5c3_Err != nil { | ||
| 547 | return templ_7745c5c3_Err | 677 | return templ_7745c5c3_Err | ||
| 548 | } | 678 | } | ||
| 549 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "\">") | 679 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "\">") |
| 550 | if templ_7745c5c3_Err != nil { | 680 | if templ_7745c5c3_Err != nil { | ||
| 551 | return templ_7745c5c3_Err | 681 | return templ_7745c5c3_Err | ||
| 552 | } | 682 | } | ||
| 553 | - | var templ_7745c5c3_Var26 string | 683 | + | var templ_7745c5c3_Var34 string |
| 554 | - | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(r.When) | 684 | + | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(r.When) |
| 555 | if templ_7745c5c3_Err != nil { | 685 | if templ_7745c5c3_Err != nil { | ||
| 556 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 119, Col: 59} | 686 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 134, Col: 59} |
| 557 | } | 687 | } | ||
| 558 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) | 688 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) |
| 559 | if templ_7745c5c3_Err != nil { | 689 | if templ_7745c5c3_Err != nil { | ||
| 560 | return templ_7745c5c3_Err | 690 | return templ_7745c5c3_Err | ||
| 561 | } | 691 | } | ||
| 562 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</time>") | 692 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</time>") |
| 563 | if templ_7745c5c3_Err != nil { | 693 | if templ_7745c5c3_Err != nil { | ||
| 564 | return templ_7745c5c3_Err | 694 | return templ_7745c5c3_Err | ||
| 565 | } | 695 | } | ||
| 566 | } | 696 | } | ||
| 567 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</td></tr>") | 697 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "</td></tr>") |
| 568 | if templ_7745c5c3_Err != nil { | 698 | if templ_7745c5c3_Err != nil { | ||
| 569 | return templ_7745c5c3_Err | 699 | return templ_7745c5c3_Err | ||
| 570 | } | 700 | } | ||
| @@ -588,12 +718,12 @@ func refsRail(p RefsPage) templ.Component { | |||||
| 588 | }() | 718 | }() | ||
| 589 | } | 719 | } | ||
| 590 | ctx = templ.InitializeContext(ctx) | 720 | ctx = templ.InitializeContext(ctx) | ||
| 591 | - | templ_7745c5c3_Var27 := templ.GetChildren(ctx) | 721 | + | templ_7745c5c3_Var35 := templ.GetChildren(ctx) |
| 592 | - | if templ_7745c5c3_Var27 == nil { | 722 | + | if templ_7745c5c3_Var35 == nil { |
| 593 | - | templ_7745c5c3_Var27 = templ.NopComponent | 723 | + | templ_7745c5c3_Var35 = templ.NopComponent |
| 594 | } | 724 | } | ||
| 595 | ctx = templ.ClearChildren(ctx) | 725 | ctx = templ.ClearChildren(ctx) | ||
| 596 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<section aria-labelledby=\"r-refs\"><h2 id=\"r-refs\">Overview</h2>") | 726 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<section aria-labelledby=\"r-refs\"><h2 id=\"r-refs\">Overview</h2>") |
| 597 | if templ_7745c5c3_Err != nil { | 727 | if templ_7745c5c3_Err != nil { | ||
| 598 | return templ_7745c5c3_Err | 728 | return templ_7745c5c3_Err | ||
| 599 | } | 729 | } | ||
| @@ -601,7 +731,7 @@ func refsRail(p RefsPage) templ.Component { | |||||
| 601 | if templ_7745c5c3_Err != nil { | 731 | if templ_7745c5c3_Err != nil { | ||
| 602 | return templ_7745c5c3_Err | 732 | return templ_7745c5c3_Err | ||
| 603 | } | 733 | } | ||
| 604 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "</section>") | 734 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "</section>") |
| 605 | if templ_7745c5c3_Err != nil { | 735 | if templ_7745c5c3_Err != nil { | ||
| 606 | return templ_7745c5c3_Err | 736 | return templ_7745c5c3_Err | ||
| 607 | } | 737 | } | ||
| @@ -626,12 +756,12 @@ func State(l Layout, p StatePage) templ.Component { | |||||
| 626 | }() | 756 | }() | ||
| 627 | } | 757 | } | ||
| 628 | ctx = templ.InitializeContext(ctx) | 758 | ctx = templ.InitializeContext(ctx) | ||
| 629 | - | templ_7745c5c3_Var28 := templ.GetChildren(ctx) | 759 | + | templ_7745c5c3_Var36 := templ.GetChildren(ctx) |
| 630 | - | if templ_7745c5c3_Var28 == nil { | 760 | + | if templ_7745c5c3_Var36 == nil { |
| 631 | - | templ_7745c5c3_Var28 = templ.NopComponent | 761 | + | templ_7745c5c3_Var36 = templ.NopComponent |
| 632 | } | 762 | } | ||
| 633 | ctx = templ.ClearChildren(ctx) | 763 | ctx = templ.ClearChildren(ctx) | ||
| 634 | - | templ_7745c5c3_Var29 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | 764 | + | templ_7745c5c3_Var37 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { |
| 635 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | 765 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | ||
| 636 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | 766 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | ||
| 637 | if !templ_7745c5c3_IsBuffer { | 767 | if !templ_7745c5c3_IsBuffer { | ||
| @@ -643,51 +773,51 @@ func State(l Layout, p StatePage) templ.Component { | |||||
| 643 | }() | 773 | }() | ||
| 644 | } | 774 | } | ||
| 645 | ctx = templ.InitializeContext(ctx) | 775 | ctx = templ.InitializeContext(ctx) | ||
| 646 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<section class=\"state\" aria-labelledby=\"state-title\"><p class=\"eyebrow\">") | 776 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<section class=\"state\" aria-labelledby=\"state-title\"><p class=\"eyebrow\">") |
| 647 | if templ_7745c5c3_Err != nil { | 777 | if templ_7745c5c3_Err != nil { | ||
| 648 | return templ_7745c5c3_Err | 778 | return templ_7745c5c3_Err | ||
| 649 | } | 779 | } | ||
| 650 | - | var templ_7745c5c3_Var30 string | 780 | + | var templ_7745c5c3_Var38 string |
| 651 | - | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(p.Code) | 781 | + | templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(p.Code) |
| 652 | if templ_7745c5c3_Err != nil { | 782 | if templ_7745c5c3_Err != nil { | ||
| 653 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 136, Col: 30} | 783 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 151, Col: 30} |
| 654 | } | 784 | } | ||
| 655 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) | 785 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) |
| 656 | if templ_7745c5c3_Err != nil { | 786 | if templ_7745c5c3_Err != nil { | ||
| 657 | return templ_7745c5c3_Err | 787 | return templ_7745c5c3_Err | ||
| 658 | } | 788 | } | ||
| 659 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</p><h1 id=\"state-title\">") | 789 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</p><h1 id=\"state-title\">") |
| 660 | if templ_7745c5c3_Err != nil { | 790 | if templ_7745c5c3_Err != nil { | ||
| 661 | return templ_7745c5c3_Err | 791 | return templ_7745c5c3_Err | ||
| 662 | } | 792 | } | ||
| 663 | - | var templ_7745c5c3_Var31 string | 793 | + | var templ_7745c5c3_Var39 string |
| 664 | - | templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(p.Title) | 794 | + | templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(p.Title) |
| 665 | if templ_7745c5c3_Err != nil { | 795 | if templ_7745c5c3_Err != nil { | ||
| 666 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 137, Col: 33} | 796 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 152, Col: 33} |
| 667 | } | 797 | } | ||
| 668 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31)) | 798 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) |
| 669 | if templ_7745c5c3_Err != nil { | 799 | if templ_7745c5c3_Err != nil { | ||
| 670 | return templ_7745c5c3_Err | 800 | return templ_7745c5c3_Err | ||
| 671 | } | 801 | } | ||
| 672 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "</h1>") | 802 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "</h1>") |
| 673 | if templ_7745c5c3_Err != nil { | 803 | if templ_7745c5c3_Err != nil { | ||
| 674 | return templ_7745c5c3_Err | 804 | return templ_7745c5c3_Err | ||
| 675 | } | 805 | } | ||
| 676 | for _, line := range p.Lines { | 806 | for _, line := range p.Lines { | ||
| 677 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "<p class=\"dim\">") | 807 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<p class=\"dim\">") |
| 678 | if templ_7745c5c3_Err != nil { | 808 | if templ_7745c5c3_Err != nil { | ||
| 679 | return templ_7745c5c3_Err | 809 | return templ_7745c5c3_Err | ||
| 680 | } | 810 | } | ||
| 681 | - | var templ_7745c5c3_Var32 string | 811 | + | var templ_7745c5c3_Var40 string |
| 682 | - | templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(line) | 812 | + | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(line) |
| 683 | if templ_7745c5c3_Err != nil { | 813 | if templ_7745c5c3_Err != nil { | ||
| 684 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 139, Col: 25} | 814 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 154, Col: 25} |
| 685 | } | 815 | } | ||
| 686 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32)) | 816 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) |
| 687 | if templ_7745c5c3_Err != nil { | 817 | if templ_7745c5c3_Err != nil { | ||
| 688 | return templ_7745c5c3_Err | 818 | return templ_7745c5c3_Err | ||
| 689 | } | 819 | } | ||
| 690 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</p>") | 820 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "</p>") |
| 691 | if templ_7745c5c3_Err != nil { | 821 | if templ_7745c5c3_Err != nil { | ||
| 692 | return templ_7745c5c3_Err | 822 | return templ_7745c5c3_Err | ||
| 693 | } | 823 | } | ||
| @@ -698,49 +828,49 @@ func State(l Layout, p StatePage) templ.Component { | |||||
| 698 | return templ_7745c5c3_Err | 828 | return templ_7745c5c3_Err | ||
| 699 | } | 829 | } | ||
| 700 | } | 830 | } | ||
| 701 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<p class=\"state-back\">") | 831 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "<p class=\"state-back\">") |
| 702 | if templ_7745c5c3_Err != nil { | 832 | if templ_7745c5c3_Err != nil { | ||
| 703 | return templ_7745c5c3_Err | 833 | return templ_7745c5c3_Err | ||
| 704 | } | 834 | } | ||
| 705 | for _, b := range p.Back { | 835 | for _, b := range p.Back { | ||
| 706 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "<a href=\"") | 836 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "<a href=\"") |
| 707 | if templ_7745c5c3_Err != nil { | 837 | if templ_7745c5c3_Err != nil { | ||
| 708 | return templ_7745c5c3_Err | 838 | return templ_7745c5c3_Err | ||
| 709 | } | 839 | } | ||
| 710 | - | var templ_7745c5c3_Var33 templ.SafeURL | 840 | + | var templ_7745c5c3_Var41 templ.SafeURL |
| 711 | - | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(b.Href)) | 841 | + | templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(b.Href)) |
| 712 | if templ_7745c5c3_Err != nil { | 842 | if templ_7745c5c3_Err != nil { | ||
| 713 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 146, Col: 36} | 843 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 161, Col: 36} |
| 714 | } | 844 | } | ||
| 715 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33)) | 845 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41)) |
| 716 | if templ_7745c5c3_Err != nil { | 846 | if templ_7745c5c3_Err != nil { | ||
| 717 | return templ_7745c5c3_Err | 847 | return templ_7745c5c3_Err | ||
| 718 | } | 848 | } | ||
| 719 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "\">") | 849 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "\">") |
| 720 | if templ_7745c5c3_Err != nil { | 850 | if templ_7745c5c3_Err != nil { | ||
| 721 | return templ_7745c5c3_Err | 851 | return templ_7745c5c3_Err | ||
| 722 | } | 852 | } | ||
| 723 | - | var templ_7745c5c3_Var34 string | 853 | + | var templ_7745c5c3_Var42 string |
| 724 | - | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(b.Label) | 854 | + | templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(b.Label) |
| 725 | if templ_7745c5c3_Err != nil { | 855 | if templ_7745c5c3_Err != nil { | ||
| 726 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 146, Col: 48} | 856 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 161, Col: 48} |
| 727 | } | 857 | } | ||
| 728 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) | 858 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42)) |
| 729 | if templ_7745c5c3_Err != nil { | 859 | if templ_7745c5c3_Err != nil { | ||
| 730 | return templ_7745c5c3_Err | 860 | return templ_7745c5c3_Err | ||
| 731 | } | 861 | } | ||
| 732 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</a>") | 862 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "</a>") |
| 733 | if templ_7745c5c3_Err != nil { | 863 | if templ_7745c5c3_Err != nil { | ||
| 734 | return templ_7745c5c3_Err | 864 | return templ_7745c5c3_Err | ||
| 735 | } | 865 | } | ||
| 736 | } | 866 | } | ||
| 737 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</p></section>") | 867 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "</p></section>") |
| 738 | if templ_7745c5c3_Err != nil { | 868 | if templ_7745c5c3_Err != nil { | ||
| 739 | return templ_7745c5c3_Err | 869 | return templ_7745c5c3_Err | ||
| 740 | } | 870 | } | ||
| 741 | return nil | 871 | return nil | ||
| 742 | }) | 872 | }) | ||
| 743 | - | templ_7745c5c3_Err = Shell(l, nil).Render(templ.WithChildren(ctx, templ_7745c5c3_Var29), templ_7745c5c3_Buffer) | 873 | + | templ_7745c5c3_Err = Shell(l, nil).Render(templ.WithChildren(ctx, templ_7745c5c3_Var37), templ_7745c5c3_Buffer) |
| 744 | if templ_7745c5c3_Err != nil { | 874 | if templ_7745c5c3_Err != nil { | ||
| 745 | return templ_7745c5c3_Err | 875 | return templ_7745c5c3_Err | ||
| 746 | } | 876 | } | ||
| @@ -766,12 +896,12 @@ func Login(l Layout, p LoginPage) templ.Component { | |||||
| 766 | }() | 896 | }() | ||
| 767 | } | 897 | } | ||
| 768 | ctx = templ.InitializeContext(ctx) | 898 | ctx = templ.InitializeContext(ctx) | ||
| 769 | - | templ_7745c5c3_Var35 := templ.GetChildren(ctx) | 899 | + | templ_7745c5c3_Var43 := templ.GetChildren(ctx) |
| 770 | - | if templ_7745c5c3_Var35 == nil { | 900 | + | if templ_7745c5c3_Var43 == nil { |
| 771 | - | templ_7745c5c3_Var35 = templ.NopComponent | 901 | + | templ_7745c5c3_Var43 = templ.NopComponent |
| 772 | } | 902 | } | ||
| 773 | ctx = templ.ClearChildren(ctx) | 903 | ctx = templ.ClearChildren(ctx) | ||
| 774 | - | templ_7745c5c3_Var36 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { | 904 | + | templ_7745c5c3_Var44 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { |
| 775 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | 905 | templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context | ||
| 776 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | 906 | templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) | ||
| 777 | if !templ_7745c5c3_IsBuffer { | 907 | if !templ_7745c5c3_IsBuffer { | ||
| @@ -783,75 +913,75 @@ func Login(l Layout, p LoginPage) templ.Component { | |||||
| 783 | }() | 913 | }() | ||
| 784 | } | 914 | } | ||
| 785 | ctx = templ.InitializeContext(ctx) | 915 | ctx = templ.InitializeContext(ctx) | ||
| 786 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "<section class=\"state\" aria-labelledby=\"state-title\"><h1 id=\"state-title\">") | 916 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<section class=\"state\" aria-labelledby=\"state-title\"><h1 id=\"state-title\">") |
| 787 | if templ_7745c5c3_Err != nil { | 917 | if templ_7745c5c3_Err != nil { | ||
| 788 | return templ_7745c5c3_Err | 918 | return templ_7745c5c3_Err | ||
| 789 | } | 919 | } | ||
| 790 | - | var templ_7745c5c3_Var37 string | 920 | + | var templ_7745c5c3_Var45 string |
| 791 | - | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(p.Title) | 921 | + | templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(p.Title) |
| 792 | if templ_7745c5c3_Err != nil { | 922 | if templ_7745c5c3_Err != nil { | ||
| 793 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 158, Col: 33} | 923 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 173, Col: 33} |
| 794 | } | 924 | } | ||
| 795 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) | 925 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45)) |
| 796 | if templ_7745c5c3_Err != nil { | 926 | if templ_7745c5c3_Err != nil { | ||
| 797 | return templ_7745c5c3_Err | 927 | return templ_7745c5c3_Err | ||
| 798 | } | 928 | } | ||
| 799 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</h1>") | 929 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "</h1>") |
| 800 | if templ_7745c5c3_Err != nil { | 930 | if templ_7745c5c3_Err != nil { | ||
| 801 | return templ_7745c5c3_Err | 931 | return templ_7745c5c3_Err | ||
| 802 | } | 932 | } | ||
| 803 | for _, line := range p.Lines { | 933 | for _, line := range p.Lines { | ||
| 804 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<p class=\"dim\">") | 934 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<p class=\"dim\">") |
| 805 | if templ_7745c5c3_Err != nil { | 935 | if templ_7745c5c3_Err != nil { | ||
| 806 | return templ_7745c5c3_Err | 936 | return templ_7745c5c3_Err | ||
| 807 | } | 937 | } | ||
| 808 | - | var templ_7745c5c3_Var38 string | 938 | + | var templ_7745c5c3_Var46 string |
| 809 | - | templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(line) | 939 | + | templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(line) |
| 810 | if templ_7745c5c3_Err != nil { | 940 | if templ_7745c5c3_Err != nil { | ||
| 811 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 160, Col: 25} | 941 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 175, Col: 25} |
| 812 | } | 942 | } | ||
| 813 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) | 943 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46)) |
| 814 | if templ_7745c5c3_Err != nil { | 944 | if templ_7745c5c3_Err != nil { | ||
| 815 | return templ_7745c5c3_Err | 945 | return templ_7745c5c3_Err | ||
| 816 | } | 946 | } | ||
| 817 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</p>") | 947 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "</p>") |
| 818 | if templ_7745c5c3_Err != nil { | 948 | if templ_7745c5c3_Err != nil { | ||
| 819 | return templ_7745c5c3_Err | 949 | return templ_7745c5c3_Err | ||
| 820 | } | 950 | } | ||
| 821 | } | 951 | } | ||
| 822 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<form class=\"state-act\" method=\"post\" action=\"") | 952 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<form class=\"state-act\" method=\"post\" action=\"") |
| 823 | if templ_7745c5c3_Err != nil { | 953 | if templ_7745c5c3_Err != nil { | ||
| 824 | return templ_7745c5c3_Err | 954 | return templ_7745c5c3_Err | ||
| 825 | } | 955 | } | ||
| 826 | - | var templ_7745c5c3_Var39 templ.SafeURL | 956 | + | var templ_7745c5c3_Var47 templ.SafeURL |
| 827 | - | templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Action)) | 957 | + | templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Action)) |
| 828 | if templ_7745c5c3_Err != nil { | 958 | if templ_7745c5c3_Err != nil { | ||
| 829 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 162, Col: 73} | 959 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 177, Col: 73} |
| 830 | } | 960 | } | ||
| 831 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) | 961 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) |
| 832 | if templ_7745c5c3_Err != nil { | 962 | if templ_7745c5c3_Err != nil { | ||
| 833 | return templ_7745c5c3_Err | 963 | return templ_7745c5c3_Err | ||
| 834 | } | 964 | } | ||
| 835 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "\"><button type=\"submit\" class=\"btn primary\">") | 965 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "\"><button type=\"submit\" class=\"btn primary\">") |
| 836 | if templ_7745c5c3_Err != nil { | 966 | if templ_7745c5c3_Err != nil { | ||
| 837 | return templ_7745c5c3_Err | 967 | return templ_7745c5c3_Err | ||
| 838 | } | 968 | } | ||
| 839 | - | var templ_7745c5c3_Var40 string | 969 | + | var templ_7745c5c3_Var48 string |
| 840 | - | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(p.Button) | 970 | + | templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(p.Button) |
| 841 | if templ_7745c5c3_Err != nil { | 971 | if templ_7745c5c3_Err != nil { | ||
| 842 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 163, Col: 56} | 972 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/pages.templ`, Line: 178, Col: 56} |
| 843 | } | 973 | } | ||
| 844 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) | 974 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48)) |
| 845 | if templ_7745c5c3_Err != nil { | 975 | if templ_7745c5c3_Err != nil { | ||
| 846 | return templ_7745c5c3_Err | 976 | return templ_7745c5c3_Err | ||
| 847 | } | 977 | } | ||
| 848 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "</button></form><p class=\"state-back\"><a href=\"/\">Back to home</a></p></section>") | 978 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "</button></form><p class=\"state-back\"><a href=\"/\">Back to home</a></p></section>") |
| 849 | if templ_7745c5c3_Err != nil { | 979 | if templ_7745c5c3_Err != nil { | ||
| 850 | return templ_7745c5c3_Err | 980 | return templ_7745c5c3_Err | ||
| 851 | } | 981 | } | ||
| 852 | return nil | 982 | return nil | ||
| 853 | }) | 983 | }) | ||
| 854 | - | templ_7745c5c3_Err = Shell(l, nil).Render(templ.WithChildren(ctx, templ_7745c5c3_Var36), templ_7745c5c3_Buffer) | 984 | + | templ_7745c5c3_Err = Shell(l, nil).Render(templ.WithChildren(ctx, templ_7745c5c3_Var44), templ_7745c5c3_Buffer) |
| 855 | if templ_7745c5c3_Err != nil { | 985 | if templ_7745c5c3_Err != nil { | ||
| 856 | return templ_7745c5c3_Err | 986 | return templ_7745c5c3_Err | ||
| 857 | } | 987 | } | ||
M internal/adapters/web/static/css/20-shell.css +11 -0
| @@ -20,6 +20,7 @@ | |||
| 20 | 20 | .i-branch { --i: url(icons/branch.svg); } | |
| 21 | 21 | .i-search { --i: url(icons/search.svg); } | |
| 22 | 22 | .i-file { --i: url(icons/file.svg); } | |
| 23 | + | .i-tag { --i: url(icons/tag.svg); } | |
| 23 | 24 | ||
| 24 | 25 | .pill { | |
| 25 | 26 | display: inline-flex; align-items: center; height: 20px; padding: 0 var(--s2); margin-left: var(--s1); | |
| @@ -123,6 +124,16 @@ | |||
| 123 | 124 | .rail section > :not(h2) { margin: var(--s3) var(--s4); } | |
| 124 | 125 | .rail section > .list { margin: var(--s2) 0; } | |
| 125 | 126 | .rail section > p + p { margin-top: calc(-1 * var(--s2)); } | |
| 127 | + | .rail h2 .count + a { margin-left: auto; } | |
| 128 | + | ||
| 129 | + | /* newest tag in the summary rail */ | |
| 130 | + | .latest-tag { | |
| 131 | + | display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-size: var(--fs-s); | |
| 132 | + | & .tag-name { display: inline-flex; align-items: center; gap: 6px; font: 700 var(--fs) / 20px var(--mono); color: var(--ink-hi); text-decoration: none; } | |
| 133 | + | & .tag-name:hover { text-decoration: underline; } | |
| 134 | + | & time { margin-left: auto; } | |
| 135 | + | & .tag-sub { flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } | |
| 136 | + | } | |
| 126 | 137 | ||
| 127 | 138 | .kv { | |
| 128 | 139 | display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: var(--s4); row-gap: var(--s1); | |
| @@ -20,6 +20,7 @@ | |||||
| 20 | .i-branch { --i: url(icons/branch.svg); } | 20 | .i-branch { --i: url(icons/branch.svg); } | ||
| 21 | .i-search { --i: url(icons/search.svg); } | 21 | .i-search { --i: url(icons/search.svg); } | ||
| 22 | .i-file { --i: url(icons/file.svg); } | 22 | .i-file { --i: url(icons/file.svg); } | ||
| 23 | + | .i-tag { --i: url(icons/tag.svg); } | |||
| 23 | 24 | ||||
| 24 | .pill { | 25 | .pill { | ||
| 25 | display: inline-flex; align-items: center; height: 20px; padding: 0 var(--s2); margin-left: var(--s1); | 26 | display: inline-flex; align-items: center; height: 20px; padding: 0 var(--s2); margin-left: var(--s1); | ||
| @@ -123,6 +124,16 @@ | |||||
| 123 | .rail section > :not(h2) { margin: var(--s3) var(--s4); } | 124 | .rail section > :not(h2) { margin: var(--s3) var(--s4); } | ||
| 124 | .rail section > .list { margin: var(--s2) 0; } | 125 | .rail section > .list { margin: var(--s2) 0; } | ||
| 125 | .rail section > p + p { margin-top: calc(-1 * var(--s2)); } | 126 | .rail section > p + p { margin-top: calc(-1 * var(--s2)); } | ||
| 127 | + | .rail h2 .count + a { margin-left: auto; } | |||
| 128 | + | ||||
| 129 | + | /* newest tag in the summary rail */ | |||
| 130 | + | .latest-tag { | |||
| 131 | + | display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-size: var(--fs-s); | |||
| 132 | + | & .tag-name { display: inline-flex; align-items: center; gap: 6px; font: 700 var(--fs) / 20px var(--mono); color: var(--ink-hi); text-decoration: none; } | |||
| 133 | + | & .tag-name:hover { text-decoration: underline; } | |||
| 134 | + | & time { margin-left: auto; } | |||
| 135 | + | & .tag-sub { flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } | |||
| 136 | + | } | |||
| 126 | 137 | ||||
| 127 | .kv { | 138 | .kv { | ||
| 128 | display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: var(--s4); row-gap: var(--s1); | 139 | display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: var(--s4); row-gap: var(--s1); | ||
A internal/adapters/web/static/icons/tag.svg +1 -0
| @@ -0,0 +1,1 @@ | |||
| 1 | + | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="#000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2.5v5l6.5 6.5 5-5L7 2.5z"/><circle cx="5" cy="5.5" r="1"/></svg> | |
| @@ -0,0 +1,1 @@ | |||||
| 1 | + | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="#000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2.5v5l6.5 6.5 5-5L7 2.5z"/><circle cx="5" cy="5.5" r="1"/></svg> | |||
M internal/adapters/web/summary.go +20 -12
| @@ -61,7 +61,8 @@ func (s *Server) summary(ctx context.Context, r *http.Request) (templ.Component, | |||
| 61 | 61 | p.Recent = append(p.Recent, row) | |
| 62 | 62 | } | |
| 63 | 63 | ||
| 64 | - | p.Facts = s.facts(ctx, d, now) | |
| 64 | + | p.Facts = s.facts(d, now) | |
| 65 | + | p.Latest = s.latest(ctx, d) | |
| 65 | 66 | ||
| 66 | 67 | if rd, err := s.readme(ctx, d, ref); err != nil { | |
| 67 | 68 | return nil, 0, err | |
| @@ -78,24 +79,31 @@ func (s *Server) summary(ctx context.Context, r *http.Request) (templ.Component, | |||
| 78 | 79 | } | |
| 79 | 80 | ||
| 80 | 81 | // maxTagDates is the most tags whose commit dates are read to name the | |
| 81 | - | // latest one; with more, the fact shows the count only. | |
| 82 | + | // latest one; with more, the rail shows the count only. | |
| 82 | 83 | const maxTagDates = 20 | |
| 83 | 84 | ||
| 85 | + | // latest is the newest tag of the repository for the rail, nil without tags. | |
| 86 | + | func (s *Server) latest(ctx context.Context, d *repoData) *LatestTag { | |
| 87 | + | n := len(d.tags) | |
| 88 | + | if n == 0 { | |
| 89 | + | return nil | |
| 90 | + | } | |
| 91 | + | lt := &LatestTag{Count: n, RefsHref: repoHref(d.name(), "refs")} | |
| 92 | + | if n <= maxTagDates { | |
| 93 | + | if name, c := latestTag(d.tags, s.commitsOf(ctx, d.name(), d.tags)); name != "" { | |
| 94 | + | lt.Name, lt.Href = name, repoHref(d.name(), "tree", name) | |
| 95 | + | lt.Subject, lt.When, lt.WhenAt = c.subject, c.when, c.whenAt | |
| 96 | + | } | |
| 97 | + | } | |
| 98 | + | return lt | |
| 99 | + | } | |
| 100 | + | ||
| 84 | 101 | // facts are the key/value rows of the rail. | |
| 85 | - | func (s *Server) facts(ctx context.Context, d *repoData, now time.Time) []Fact { | |
| 102 | + | func (s *Server) facts(d *repoData, now time.Time) []Fact { | |
| 86 | 103 | fs := []Fact{ | |
| 87 | 104 | lastPushFact(d.repo, now), | |
| 88 | 105 | {Key: "branch", Val: d.head.GetShortName() + " · " + plural(len(d.branches), "branch", "branches")}, | |
| 89 | 106 | } | |
| 90 | - | if n := len(d.tags); n > 0 { | |
| 91 | - | val := plural(n, "tag", "tags") | |
| 92 | - | if n <= maxTagDates { | |
| 93 | - | if name, c := latestTag(d.tags, s.commitsOf(ctx, d.name(), d.tags)); name != "" { | |
| 94 | - | val = name + " · " + c.when + " · " + val | |
| 95 | - | } | |
| 96 | - | } | |
| 97 | - | fs = append(fs, Fact{Key: "tag", Val: val}) | |
| 98 | - | } | |
| 99 | 107 | if c := d.repo.GetCreatedAt(); c.IsValid() { | |
| 100 | 108 | fs = append(fs, Fact{Key: "created", Val: absolute(c.AsTime()), Time: rfc3339(c.AsTime())}) | |
| 101 | 109 | } | |
| @@ -61,7 +61,8 @@ func (s *Server) summary(ctx context.Context, r *http.Request) (templ.Component, | |||||
| 61 | p.Recent = append(p.Recent, row) | 61 | p.Recent = append(p.Recent, row) | ||
| 62 | } | 62 | } | ||
| 63 | 63 | ||||
| 64 | - | p.Facts = s.facts(ctx, d, now) | 64 | + | p.Facts = s.facts(d, now) |
| 65 | + | p.Latest = s.latest(ctx, d) | |||
| 65 | 66 | ||||
| 66 | if rd, err := s.readme(ctx, d, ref); err != nil { | 67 | if rd, err := s.readme(ctx, d, ref); err != nil { | ||
| 67 | return nil, 0, err | 68 | return nil, 0, err | ||
| @@ -78,24 +79,31 @@ func (s *Server) summary(ctx context.Context, r *http.Request) (templ.Component, | |||||
| 78 | } | 79 | } | ||
| 79 | 80 | ||||
| 80 | // maxTagDates is the most tags whose commit dates are read to name the | 81 | // maxTagDates is the most tags whose commit dates are read to name the | ||
| 81 | - | // latest one; with more, the fact shows the count only. | 82 | + | // latest one; with more, the rail shows the count only. |
| 82 | const maxTagDates = 20 | 83 | const maxTagDates = 20 | ||
| 83 | 84 | ||||
| 85 | + | // latest is the newest tag of the repository for the rail, nil without tags. | |||
| 86 | + | func (s *Server) latest(ctx context.Context, d *repoData) *LatestTag { | |||
| 87 | + | n := len(d.tags) | |||
| 88 | + | if n == 0 { | |||
| 89 | + | return nil | |||
| 90 | + | } | |||
| 91 | + | lt := &LatestTag{Count: n, RefsHref: repoHref(d.name(), "refs")} | |||
| 92 | + | if n <= maxTagDates { | |||
| 93 | + | if name, c := latestTag(d.tags, s.commitsOf(ctx, d.name(), d.tags)); name != "" { | |||
| 94 | + | lt.Name, lt.Href = name, repoHref(d.name(), "tree", name) | |||
| 95 | + | lt.Subject, lt.When, lt.WhenAt = c.subject, c.when, c.whenAt | |||
| 96 | + | } | |||
| 97 | + | } | |||
| 98 | + | return lt | |||
| 99 | + | } | |||
| 100 | + | ||||
| 84 | // facts are the key/value rows of the rail. | 101 | // facts are the key/value rows of the rail. | ||
| 85 | - | func (s *Server) facts(ctx context.Context, d *repoData, now time.Time) []Fact { | 102 | + | func (s *Server) facts(d *repoData, now time.Time) []Fact { |
| 86 | fs := []Fact{ | 103 | fs := []Fact{ | ||
| 87 | lastPushFact(d.repo, now), | 104 | lastPushFact(d.repo, now), | ||
| 88 | {Key: "branch", Val: d.head.GetShortName() + " · " + plural(len(d.branches), "branch", "branches")}, | 105 | {Key: "branch", Val: d.head.GetShortName() + " · " + plural(len(d.branches), "branch", "branches")}, | ||
| 89 | } | 106 | } | ||
| 90 | - | if n := len(d.tags); n > 0 { | |||
| 91 | - | val := plural(n, "tag", "tags") | |||
| 92 | - | if n <= maxTagDates { | |||
| 93 | - | if name, c := latestTag(d.tags, s.commitsOf(ctx, d.name(), d.tags)); name != "" { | |||
| 94 | - | val = name + " · " + c.when + " · " + val | |||
| 95 | - | } | |||
| 96 | - | } | |||
| 97 | - | fs = append(fs, Fact{Key: "tag", Val: val}) | |||
| 98 | - | } | |||
| 99 | if c := d.repo.GetCreatedAt(); c.IsValid() { | 107 | if c := d.repo.GetCreatedAt(); c.IsValid() { | ||
| 100 | fs = append(fs, Fact{Key: "created", Val: absolute(c.AsTime()), Time: rfc3339(c.AsTime())}) | 108 | fs = append(fs, Fact{Key: "created", Val: absolute(c.AsTime()), Time: rfc3339(c.AsTime())}) | ||
| 101 | } | 109 | } | ||
M internal/adapters/web/view.go +11 -0
| @@ -141,6 +141,17 @@ type SummaryPage struct { | |||
| 141 | 141 | Readme *Readme | |
| 142 | 142 | Outline []Heading | |
| 143 | 143 | AllHref string | |
| 144 | + | // Latest is the newest tag, nil when the repository has none. | |
| 145 | + | Latest *LatestTag | |
| 146 | + | } | |
| 147 | + | ||
| 148 | + | // LatestTag is the newest tag of a repository, shown in the summary rail. | |
| 149 | + | // Name is empty when there are too many tags to date them; Count and | |
| 150 | + | // RefsHref still lead to the full list. | |
| 151 | + | type LatestTag struct { | |
| 152 | + | Name, Href, Subject, When, WhenAt string | |
| 153 | + | Count int | |
| 154 | + | RefsHref string | |
| 144 | 155 | } | |
| 145 | 156 | ||
| 146 | 157 | // RefRow is a branch or a tag in the refs table. | |
| @@ -141,6 +141,17 @@ type SummaryPage struct { | |||||
| 141 | Readme *Readme | 141 | Readme *Readme | ||
| 142 | Outline []Heading | 142 | Outline []Heading | ||
| 143 | AllHref string | 143 | AllHref string | ||
| 144 | + | // Latest is the newest tag, nil when the repository has none. | |||
| 145 | + | Latest *LatestTag | |||
| 146 | + | } | |||
| 147 | + | ||||
| 148 | + | // LatestTag is the newest tag of a repository, shown in the summary rail. | |||
| 149 | + | // Name is empty when there are too many tags to date them; Count and | |||
| 150 | + | // RefsHref still lead to the full list. | |||
| 151 | + | type LatestTag struct { | |||
| 152 | + | Name, Href, Subject, When, WhenAt string | |||
| 153 | + | Count int | |||
| 154 | + | RefsHref string | |||
| 144 | } | 155 | } | ||
| 145 | 156 | ||||
| 146 | // RefRow is a branch or a tag in the refs table. | 157 | // RefRow is a branch or a tag in the refs table. | ||