2023-07-17 13:13:09 +03:00
|
|
|
|
/**********************************************************************
|
|
|
|
|
|
*
|
|
|
|
|
|
*
|
|
|
|
|
|
*
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************************* Config ****/
|
|
|
|
|
|
|
|
|
|
|
|
:root {
|
|
|
|
|
|
/* dimensions */
|
2023-07-23 06:46:14 +03:00
|
|
|
|
--gallery-current-border-size: 0.7em;
|
|
|
|
|
|
--gallery-padding: 3em;
|
|
|
|
|
|
--gallery-padding-horizontal: var(--gallery-padding);
|
|
|
|
|
|
--gallery-padding-vertical: var(--gallery-current-border-size);
|
|
|
|
|
|
--gallery-padding-top: var(--gallery-padding-vertical);
|
|
|
|
|
|
--gallery-padding-bottom: var(--gallery-padding-vertical);
|
|
|
|
|
|
--gallery-padding-left: var(--gallery-padding-horizontal);
|
|
|
|
|
|
--gallery-padding-right: var(--gallery-padding-horizontal);
|
2023-07-22 15:33:55 +03:00
|
|
|
|
--gallery-image-scroll-margin: 1em;
|
2023-07-23 06:46:14 +03:00
|
|
|
|
--gallery-scrollbar-width: 0.5em;
|
2023-07-17 13:13:09 +03:00
|
|
|
|
|
|
|
|
|
|
--lightbox-frame-size: 5vmin;
|
|
|
|
|
|
--lightbox-image-margin-top: 0.75;
|
|
|
|
|
|
--lightbox-button-size: 4em;
|
|
|
|
|
|
|
|
|
|
|
|
/* theme */
|
|
|
|
|
|
--gallery-text-color: black;
|
|
|
|
|
|
--gallery-secondary-color: silver;
|
|
|
|
|
|
--gallery-background-color: white;
|
|
|
|
|
|
|
2023-07-17 13:37:10 +03:00
|
|
|
|
--lightbox-text-color: black;
|
2023-07-17 13:13:09 +03:00
|
|
|
|
--lightbox-background-color: white;
|
2023-07-21 03:16:20 +03:00
|
|
|
|
/*--lightbox-background-color: rgba(0,0,0,0.8);*/
|
2023-07-17 13:13:09 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-07-17 13:37:10 +03:00
|
|
|
|
.gallery-dark {
|
|
|
|
|
|
--gallery-text-color: silver;
|
|
|
|
|
|
--gallery-secondary-color: gray;
|
|
|
|
|
|
--gallery-background-color: black;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.lightbox-dark {
|
|
|
|
|
|
--lightbox-text-color: silver;
|
|
|
|
|
|
--lightbox-background-color: black;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-07-17 13:13:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/****************************************************** Scrolling ****/
|
|
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
|
|
width: var(--gallery-scrollbar-width);
|
|
|
|
|
|
}
|
|
|
|
|
|
::-webkit-scrollbar-track {
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
border-radius: 100px;
|
|
|
|
|
|
}
|
|
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
|
|
|
|
background-color: var(--gallery-secondary-color);
|
|
|
|
|
|
border-radius: 100px;
|
|
|
|
|
|
}
|
|
|
|
|
|
body {
|
|
|
|
|
|
overflow-y: scroll;
|
2023-07-23 07:13:07 +03:00
|
|
|
|
/* XXX these for some reason do not work in FF... */
|
|
|
|
|
|
scrollbar-width: thin;
|
|
|
|
|
|
scrollbar-color: transparent var(--gallery-secondary-color);
|
2023-07-17 13:37:10 +03:00
|
|
|
|
|
|
|
|
|
|
color: var(--gallery-text-color);
|
|
|
|
|
|
background: var(--gallery-background-color);
|
2023-07-17 13:13:09 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************** Gallery ****/
|
|
|
|
|
|
|
|
|
|
|
|
/* XXX need to account for scrollbar popping in and out */
|
|
|
|
|
|
.gallery {
|
2023-07-23 06:46:14 +03:00
|
|
|
|
padding-top: var(--gallery-padding-top);
|
|
|
|
|
|
padding-bottom: var(--gallery-padding-bottom);
|
|
|
|
|
|
padding-left: calc(
|
|
|
|
|
|
var(--gallery-scrollbar-width)
|
|
|
|
|
|
+ var(--gallery-padding-left) );
|
|
|
|
|
|
padding-right: var(--gallery-padding-right);
|
2023-07-17 13:37:10 +03:00
|
|
|
|
|
|
|
|
|
|
color: var(--gallery-text-color);
|
|
|
|
|
|
background: var(--gallery-background-color);
|
2023-07-17 13:13:09 +03:00
|
|
|
|
}
|
2023-07-20 21:42:17 +03:00
|
|
|
|
.gallery .images {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
|
align-content: flex-start;
|
|
|
|
|
|
flex-flow: row wrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
.gallery .images img {
|
2023-07-17 13:13:09 +03:00
|
|
|
|
height: 300px;
|
|
|
|
|
|
width: auto;
|
2023-07-22 15:33:55 +03:00
|
|
|
|
scroll-margin: var(--gallery-image-scroll-margin);
|
2023-07-17 13:13:09 +03:00
|
|
|
|
image-rendering: crisp-edges;
|
2023-07-21 03:16:20 +03:00
|
|
|
|
|
|
|
|
|
|
cursor: pointer;
|
2023-07-17 13:13:09 +03:00
|
|
|
|
}
|
2023-07-21 14:40:30 +03:00
|
|
|
|
|
|
|
|
|
|
/* selection marker... */
|
2023-07-20 21:42:17 +03:00
|
|
|
|
.gallery .images img.current {
|
2023-07-21 14:40:30 +03:00
|
|
|
|
z-index: 1;
|
2023-07-22 15:33:55 +03:00
|
|
|
|
box-shadow:
|
2023-07-23 06:46:14 +03:00
|
|
|
|
0px 0px 0px var(--gallery-current-border-size) rgba(255,255,255,1),
|
|
|
|
|
|
0.4em 0.4em 3em 0em rgba(0,0,0,0.8);
|
2023-07-17 13:13:09 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-20 21:42:17 +03:00
|
|
|
|
/*************************************************** Image markers ***/
|
|
|
|
|
|
|
|
|
|
|
|
.gallery .images img+.mark {
|
2023-07-21 14:40:30 +03:00
|
|
|
|
z-index: 1;
|
2023-07-20 21:42:17 +03:00
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
2023-07-23 06:51:18 +03:00
|
|
|
|
.gallery.lightboxed .images img.current+.mark {
|
2023-07-22 15:33:55 +03:00
|
|
|
|
z-index: 2;
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
}
|
2023-07-20 21:42:17 +03:00
|
|
|
|
|
|
|
|
|
|
/* marker: selected */
|
|
|
|
|
|
.gallery .images img+.mark.selected:after {
|
|
|
|
|
|
content: "";
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
width: 1em;
|
|
|
|
|
|
height: 1em;
|
|
|
|
|
|
right: 0.5em;
|
|
|
|
|
|
bottom: 0.5em;
|
|
|
|
|
|
border-radius: 50%;
|
2023-07-20 22:06:51 +03:00
|
|
|
|
|
2023-07-20 21:42:17 +03:00
|
|
|
|
background: blue;
|
2023-07-22 15:33:55 +03:00
|
|
|
|
|
|
|
|
|
|
box-shadow: 0em 0em 0em 0.05em rgba(255,255,255,1);
|
|
|
|
|
|
|
|
|
|
|
|
cursor: pointer;
|
2023-07-20 21:42:17 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-17 13:13:09 +03:00
|
|
|
|
/******************************************************* Lightbox ****/
|
|
|
|
|
|
|
|
|
|
|
|
.gallery .lightbox {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
top: 0px;
|
|
|
|
|
|
left: 0px;
|
2023-07-21 14:40:30 +03:00
|
|
|
|
z-index: 1;
|
2023-07-17 13:13:09 +03:00
|
|
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
2023-07-17 13:37:10 +03:00
|
|
|
|
color: var(--lightbox-text-color);
|
2023-07-17 13:13:09 +03:00
|
|
|
|
background: var(--lightbox-background-color);
|
|
|
|
|
|
}
|
2023-07-22 15:33:55 +03:00
|
|
|
|
.gallery.lightboxed .lightbox {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
}
|
2023-07-21 21:24:40 +03:00
|
|
|
|
.gallery .lightbox.show-caption:before {
|
2023-07-17 13:13:09 +03:00
|
|
|
|
content: attr(caption);
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: 0.5em;
|
|
|
|
|
|
left: 0.5em;
|
|
|
|
|
|
}
|
|
|
|
|
|
.gallery .lightbox.clickable {
|
2023-07-21 03:16:20 +03:00
|
|
|
|
cursor: pointer;
|
2023-07-17 13:13:09 +03:00
|
|
|
|
}
|
|
|
|
|
|
/* XXX add metadata display... */
|
|
|
|
|
|
.gallery .lightbox img {
|
|
|
|
|
|
object-fit: contain;
|
|
|
|
|
|
width: calc(
|
|
|
|
|
|
100vw
|
|
|
|
|
|
- var(--lightbox-frame-size) * 2);
|
|
|
|
|
|
height: calc(
|
|
|
|
|
|
100vh
|
|
|
|
|
|
- var(--lightbox-frame-size) * 2);
|
|
|
|
|
|
margin-top: calc(
|
|
|
|
|
|
var(--lightbox-frame-size)
|
|
|
|
|
|
* var(--lightbox-image-margin-top));
|
|
|
|
|
|
}
|
|
|
|
|
|
/* controls: next/prev... */
|
2023-07-21 03:16:20 +03:00
|
|
|
|
.gallery .lightbox .button {
|
|
|
|
|
|
cursor: pointer;
|
2023-07-17 13:13:09 +03:00
|
|
|
|
font-size: var(--lightbox-button-size);
|
|
|
|
|
|
padding: 0 0.25em;
|
|
|
|
|
|
filter: saturate(0);
|
|
|
|
|
|
opacity: 0.1;
|
|
|
|
|
|
}
|
2023-07-21 03:16:20 +03:00
|
|
|
|
.gallery .lightbox .button:hover {
|
2023-07-17 13:13:09 +03:00
|
|
|
|
opacity: 1;
|
|
|
|
|
|
filter: saturate(1);
|
|
|
|
|
|
}
|
|
|
|
|
|
/* controls: close... */
|
|
|
|
|
|
.gallery .lightbox .button.close {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0px;
|
|
|
|
|
|
right: 0px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.gallery .lightbox .button.close:after {
|
|
|
|
|
|
content: "×";
|
|
|
|
|
|
color: red;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-17 13:16:55 +03:00
|
|
|
|
/**********************************************************************
|
|
|
|
|
|
* vim:set ts=4 sw=4 : */
|