Use subdirectories in the generated gallery

JavaScript files are now in js/, CSS files in css/, thumbnail images in
thumbnails/.
This commit is contained in:
Tino Mettler
2025-12-10 08:46:24 +01:00
parent c6002e7eb7
commit b0373f7166
7 changed files with 21 additions and 19 deletions

View File

@@ -0,0 +1,113 @@
/*
copyright (c) 2025 Tino Mettler
darktable is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
darktable is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this software. If not, see <http://www.gnu.org/licenses/>.
*/
body {
font-family: system-ui, Arial, Helvetica, sans-serif;
background-color: rgb(238, 240, 242);
}
.heading h1 {
text-align: center;
background-color: #cdd;
color: black;
display: grid;
}
.heading h1:after {
content: " ";
border-bottom: 1px solid #888888;
height: 1px;
}
.gallery {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 3vw;
margin: 3vw auto;
padding: 1.5vw;
}
.slider {
margin: 0;
padding: 0;
}
.gallery img {
cursor: pointer;
object-fit: contain;
background: none;
padding: 0;
border: 1px outset #737780;
}
.gallery img:hover {
transform: scale(1.08);
}
.thumb {
object-fit: contain;
flex-shrink: 0;
min-width: 100%;
min-height: 100%;
max-width: 100%;
max-height: 100%;
}
.thumb-box {
display: flex;
align-items: center;
object-fit: contain;
justify-content: center;
background: none;
box-shadow: 0 1vw 4vw 1vw rgba(0,0,0,0.6);
}
.navgrid {
font-size: 3.5vh;
display: grid;
grid-template-columns: 4em 1fr 1.5em 1.5em 1fr 1.5em 1.5em;
grid-column-gap: 1vw;
background-color: black;
}
.nav {
height: 5vh;
background-color: rgba(60,60,60, 0.4);
justify-content: center;
align-items: center;
display: flex;
z-index: 1001;
color: #ccc;
}
.counter {
font-size: 2.5vh;
}
.button {
cursor: pointer;
}
.button:hover {
cursor: pointer;
color: white;
text-shadow: 0px 0px 10px #ccc;
}

View File

@@ -0,0 +1,112 @@
/*
copyright (c) 2025 Tino Mettler
darktable is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
darktable is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this software. If not, see <http://www.gnu.org/licenses/>.
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
background: #000;
display: flex;
flex-direction: column;
}
.viewer {
position: relative;
width: 100vw;
height: 100vh;
touch-action: none;
overflow: hidden;
display: none;
}
.slider {
position: relative;
width: 100vw;
height: 95vh;
touch-action: none;
overflow: hidden;
}
.slide-container {
position: absolute;
top: 0;
left: 0;
width: 300%;
height: 100%;
display: flex;
transform: translateX(-33.333%);
transition: transform 0.3s ease-out;
will-change: transform;
}
.slide {
width: 33.333%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background: #000;
will-change: contents;
overflow: hidden;
position: relative;
padding: 0;
margin: 0;
touch-action: none;
object-fit: contain;
}
.slide img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
padding: 0;
margin: 0;
display: block;
transform-origin: 0 0;
cursor: zoom-in;
object-fit: contain;
}
.slide.zoomed img {
cursor: zoom-out;
max-width: none;
max-height: none;
}
.slide img.zooming {
transition: transform 0.2s ease-out;
}
.nav-bar {
width: 100vw;
height: 5vh;
background: #333;
color: #fff;
display: flex;
align-items: center;
padding-left: 20px;
box-sizing: border-box;
font-family: Arial, sans-serif;
font-size: 16px;
}