gallery/grid-n-view.html

146 lines
3.5 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Grid n' View</title>
<link rel="stylesheet" href="css/grid-n-view.css" />
<script src="grid-n-view.js"></script>
<style>
/* fade-in body... */
body {
animation: fadeInAnimation ease 1s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}
@keyframes fadeInAnimation {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
</style>
<script>
// save/restore scroll position...
window.onbeforeunload = function(){
window.scrollX > 0 ?
(sessionStorage.windowScrollX = window.scrollX)
: (delete sessionStorage.windowScrollX)
sessionStorage.windowScrollY = window.scrollY }
var restoreScroll = function(){
setTimeout(function(){
sessionStorage.windowScrollY
&& window.scroll(
(sessionStorage.windowScrollX ?? 0)*1,
sessionStorage.windowScrollY*1) }, 100) }
</script>
</head>
<body onload="setup(); restoreScroll()">
<h3>ToDo</h3>
<pre>
- Views:
- <s>Gallery</s>
- <b>Details</b>
- <s>Lightbox</s>
- toolbar
- select / deselect
- delete / clear deleted
- crop
- load
- Lightbox: indicators:
- start/end (a-la ImageGrid.Viewer??)
- next/prev
- <s>count</s>
- <s>selection</s>
- <s>Gallery: Adaptable image justification in grid</s>
- <s>Make more accurate -- align right side to pixel...</s>
- Can we make this passive??? (i.e. CSS only... likely not as flexible...)
- <s>Gallery: Spacial navigation (up/down/left/right)</s>
- <b>auto focus image iff the gallery is visible</b>
- handle focus / tabindex (???)
- <s>option: .loop_images</s>
- <s>Up/Down: might be a good idea to select an image based on
longest border instead of closest center (current)...</s>
- Gallery: PageUp/PageDown, home/end + allow page navigation
- <b>Gallery: focus visible...</b>
- <s>Gallery/Lightbox: Selection of images (space / ctrl-a / ctrl-d / ctrl-i)</s>
- <s>Lightbox: show selection marker</s>
- <b>Gallery: constructor...</b>
Gallery([options])
Gallery(urls[, options])
Gallery(dom[, options])
Gallery(dom, urls[, options])
- <b>Gallery: view crop</b>
- open/change/close
- crop stack (a-la ImageGrid.Viewer)
- actions:
- "from selection"
- Gallery: drag-n-drop
- drop files/images
- drag to sort
- <s>Gallery: remove image</s>
- UI: mark images for deletion + delete marked
- <s>Gallery: serialize / deserialize</s>
- <s>Lightbox: navigation (keyboard / mouse)</s>
- <s>Lightbox: fullscreen mode</s>
- Gallery: element (???)
- Would be nice to retain the scroll position on refresh...
- ...
</pre>
<hr>
<div class="gallery">
<!-- gallery: content -->
<div class="images">
<img src="images/500px/1.JPG" caption="Caption text">
<img src="images/500px/2.JPG">
<img src="images/500px/3.JPG" class="marked">
<img src="images/500px/DSC08102.jpg">
<img src="images/500px/4.JPG">
<img src="images/500px/5.JPG">
<img src="images/500px/DSC08102.jpg" class="marked">
<img src="images/500px/6.JPG">
<img src="images/500px/DSC08102.jpg">
<img src="images/500px/2.JPG" class="marked">
<img src="images/500px/5.JPG">
</div>
<!-- lightbox -->
<div class="lightbox">
<img>
<div class="buttons">
<div class="button fullscreen"></div>
<div class="button close"></div>
</div>
</div>
<!-- details -->
<div class="details">
<img>
<div class="caption">
</div>
<div class="tags">
</div>
<div class="info">
</div>
<div class="buttons">
<div class="button fullscreen"></div>
<div class="button close"></div>
</div>
</div>
</div>
</body>
</html>
<!-- vim:set ts=4 sw=4 : -->