gallery.js v2: when the last 'next' turns off, focus moves to the close button instead of the page behind (seen in the live check)
gates / gates (push) Successful in 4m29s
gates / gates (push) Successful in 4m29s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
## 2026-10-08 (late afternoon) — one picture viewer for the whole site
|
||||
|
||||
- **`assets/gallery.js`** — the viewer that lived twice inline on the two apps pages is one shared file now (`defer`,
|
||||
`?v=1`), its markup built by the script. The dashboard pictures (home and technology, both languages) open in it too,
|
||||
`?v=2` — v2 keeps focus inside the viewer when the last „next" turns off), its markup built by the script. The dashboard pictures (home and technology, both languages) open in it too,
|
||||
as one set: Launcher → Apps → an app → Backups.
|
||||
- **A set is declared, not guessed:** every picture is a real `<a href="/assets/…webp" data-gallery="<set>">`; an app
|
||||
card's further pictures are hidden links in the card. The old probing for `-screenshot-N.webp` files is gone (no
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<!-- shared assets: bump ?v= together on any site.css/icons.svg change -->
|
||||
<link rel="stylesheet" href="/assets/site.css?v=5">
|
||||
<link rel="icon" type="image/png" href="/assets/logo_favicon_2.svg">
|
||||
<script defer src="/assets/gallery.js?v=1"></script>
|
||||
<script defer src="/assets/gallery.js?v=2"></script>
|
||||
<script defer src="https://stats.felhom.eu/script.js" data-website-id="d419db57-5e1c-48df-bdb3-c29f25fb1661"></script>
|
||||
</head>
|
||||
<body class="page-alkalmazasok">
|
||||
|
||||
@@ -79,6 +79,8 @@
|
||||
nextBtn.style.display = single ? 'none' : 'flex';
|
||||
dots.style.display = single ? 'none' : 'flex';
|
||||
counter.style.display = single ? 'none' : 'block';
|
||||
// a button that just turned off would drop the focus to the page behind the viewer
|
||||
if (document.activeElement && document.activeElement.disabled) closeBtn.focus();
|
||||
}
|
||||
|
||||
function go(i) {
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<!-- shared assets: bump ?v= together on any site.css/icons.svg change -->
|
||||
<link rel="stylesheet" href="/assets/site.css?v=5">
|
||||
<link rel="icon" type="image/png" href="/assets/logo_favicon_2.svg">
|
||||
<script defer src="/assets/gallery.js?v=1"></script>
|
||||
<script defer src="/assets/gallery.js?v=2"></script>
|
||||
<script defer src="https://stats.felhom.eu/script.js" data-website-id="d419db57-5e1c-48df-bdb3-c29f25fb1661"></script>
|
||||
</head>
|
||||
<body class="page-alkalmazasok">
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<!-- shared assets: bump ?v= together on any site.css/icons.svg change -->
|
||||
<link rel="stylesheet" href="/assets/site.css?v=5">
|
||||
<link rel="icon" type="image/png" href="/assets/logo_favicon_2.svg">
|
||||
<script defer src="/assets/gallery.js?v=1"></script>
|
||||
<script defer src="/assets/gallery.js?v=2"></script>
|
||||
<script defer src="https://stats.felhom.eu/script.js" data-website-id="d419db57-5e1c-48df-bdb3-c29f25fb1661"></script>
|
||||
</head>
|
||||
<body class="page-index">
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<!-- shared assets: bump ?v= together on any site.css/icons.svg change -->
|
||||
<link rel="stylesheet" href="/assets/site.css?v=5">
|
||||
<link rel="icon" type="image/png" href="/assets/logo_favicon_2.svg">
|
||||
<script defer src="/assets/gallery.js?v=1"></script>
|
||||
<script defer src="/assets/gallery.js?v=2"></script>
|
||||
<script defer src="https://stats.felhom.eu/script.js" data-website-id="d419db57-5e1c-48df-bdb3-c29f25fb1661"></script>
|
||||
</head>
|
||||
<body class="page-technologiak">
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@
|
||||
<!-- shared assets: bump ?v= together on any site.css/icons.svg change -->
|
||||
<link rel="stylesheet" href="/assets/site.css?v=5">
|
||||
<link rel="icon" type="image/png" href="/assets/logo_favicon_2.svg">
|
||||
<script defer src="/assets/gallery.js?v=1"></script>
|
||||
<script defer src="/assets/gallery.js?v=2"></script>
|
||||
<script defer src="https://stats.felhom.eu/script.js" data-website-id="d419db57-5e1c-48df-bdb3-c29f25fb1661"></script>
|
||||
</head>
|
||||
<body class="page-index">
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<!-- shared assets: bump ?v= together on any site.css/icons.svg change -->
|
||||
<link rel="stylesheet" href="/assets/site.css?v=5">
|
||||
<link rel="icon" type="image/png" href="/assets/logo_favicon_2.svg">
|
||||
<script defer src="/assets/gallery.js?v=1"></script>
|
||||
<script defer src="/assets/gallery.js?v=2"></script>
|
||||
<script defer src="https://stats.felhom.eu/script.js" data-website-id="d419db57-5e1c-48df-bdb3-c29f25fb1661"></script>
|
||||
</head>
|
||||
<body class="page-technologiak">
|
||||
|
||||
Reference in New Issue
Block a user