Skip to content

Commit 433a95a

Browse files
committed
maint(pat gallery): Add demo/test case for extending the pat-gallery page with itself.
1 parent 3b091b8 commit 433a95a

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/pat/gallery/index.html

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@
1818
</style>
1919
</head>
2020
<body>
21+
22+
<nav>
23+
<a href="." class="pat-inject" data-pat-inject="source: body; target: body::after">inject-extend</a>
24+
</nav>
25+
2126
<h1>Normal gallery</h1>
22-
<nav class="pat-gallery" data-pat-gallery="hide-overlay: 0">
27+
<section class="pat-gallery" data-pat-gallery="hide-overlay: 0">
2328
<a href="full-1.jpg"
2429
><img
2530
src="thumb-1.jpg"
@@ -31,13 +36,13 @@ <h1>Normal gallery</h1>
3136
<a href="full-3.jpg"
3237
><img src="thumb-3.jpg" title="Photy by Paulo Brandao"
3338
/></a>
34-
</nav>
39+
</section>
3540

3641
<h1>Gallery with mixed content</h1>
3742
<p>
3843
Only items which match the selecor ``a.add-to-gallery`` are added.
3944
</p>
40-
<nav
45+
<section
4146
class="pat-gallery"
4247
data-pat-gallery="item-selector: a.add-to-gallery"
4348
>
@@ -53,10 +58,10 @@ <h1>Gallery with mixed content</h1>
5358
<a href="full-3.jpg" class="add-to-gallery"
5459
><img src="thumb-3.jpg" title="Photy by Paulo Brandao"
5560
/></a>
56-
</nav>
61+
</section>
5762

5863
<h1>Image popups, not collected in a gallery</h1>
59-
<nav>
64+
<section>
6065
<a href="full-1.jpg" class="pat-gallery"
6166
><img
6267
src="thumb-1.jpg"
@@ -68,21 +73,21 @@ <h1>Image popups, not collected in a gallery</h1>
6873
<a href="full-3.jpg" class="pat-gallery"
6974
><img src="thumb-3.jpg" title="Photy by Paulo Brandao"
7075
/></a>
71-
</nav>
76+
</section>
7277

7378
<h1>Gallery adding directly images.</h1>
74-
<nav class="pat-gallery" data-pat-gallery="item-selector: img;">
79+
<section class="pat-gallery" data-pat-gallery="item-selector: img;">
7580
<img src="full-1.jpg" />
7681
<img src="full-2.jpg" />
7782
<img src="full-3.jpg" />
78-
</nav>
83+
</section>
7984

8085
<h1>Gallery adding wrapped and unwrapped images.</h1>
8186
<p>
8287
The last image here is wrapped in a external link.<br/>
8388
The external link can be opened in a new tab, the image is included in the gallery.
8489
</p>
85-
<nav
90+
<section
8691
class="pat-gallery"
8792
data-pat-gallery="item-selector: a.add-to-gallery, :not(.add-to-gallery) > img"
8893
>
@@ -94,7 +99,7 @@ <h1>Gallery adding wrapped and unwrapped images.</h1>
9499
<a href="https://www.syslab.com/" target="_blank" class="exclude-from-gallery"
95100
><img src="full-4.jpg"
96101
/></a>
97-
</nav>
102+
</section>
98103

99104
(Timestamp to see if page has reloaded:
100105
<script>

0 commit comments

Comments
 (0)