164 lines
4.1 KiB
HTML
164 lines
4.1 KiB
HTML
<!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 2s;
|
|
animation-iteration-count: 1;
|
|
animation-fill-mode: forwards;
|
|
}
|
|
|
|
@keyframes fadeInAnimation {
|
|
0% {
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
|
|
var SCROLL_TIMEOUT = 100
|
|
|
|
// save/restore scroll position...
|
|
// XXX might also be nice to restory current image and selection...
|
|
window.addEventListener('beforeunload', 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) }, SCROLL_TIMEOUT ?? 100) }
|
|
|
|
</script>
|
|
|
|
</head>
|
|
<body onload="setup(); restoreScroll()">
|
|
|
|
<h3>ToDo</h3>
|
|
<pre>
|
|
- <s>Views: Gallery />Details / Lightbox</s>
|
|
- Details: populate fields
|
|
- toolbar -- floating over gallery
|
|
- lightbox (current)
|
|
- info (current)
|
|
- select / deselect (current / all)
|
|
- delete / clear deleted (current / all)
|
|
- crop
|
|
- load
|
|
- toolbar -- floating over image (gallery/lightbox/details/...)
|
|
- lightbox
|
|
- info
|
|
- select / deselect
|
|
- delete
|
|
- Lightbox: hover indicators:
|
|
- start/end (a-la ImageGrid.Viewer??)
|
|
- next/prev
|
|
- <s>count</s>
|
|
- <s>selection</s>
|
|
- <s>Gallery: Adaptable image justification in grid</s>
|
|
- <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"
|
|
- <s>Gallery: drag-n-drop</s>
|
|
- <s>drop files/images</s> -- add loading indicator
|
|
- <s>drag to sort</s>
|
|
- styling...
|
|
- <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 (???)
|
|
- <s>Would be nice to retain the scroll position on refresh...</s>
|
|
- ...
|
|
|
|
NOTE: if the grid behaves in an odd way on resize tweak PATCH_MARGIN value,
|
|
though this sould not be necessary.
|
|
(optimal range >1 and <3)
|
|
</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 prev"></div>
|
|
<div class="button next"></div>
|
|
<div class="button info"></div>
|
|
<div class="button fullscreen"></div>
|
|
<div class="button close"></div>
|
|
</div>
|
|
</div>
|
|
<!-- details -->
|
|
<div class="details">
|
|
<img>
|
|
<div class="caption">
|
|
CAPTION
|
|
</div>
|
|
<div class="tags">
|
|
TAGS
|
|
</div>
|
|
<div class="metadata">
|
|
METADATA
|
|
</div>
|
|
<div class="buttons">
|
|
<div class="button prev"></div>
|
|
<div class="button next"></div>
|
|
<div class="button close"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|
|
<!-- vim:set ts=4 sw=4 : -->
|