|
|
|
@ -5,43 +5,73 @@
|
|
|
|
|
<title>%%TITLE%%</title>
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<link rel="stylesheet" href="fastgallery.css">
|
|
|
|
|
<link href="https://unpkg.com/@primer/css/dist/primer.css" rel="stylesheet">
|
|
|
|
|
<link href="fastgallery.css" rel="stylesheet">
|
|
|
|
|
<!-- <script src="fastgallery.js"></script> -->
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
<body class="bg-gray">
|
|
|
|
|
<h1>%%TITLE%%</h1>
|
|
|
|
|
|
|
|
|
|
<div class="images">
|
|
|
|
|
<!-- TODO -->
|
|
|
|
|
<a href="temp2">
|
|
|
|
|
<div class="folder">
|
|
|
|
|
<div class="folderThumbnail">
|
|
|
|
|
<img src="_thumbnails/temp2/2018-10-14 15.59.20.jpg" alt="diipadaapa" class="folder"><img src="_thumbnails/temp2/2018-11-25 20.59.17.jpg" alt="diipadaapa" class="folder"><img src="_thumbnails/temp2/2018-11-25 20.59.21.jpg" alt="diipadaapa"
|
|
|
|
|
class="folder"><img src="_thumbnails/temp2/2018-11-25 20.59.46.jpg" alt="diipadaapa" class="folder">
|
|
|
|
|
</div>
|
|
|
|
|
<span>temp2</span>
|
|
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="images">
|
|
|
|
|
<div class="image" onclick="changePicture(0);displayModal(true);">
|
|
|
|
|
<img src="_thumbnails/2018-03-31 16.48.28.jpg" alt="2018-03-31 16.48.28.jpg" class="image">
|
|
|
|
|
<span class="image">2018-03-31 16.48.28.jpg</span>
|
|
|
|
|
<div class="container-xl">
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0">
|
|
|
|
|
<a href="temp2">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/temp2/2018-10-14 15.59.20.jpg" alt="diipadaapa">
|
|
|
|
|
</a>
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">temp2</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(0);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2018-03-31 16.48.28.jpg" alt="2018-03-31 16.48.28.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2018-03-31 16.48.28.jpg</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(1);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2018-07-16 17.28.12 -000.jpg" alt="2018-03-31 16.48.28.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2018-07-16 17.28.12 -000.jpg</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(2);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2018-11-10 12.36.05.jpg" alt="2018-11-10 16.48.28.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2018-07-16 17.28.12 -000.jpg</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(3);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2016-05-01 18.20.21.jpg" alt="2016-05-01 18.20.21.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2016-05-01 18.20.21</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(0);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2018-03-31 16.48.28.jpg" alt="2018-03-31 16.48.28.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2018-03-31 16.48.28.jpg</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(1);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2018-07-16 17.28.12 -000.jpg" alt="2018-03-31 16.48.28.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2018-07-16 17.28.12 -000.jpg</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(2);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2018-11-10 12.36.05.jpg" alt="2018-11-10 16.48.28.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2018-07-16 17.28.12 -000.jpg</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(3);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2016-05-01 18.20.21.jpg" alt="2016-05-01 18.20.21.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2016-05-01 18.20.21</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(0);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2018-03-31 16.48.28.jpg" alt="2018-03-31 16.48.28.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2018-03-31 16.48.28.jpg</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="image" onclick="changePicture(1);displayModal(true);">
|
|
|
|
|
<img src="_thumbnails/2018-07-16 17.28.12 -000.jpg" alt="2018-03-31 16.48.28.jpg" class="image">
|
|
|
|
|
<span class="image">2018-07-16 17.28.12 -000.jpg</span>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(1);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2018-07-16 17.28.12 -000.jpg" alt="2018-03-31 16.48.28.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2018-07-16 17.28.12 -000.jpg</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="image" onclick="changePicture(2);displayModal(true);">
|
|
|
|
|
<img src="_thumbnails/2018-11-10 12.36.05.jpg" alt="2018-11-10 16.48.28.jpg" class="image">
|
|
|
|
|
<span class="image">2018-07-16 17.28.12 -000.jpg</span>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(2);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2018-11-10 12.36.05.jpg" alt="2018-11-10 16.48.28.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2018-07-16 17.28.12 -000.jpg</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-2 d-inline-block box border border-gray box-shadow m-3 p-0" onclick="changePicture(3);displayModal(true);">
|
|
|
|
|
<img class="width-fit" src="_thumbnails/2016-05-01 18.20.21.jpg" alt="2016-05-01 18.20.21.jpg">
|
|
|
|
|
<span class="width-fit css-truncate css-truncate-target p-1">2016-05-01 18.20.21</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- TODO make modal navigation way smaller and nicer looking -->
|
|
|
|
|
<div id="modal">
|
|
|
|
|
<div class="bg-gray v-hidden p-3" id="modal">
|
|
|
|
|
<div class="modalClose" onclick="displayModal(false);">
|
|
|
|
|
<svg width="100" height="100">
|
|
|
|
|
<polygon points="15,25 25,15 50,40 75,15 85,25 60,50 85,75 75,85 50,60 25,85 15,75 40,50"
|
|
|
|
@ -53,7 +83,7 @@
|
|
|
|
|
<polygon points="10,50 70,10 70,90" style="fill:gray;" />
|
|
|
|
|
</svg>
|
|
|
|
|
</div>
|
|
|
|
|
<img id="modalPicture">
|
|
|
|
|
<img class="width-fit height-fit" id="modalPicture">
|
|
|
|
|
<div class="modalNext" onclick="nextPicture();">
|
|
|
|
|
<svg width="80" height="100">
|
|
|
|
|
<polygon points="70,50 10,10 10,90" style="fill:gray;" />
|
|
|
|
@ -74,15 +104,49 @@
|
|
|
|
|
thumbnail: "_thumbnails/2018-11-10 12.36.05.jpg",
|
|
|
|
|
fullsize: "_pictures/2018-11-10 12.36.05.jpg",
|
|
|
|
|
original: "_original/2018-11-10 12.36.05.jpg"
|
|
|
|
|
}, {
|
|
|
|
|
thumbnail: "_thumbnails/2016-05-01 18.20.21.jpg",
|
|
|
|
|
fullsize: "_pictures/2016-05-01 18.20.21.jpg",
|
|
|
|
|
original: "_original/2016-05-01 18.20.21.jpg"
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
|
|
// global variable maintains currently shown picture
|
|
|
|
|
var currentPicture
|
|
|
|
|
|
|
|
|
|
// create hover effect shadow for all box elements
|
|
|
|
|
const hoverOnBox = (event) => {
|
|
|
|
|
event.target.classList.remove("box-shadow")
|
|
|
|
|
event.target.classList.add("box-shadow-large")
|
|
|
|
|
event.target.classList.add("border-gray-dark")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const hoverOffBox = (event) => {
|
|
|
|
|
event.target.classList.remove("border-gray-dark")
|
|
|
|
|
event.target.classList.remove("box-shadow-large")
|
|
|
|
|
event.target.classList.add("box-shadow")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const registerBoxEventHandlers = (element) => {
|
|
|
|
|
element.addEventListener("mouseenter", hoverOnBox)
|
|
|
|
|
element.addEventListener("mouseleave", hoverOffBox)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var boxes = document.getElementsByClassName("box")
|
|
|
|
|
for (let box of boxes) {
|
|
|
|
|
registerBoxEventHandlers(box)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// create hover effect for modal navigation elements
|
|
|
|
|
// const hoverOnNav = (event) => {}
|
|
|
|
|
|
|
|
|
|
// logic to show and hide picture modal
|
|
|
|
|
const displayModal = (display) => {
|
|
|
|
|
if (display) {
|
|
|
|
|
document.getElementById("modal").style.display = "flex"
|
|
|
|
|
document.getElementById("modal").classList.remove("v-hidden")
|
|
|
|
|
document.getElementById("modal").classList.add("v-visible")
|
|
|
|
|
} else {
|
|
|
|
|
document.getElementById("modal").style.display = "none"
|
|
|
|
|
document.getElementById("modal").classList.add("v-hidden")
|
|
|
|
|
document.getElementById("modal").classList.remove("v-visible")
|
|
|
|
|
window.location.hash = ""
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -90,6 +154,7 @@
|
|
|
|
|
// TODO add swipe support https://stackoverflow.com/questions/2264072/detect-a-finger-swipe-through-javascript-on-the-iphone-and-android
|
|
|
|
|
// TODO add arrow key navigation support
|
|
|
|
|
|
|
|
|
|
// modal previous and next picture button logic
|
|
|
|
|
const prevPicture = () => {
|
|
|
|
|
if (!isNaN(currentPicture)) {
|
|
|
|
|
if (currentPicture === 0) {
|
|
|
|
@ -126,6 +191,7 @@
|
|
|
|
|
currentPicture = number
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if URL links directly to thumbnail via hash link, open modal for that pic on page load
|
|
|
|
|
const hashNavigate = () => {
|
|
|
|
|
if (window.location.hash) {
|
|
|
|
|
const thumbnail = decodeURIComponent(window.location.hash.substring(1))
|
|
|
|
|