Compare commits

...

2 Commits

Author SHA1 Message Date
8d39956724 LocalStorage used for Explorer view 2022-08-04 14:15:51 +02:00
5ed5aff945 Better pagination view 2022-08-04 13:10:06 +02:00
3 changed files with 37 additions and 1 deletions

View File

@ -32,6 +32,7 @@ jQuery(document).ready(function($)
paramTag = (urlParams.get('tags') == null ? urlParams.getAll('tag') : urlParams.getAll('tags')); paramTag = (urlParams.get('tags') == null ? urlParams.getAll('tag') : urlParams.getAll('tags'));
paramPhoto = (urlParams.get('photos') == null ? urlParams.getAll('photo') : urlParams.getAll('photos')); paramPhoto = (urlParams.get('photos') == null ? urlParams.getAll('photo') : urlParams.getAll('photos'));
paramHelp = (urlParams.get('helps') == null ? urlParams.getAll('help') : urlParams.getAll('helps')); paramHelp = (urlParams.get('helps') == null ? urlParams.getAll('help') : urlParams.getAll('helps'));
paramView = (urlParams.get('view'));
params = { "year": paramYear, "month": paramMonth, "dimension": paramDimension, "genre": paramGenre, "theme": paramTheme, "place": paramPlace, "tag": paramTag, "photo": paramPhoto, "help": paramHelp } params = { "year": paramYear, "month": paramMonth, "dimension": paramDimension, "genre": paramGenre, "theme": paramTheme, "place": paramPlace, "tag": paramTag, "photo": paramPhoto, "help": paramHelp }
$.getJSON("data.json", function(data) $.getJSON("data.json", function(data)
@ -522,6 +523,35 @@ jQuery(document).ready(function($)
$("article.explorer p.result").css("display", "none"); $("article.explorer p.result").css("display", "none");
} }
function setGallery()
{
$("table").hide();
$("#gallery").show();
window.localStorage.setItem('explorer-view', 'gallery');
}
function setTable()
{
$("#gallery").hide();
$("table").show();
window.localStorage.setItem('explorer-view', 'table');
}
if (paramView == "gallery")
setGallery();
else if (paramView == "table")
setTable();
else
{
if (res)
{
explorerView = window.localStorage.getItem('explorer-view');
if (explorerView == "gallery")
setGallery();
else if (explorerView == "table")
setTable();
}
}
// fancybox configuration // fancybox configuration
$.getScript("scripts/fancybox.js", function() { $.getScript("scripts/fancybox.js", function() {

View File

@ -335,16 +335,17 @@ function userActionHandle(availableOptions)
} }
// change display: gallery/table // change display: gallery/table
$(".style-select.frame").click(function() $(".style-select.frame").click(function()
{ {
$("table").hide(); $("table").hide();
$("#gallery").show(); $("#gallery").show();
window.localStorage.setItem('explorer-view', 'gallery');
}); });
$(".style-select.list").click(function() $(".style-select.list").click(function()
{ {
$("#gallery").hide(); $("#gallery").hide();
$("table").show(); $("table").show();
window.localStorage.setItem('explorer-view', 'table');
}); });
} }

View File

@ -253,6 +253,11 @@ article.main .bio-img {
margin:auto; margin:auto;
} }
#pagination-sec {
margin-top: 1rem;
margin-bottom: 1.5rem;
}
/* Exposition */ /* Exposition */