diff --git a/templates/index.html.j2 b/templates/index.html.j2 index 6b27f1b..28b8b8e 100644 --- a/templates/index.html.j2 +++ b/templates/index.html.j2 @@ -193,8 +193,6 @@ window.scrollTo({ top: 0, behavior: 'smooth' }) } - window.onload = function () { filter() }; - function updateImageList() { var str = "" var imagelist = document.getElementById("imagelist"); @@ -252,14 +250,24 @@ } }); updateImageList(); + } + + function onLoad() { + {%- if tags|length > 0 %} + filter(); + {%- else %} + shown = items; + updateImageList(); + {%- endif %} if (re.test(window.location.href)) { var pid = window.location.href.match(re)[1]; - console.log(pid); - console.log(shown); openSwipe(parseInt(pid)); } } + + window.onload = function () { onLoad() }; + {%- endif %} diff --git a/test/example/000041900001.jpg b/test/example/000041900001.jpg new file mode 100644 index 0000000..ce08f2d Binary files /dev/null and b/test/example/000041900001.jpg differ diff --git a/test/example/000041900001.jpg.xmp b/test/example/000041900001.jpg.xmp new file mode 100644 index 0000000..504eea4 --- /dev/null +++ b/test/example/000041900001.jpg.xmp @@ -0,0 +1,43 @@ + + + + + + + + + + + + + darktable + format + jpg + + + + + darktable|format|jpg + + + + + diff --git a/test/example/000041900001.tif b/test/example/000041900001.tif new file mode 100644 index 0000000..cf1d661 Binary files /dev/null and b/test/example/000041900001.tif differ