Skip to content

Commit 1f6e35c

Browse files
committed
Gallery: the full-size view's header in two rows on a phone; "Screenshots by VisualCI"
The view's × moves out of its controls, beside the title, so under 40rem the header is the title with × and then one row of switches with ‹ ›, leaving the image more room. The credit line reads "Screenshots by VisualCI" (still the credit option, on by default). The strip's scroll buttons get a firmer shadow (--vg-float-shadow) so they stay legible over a busy screenshot. Every renderer and the golden fixtures follow.
1 parent d4611f1 commit 1f6e35c

16 files changed

Lines changed: 55 additions & 32 deletions

File tree

‎clients/gallery/contract/SPEC.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ change, and regenerate the fixtures (`UPDATE_GOLDEN=1 pnpm test` in `../js`), re
2424
| `order` | `[]` | Screen keys in the order they show. |
2525
| `groups` | `{}` | `{"<group name>": {title?, size?, fit?}}`: a title over the manifest's; `size` (`"desktop"` or `"phone"`), the size of the group's shots whose names give no width, over the image's shape; `fit`, `"cover"` (the default: the image fills its card, cropped at the bottom) or `"contain"` (shown whole and centred, for a Mac app's windows). |
2626
| `groupOrder` | `[]` | Group names in the order they show. |
27-
| `credit` | `true` | The "Powered by VisualCI" line. |
27+
| `credit` | `true` | The "Screenshots by VisualCI" line; false leaves it out. |
2828
| `layout` | `"grid"` | `"grid"` or `"strip"`. |
2929
| `themeSwitch` | `true` | Light and Dark buttons. Always false for the strip. |
3030
| `seeAll` | `null` | `{href, text?}`: a link under the gallery; `text` defaults to "See all screenshots". |
@@ -167,9 +167,9 @@ the default text), `headingLevel`, `id`, `credit` as above.
167167
[<h(0) class="vg-title">{title}</h(0)> when title isn't null]
168168
… the grid's or the strip's lines …
169169
[<p class="vg-see-all"><a href="{seeAll.href}">{seeAll.text}</a></p> when seeAll]
170-
[<p class="vg-credit">Screenshot Gallery Powered by <a href="https://visualci.com">VisualCI.com</a></p> when credit]
170+
[<p class="vg-credit">Screenshots by <a href="https://visualci.com">VisualCI</a></p> when credit]
171171
<dialog class="vg-box" aria-labelledby="{id}-box-title">
172-
<div class="vg-box-bar"><h(B) class="vg-box-title" id="{id}-box-title"></h(B)><div class="vg-controls">{THEMES if themeSwitch}{SIZES(desktop phone, " vg-box-sizes") if grid}{STEP(-1)}{STEP(1)}{CLOSE}</div></div>
172+
<div class="vg-box-bar"><h(B) class="vg-box-title" id="{id}-box-title"></h(B)><div class="vg-controls">{THEMES if themeSwitch}{SIZES(desktop phone, " vg-box-sizes") if grid}{STEP(-1)}{STEP(1)}</div>{CLOSE}</div>
173173
<div class="vg-box-view"></div>
174174
</dialog>
175175
</section>

‎clients/gallery/contract/fixtures/duplicates/gallery.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
<li class="vg-card" data-vg-screen="y" data-vg-sizes="desktop"><a class="vg-thumb" href="https://app.visualci.com/g/acme/web/y-light-1440.png" data-vg-open aria-label="Y: view full size"><img class="vg-img" data-vg-size="desktop" data-vg-theme="light" src="https://app.visualci.com/g/acme/web/y-light-1440.png" width="1440" height="900" alt="Y, desktop, light" loading="lazy" decoding="async"><img class="vg-img" data-vg-size="desktop" data-vg-theme="dark" src="https://app.visualci.com/g/acme/web/y-dark-1440.png" width="1440" height="900" alt="Y, desktop, dark" loading="lazy" decoding="async"></a><h3 class="vg-card-title">Y</h3><p class="vg-caption"></p></li>
3131
</ul>
3232
</div>
33-
<p class="vg-credit">Screenshot Gallery Powered by <a href="https://visualci.com">VisualCI.com</a></p>
33+
<p class="vg-credit">Screenshots by <a href="https://visualci.com">VisualCI</a></p>
3434
<dialog class="vg-box" aria-labelledby="vg-box-title">
35-
<div class="vg-box-bar"><h2 class="vg-box-title" id="vg-box-title"></h2><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div></div>
35+
<div class="vg-box-bar"><h2 class="vg-box-title" id="vg-box-title"></h2><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button></div><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div>
3636
<div class="vg-box-view"></div>
3737
</dialog>
3838
</section>

‎clients/gallery/contract/fixtures/escaping/gallery.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ <h2 class="vg-title">Shots &lt;&amp; &quot;friends&quot;&gt;</h2>
2323
<li class="vg-card" data-vg-screen="x" data-vg-sizes="phone"><a class="vg-thumb" href="https://app.visualci.com/g/acme/web/x-light-390.png" data-vg-open aria-label="X: view full size"><img class="vg-img" data-vg-size="phone" data-vg-theme="light" src="https://app.visualci.com/g/acme/web/x-light-390.png" width="390" height="844" alt="X, phone, light" loading="lazy" decoding="async"><img class="vg-img" data-vg-size="phone" data-vg-theme="dark" src="https://app.visualci.com/g/acme/web/x-dark-390.png" width="390" height="844" alt="X, phone, dark" loading="lazy" decoding="async"></a><h4 class="vg-card-title">X</h4></li>
2424
</ul>
2525
</div>
26-
<p class="vg-credit">Screenshot Gallery Powered by <a href="https://visualci.com">VisualCI.com</a></p>
26+
<p class="vg-credit">Screenshots by <a href="https://visualci.com">VisualCI</a></p>
2727
<dialog class="vg-box" aria-labelledby="vg-box-title">
28-
<div class="vg-box-bar"><h3 class="vg-box-title" id="vg-box-title"></h3><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div></div>
28+
<div class="vg-box-bar"><h3 class="vg-box-title" id="vg-box-title"></h3><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button></div><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div>
2929
<div class="vg-box-view"></div>
3030
</dialog>
3131
</section>

‎clients/gallery/contract/fixtures/fleetlayer/gallery.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
<li class="vg-card" data-vg-screen="mac/proposal" data-vg-sizes="desktop" data-vg-fit="contain"><a class="vg-thumb" href="https://app.visualci.com/g/acme/web/mac/proposal-light.png" data-vg-open aria-label="Proposal: view full size"><img class="vg-img" data-vg-size="desktop" data-vg-theme="light" src="https://app.visualci.com/g/acme/web/mac/proposal-light.png" width="920" height="992" alt="Proposal, desktop, light" loading="lazy" decoding="async"><img class="vg-img" data-vg-size="desktop" data-vg-theme="dark" src="https://app.visualci.com/g/acme/web/mac/proposal-dark.png" width="920" height="992" alt="Proposal, desktop, dark" loading="lazy" decoding="async"></a><h3 class="vg-card-title">Proposal</h3></li>
2929
</ul>
3030
</div>
31-
<p class="vg-credit">Screenshot Gallery Powered by <a href="https://visualci.com">VisualCI.com</a></p>
31+
<p class="vg-credit">Screenshots by <a href="https://visualci.com">VisualCI</a></p>
3232
<dialog class="vg-box" aria-labelledby="vg-box-title">
33-
<div class="vg-box-bar"><h2 class="vg-box-title" id="vg-box-title"></h2><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div></div>
33+
<div class="vg-box-bar"><h2 class="vg-box-title" id="vg-box-title"></h2><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button></div><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div>
3434
<div class="vg-box-view"></div>
3535
</dialog>
3636
</section>

‎clients/gallery/contract/fixtures/group-order/gallery.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ <h2 class="vg-title">Screenshots</h2>
2323
<li class="vg-card" data-vg-screen="android/a" data-vg-sizes="phone"><a class="vg-thumb" href="https://app.visualci.com/g/acme/web/android/a-light.png" data-vg-open aria-label="A: view full size"><img class="vg-img" data-vg-size="phone" data-vg-theme="light" src="https://app.visualci.com/g/acme/web/android/a-light.png" width="1080" height="2400" alt="A, phone, light" loading="lazy" decoding="async"><img class="vg-img" data-vg-size="phone" data-vg-theme="dark" src="https://app.visualci.com/g/acme/web/android/a-dark.png" width="1080" height="2400" alt="A, phone, dark" loading="lazy" decoding="async"></a><h4 class="vg-card-title">A</h4></li>
2424
</ul>
2525
</div>
26-
<p class="vg-credit">Screenshot Gallery Powered by <a href="https://visualci.com">VisualCI.com</a></p>
26+
<p class="vg-credit">Screenshots by <a href="https://visualci.com">VisualCI</a></p>
2727
<dialog class="vg-box" aria-labelledby="vg-box-title">
28-
<div class="vg-box-bar"><h3 class="vg-box-title" id="vg-box-title"></h3><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div></div>
28+
<div class="vg-box-bar"><h3 class="vg-box-title" id="vg-box-title"></h3><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button></div><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div>
2929
<div class="vg-box-view"></div>
3030
</dialog>
3131
</section>

‎clients/gallery/contract/fixtures/page-theme/gallery.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ <h2 class="vg-title">Screens</h2>
1919
</ul>
2020
</div>
2121
<p class="vg-see-all"><a href="https://example.com/all">Every screen</a></p>
22-
<p class="vg-credit">Screenshot Gallery Powered by <a href="https://visualci.com">VisualCI.com</a></p>
22+
<p class="vg-credit">Screenshots by <a href="https://visualci.com">VisualCI</a></p>
2323
<dialog class="vg-box" aria-labelledby="vg-box-title">
24-
<div class="vg-box-bar"><h3 class="vg-box-title" id="vg-box-title"></h3><div class="vg-controls"><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div></div>
24+
<div class="vg-box-bar"><h3 class="vg-box-title" id="vg-box-title"></h3><div class="vg-controls"><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button></div><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div>
2525
<div class="vg-box-view"></div>
2626
</dialog>
2727
</section>

‎clients/gallery/contract/fixtures/single-group/gallery.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h1 class="vg-title">Product tour</h1>
88
</ul>
99
</div>
1010
<dialog class="vg-box" aria-labelledby="tour-box-title">
11-
<div class="vg-box-bar"><h2 class="vg-box-title" id="tour-box-title"></h2><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div></div>
11+
<div class="vg-box-bar"><h2 class="vg-box-title" id="tour-box-title"></h2><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button></div><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div>
1212
<div class="vg-box-view"></div>
1313
</dialog>
1414
</section>

‎clients/gallery/contract/fixtures/strip/gallery.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</div>
1414
<p class="vg-see-all"><a href="/screenshots/">See all screenshots</a></p>
1515
<dialog class="vg-box" aria-labelledby="vg-box-title">
16-
<div class="vg-box-bar"><h2 class="vg-box-title" id="vg-box-title"></h2><div class="vg-controls"><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div></div>
16+
<div class="vg-box-bar"><h2 class="vg-box-title" id="vg-box-title"></h2><div class="vg-controls"><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button></div><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div>
1717
<div class="vg-box-view"></div>
1818
</dialog>
1919
</section>

‎clients/gallery/contract/fixtures/visualci/gallery.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ <h2 class="vg-title">Screenshots</h2>
1818
<li class="vg-card" data-vg-screen="screenshots/app/account" data-vg-sizes="phone"><a class="vg-thumb" href="https://app.visualci.com/g/acme/web/screenshots/app/account/390-light.png" data-vg-open aria-label="Account: view full size"><img class="vg-img" data-vg-size="phone" data-vg-theme="light" src="https://app.visualci.com/g/acme/web/screenshots/app/account/390-light.png" width="390" height="1200" alt="Account, phone, light" loading="lazy" decoding="async"><img class="vg-img" data-vg-size="phone" data-vg-theme="dark" src="https://app.visualci.com/g/acme/web/screenshots/app/account/390-dark.png" data-src-2x="https://app.visualci.com/g/acme/web/screenshots/app/account/390-dark-2x.png" width="390" height="1200" alt="Account, phone, dark" loading="lazy" decoding="async"></a><h4 class="vg-card-title">Account</h4></li>
1919
</ul>
2020
</div>
21-
<p class="vg-credit">Screenshot Gallery Powered by <a href="https://visualci.com">VisualCI.com</a></p>
21+
<p class="vg-credit">Screenshots by <a href="https://visualci.com">VisualCI</a></p>
2222
<dialog class="vg-box" aria-labelledby="vg-box-title">
23-
<div class="vg-box-bar"><h3 class="vg-box-title" id="vg-box-title"></h3><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div></div>
23+
<div class="vg-box-bar"><h3 class="vg-box-title" id="vg-box-title"></h3><div class="vg-controls"><div class="vg-seg" role="group" aria-label="Theme"><button type="button" data-vg-set-theme="light" aria-pressed="false">Light</button><button type="button" data-vg-set-theme="dark" aria-pressed="false">Dark</button></div><div class="vg-seg vg-box-sizes" role="group" aria-label="Screen size"><button type="button" data-vg-set-size="desktop" aria-pressed="false">Desktop</button><button type="button" data-vg-set-size="phone" aria-pressed="false">Phone</button></div><button type="button" class="vg-icon" data-vg-step="-1" aria-label="Previous screen">‹</button><button type="button" class="vg-icon" data-vg-step="1" aria-label="Next screen">›</button></div><button type="button" class="vg-icon" data-vg-close aria-label="Close">×</button></div>
2424
<div class="vg-box-view"></div>
2525
</dialog>
2626
</section>

0 commit comments

Comments
 (0)