2023-07-17 13:13:09 +03:00
|
|
|
<!DOCTYPE html>
|
2023-07-17 13:03:51 +03:00
|
|
|
<html>
|
2023-07-17 13:14:05 +03:00
|
|
|
<head>
|
|
|
|
|
|
2023-07-17 13:13:09 +03:00
|
|
|
<meta charset="utf-8" />
|
2023-07-17 13:03:51 +03:00
|
|
|
|
2023-07-17 13:13:09 +03:00
|
|
|
<title>Grid n' View</title>
|
2023-07-17 13:03:51 +03:00
|
|
|
|
2023-08-15 16:57:21 +03:00
|
|
|
<link href="css/grid-n-view.css" rel="stylesheet"/>
|
|
|
|
|
|
2023-07-17 13:13:09 +03:00
|
|
|
<script src="grid-n-view.js"></script>
|
2023-07-17 13:03:51 +03:00
|
|
|
|
2023-07-17 13:13:09 +03:00
|
|
|
<style>
|
2023-08-18 02:58:23 +03:00
|
|
|
body.splash {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-17 13:03:51 +03:00
|
|
|
</style>
|
|
|
|
|
|
2023-07-17 13:13:09 +03:00
|
|
|
<script>
|
2023-08-03 09:52:15 +03:00
|
|
|
|
2023-08-03 09:56:41 +03:00
|
|
|
var SCROLL_TIMEOUT = 100
|
|
|
|
|
|
2023-08-03 09:52:15 +03:00
|
|
|
// save/restore scroll position...
|
2023-08-03 18:06:30 +03:00
|
|
|
// XXX might also be nice to restory current image and selection...
|
2023-08-03 09:56:41 +03:00
|
|
|
window.addEventListener('beforeunload', function(){
|
2023-08-03 09:52:15 +03:00
|
|
|
window.scrollX > 0 ?
|
|
|
|
|
(sessionStorage.windowScrollX = window.scrollX)
|
|
|
|
|
: (delete sessionStorage.windowScrollX)
|
2023-08-03 09:56:41 +03:00
|
|
|
sessionStorage.windowScrollY = window.scrollY })
|
2023-08-03 09:52:15 +03:00
|
|
|
var restoreScroll = function(){
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
sessionStorage.windowScrollY
|
|
|
|
|
&& window.scroll(
|
|
|
|
|
(sessionStorage.windowScrollX ?? 0)*1,
|
2023-08-03 09:56:41 +03:00
|
|
|
sessionStorage.windowScrollY*1) }, SCROLL_TIMEOUT ?? 100) }
|
2023-08-03 09:52:15 +03:00
|
|
|
|
2023-08-18 02:58:23 +03:00
|
|
|
var pageSetup = function(){
|
|
|
|
|
setup()
|
|
|
|
|
restoreScroll()
|
|
|
|
|
document.body.classList.remove('splash') }
|
|
|
|
|
|
2023-07-17 13:03:51 +03:00
|
|
|
</script>
|
2023-07-17 13:13:09 +03:00
|
|
|
|
2023-07-17 13:14:05 +03:00
|
|
|
</head>
|
2023-08-18 02:58:23 +03:00
|
|
|
<body onload="pageSetup()" class="splash">
|
2023-07-17 13:03:51 +03:00
|
|
|
|
2023-08-13 13:03:16 +03:00
|
|
|
|
|
|
|
|
<h3>Keyboard controls</h3>
|
|
|
|
|
|
2023-08-12 01:46:35 +03:00
|
|
|
<pre>
|
|
|
|
|
Left / Reight - Previos / next image
|
|
|
|
|
Up / Down - Image above / below
|
|
|
|
|
Space - Mark image (also shift-click)
|
|
|
|
|
Ctrl-A - Mark all images
|
|
|
|
|
Ctrl-D - Unmark all images
|
|
|
|
|
Ctrl-I - Reverse image marks
|
|
|
|
|
Enter - Toggle lightbox
|
|
|
|
|
Esc - Close image info or lightbox
|
|
|
|
|
Delete - Toggle image / marked for deletion (toggle)
|
|
|
|
|
Shift-Delete - Delete marked image(s) or current if none are marked
|
|
|
|
|
|
2023-08-07 17:16:24 +03:00
|
|
|
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)
|
2023-08-13 00:23:13 +03:00
|
|
|
NOTE: the "basic actions" below are to be moved to the toolbar...
|
|
|
|
|
|
|
|
|
|
For more info see: <a href="./README.md">README.md</a>
|
2023-07-21 13:29:39 +03:00
|
|
|
</pre>
|
|
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
2023-08-18 23:06:38 +03:00
|
|
|
<h3>Settings and debug controls</h3>
|
2023-08-18 09:11:58 +03:00
|
|
|
|
2023-08-18 23:06:38 +03:00
|
|
|
<button onclick="document.body.classList.toggle('gallery-dark')">◐</button>
|
|
|
|
|
<!-- XXX scrollbar still obeys gallery... -->
|
|
|
|
|
<button onclick="document.body.classList.toggle('lightbox-dark')">◐ (lightbox)</button>
|
2023-08-18 09:11:58 +03:00
|
|
|
<button onclick="gallery.toolbar.movable()">toggle toolbar drag</button>
|
2023-08-18 17:54:17 +03:00
|
|
|
<button onclick="gallery.toggleLoading()">toggle loading screen</button>
|
2023-08-18 09:11:58 +03:00
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
2023-08-16 02:57:03 +03:00
|
|
|
<div class="gallery otter">
|
2023-08-13 14:26:13 +03:00
|
|
|
<!-- toolbar -->
|
2023-08-17 11:24:30 +03:00
|
|
|
<div class="toolbar-anchor">
|
2023-08-17 17:49:37 +03:00
|
|
|
<div class="toolbar fixed">
|
2023-08-17 11:24:30 +03:00
|
|
|
<button class="drag-handle" title="drag">drag_indicator</button>
|
|
|
|
|
<div>
|
|
|
|
|
<button onclick="gallery" title="upload">cloud_upload</button>
|
|
|
|
|
<button onclick="gallery" title="save">save</button>
|
|
|
|
|
</div>
|
|
|
|
|
<!--div>
|
|
|
|
|
<button onclick="gallery" title="save">contrast</button>
|
|
|
|
|
</div-->
|
|
|
|
|
<div>
|
|
|
|
|
<!--button onclick="gallery.details.show()" title="info">imagesmode<sec>label</sec></button-->
|
|
|
|
|
<button onclick="gallery.details.show()" title="edit">imagesmode<sec>edit</sec></button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<button onclick="gallery.toggleMark()" title="toggle mark current (space)">select</button>
|
|
|
|
|
<button onclick="gallery.markAll()" title="mark all (ctrl-a)">select<sec>select</sec></button>
|
|
|
|
|
<button onclick="gallery.unmarkAll()" title="unmark all (ctrl-d)">square<sec>square</sec></button>
|
|
|
|
|
<button onclick="gallery.markInverse()" title="reverse mark (ctrl-i)">select<sec>square</sec></button>
|
|
|
|
|
<button onclick="gallery.remove('marked')" title="remove marked">select<sec>close</sec></button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
2023-09-01 16:25:21 +03:00
|
|
|
<button onclick="gallery.crop('marked')" title="crop marked">select<sec>crossword</sec></button>
|
|
|
|
|
<button onclick="gallery.uncrop()" title="uncrop">select<sec>grid_on</sec></button>
|
2023-08-17 11:24:30 +03:00
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<button onclick="gallery.toggleQueueRemoval()" title="queue removal (del)">delete</button>
|
|
|
|
|
<button onclick="gallery.toggleQueueRemoval('marked')" title="toggle marked removal">delete<sec>select</sec></button>
|
|
|
|
|
<button onclick="gallery.removeQueued()" title="remove queued (shift-del)">delete<sec>close</sec></button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<button onclick="gallery.clear()" title="clear">close</button>
|
|
|
|
|
</div>
|
|
|
|
|
<button class="collapse" title="toggle toolbar (hold to make sticky)">keyboard_double_arrow_left</button>
|
2023-08-15 16:57:21 +03:00
|
|
|
</div>
|
2023-08-13 14:26:13 +03:00
|
|
|
</div>
|
2023-07-20 21:42:17 +03:00
|
|
|
<!-- gallery: content -->
|
|
|
|
|
<div class="images">
|
|
|
|
|
<img src="images/500px/1.JPG" caption="Caption text">
|
|
|
|
|
<img src="images/500px/2.JPG">
|
2023-08-02 12:48:47 +03:00
|
|
|
<img src="images/500px/3.JPG" class="marked">
|
2023-07-20 21:42:17 +03:00
|
|
|
<img src="images/500px/DSC08102.jpg">
|
|
|
|
|
<img src="images/500px/4.JPG">
|
|
|
|
|
<img src="images/500px/5.JPG">
|
2023-08-02 12:48:47 +03:00
|
|
|
<img src="images/500px/DSC08102.jpg" class="marked">
|
2023-07-20 21:42:17 +03:00
|
|
|
<img src="images/500px/6.JPG">
|
|
|
|
|
<img src="images/500px/DSC08102.jpg">
|
2023-08-02 17:36:20 +03:00
|
|
|
<img src="images/500px/2.JPG" class="marked">
|
2023-07-20 21:42:17 +03:00
|
|
|
<img src="images/500px/5.JPG">
|
|
|
|
|
</div>
|
2023-07-17 13:03:51 +03:00
|
|
|
<!-- lightbox -->
|
|
|
|
|
<div class="lightbox">
|
2023-08-10 20:40:00 +03:00
|
|
|
<!-- XXX not sure about draggable=.. here... -->
|
|
|
|
|
<img draggable="false">
|
2023-07-27 13:26:11 +03:00
|
|
|
<div class="buttons">
|
2023-08-03 16:40:59 +03:00
|
|
|
<div class="button prev"></div>
|
|
|
|
|
<div class="button next"></div>
|
2023-08-03 14:10:59 +03:00
|
|
|
<div class="button info"></div>
|
2023-07-27 13:26:11 +03:00
|
|
|
<div class="button fullscreen"></div>
|
|
|
|
|
<div class="button close"></div>
|
|
|
|
|
</div>
|
2023-07-17 13:03:51 +03:00
|
|
|
</div>
|
2023-08-02 19:01:34 +03:00
|
|
|
<!-- details -->
|
|
|
|
|
<div class="details">
|
2023-08-10 20:40:00 +03:00
|
|
|
<!-- XXX not sure about draggable=.. here... -->
|
|
|
|
|
<img draggable="false">
|
2023-08-02 19:01:34 +03:00
|
|
|
<div class="caption">
|
2023-08-03 14:10:59 +03:00
|
|
|
CAPTION
|
2023-08-02 19:01:34 +03:00
|
|
|
</div>
|
|
|
|
|
<div class="tags">
|
2023-08-03 14:10:59 +03:00
|
|
|
TAGS
|
2023-08-02 19:01:34 +03:00
|
|
|
</div>
|
2023-08-03 14:10:59 +03:00
|
|
|
<div class="metadata">
|
|
|
|
|
METADATA
|
2023-08-02 19:01:34 +03:00
|
|
|
</div>
|
|
|
|
|
<div class="buttons">
|
2023-08-03 14:10:59 +03:00
|
|
|
<div class="button prev"></div>
|
|
|
|
|
<div class="button next"></div>
|
2023-08-02 19:01:34 +03:00
|
|
|
<div class="button close"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-18 17:48:53 +03:00
|
|
|
<!-- loading screen -->
|
|
|
|
|
<div class="loading">
|
|
|
|
|
<div></div>
|
|
|
|
|
</div>
|
2023-07-17 13:03:51 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
<!-- vim:set ts=4 sw=4 : -->
|