Mercurial > hg > mgallery
changeset 168:ba02d12cb4be
Add "up" navigation button, to go back to the main gallery from image page.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 13 Mar 2018 13:28:56 +0200 |
parents | 605c891870fa |
children | f68d97717b9f |
files | basic.css mgallery.js mgallery.php |
diffstat | 3 files changed, 27 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/basic.css Thu Mar 01 14:31:55 2018 +0200 +++ b/basic.css Tue Mar 13 13:28:56 2018 +0200 @@ -75,7 +75,9 @@ right: 0; } -#pageInfoButton { +#pageInfoButton, #pageUpNaviButton { + display: block; + text-decoration: none; position: fixed; top: 0.25em; left: 0.25em; @@ -91,11 +93,16 @@ padding: 1em; } -#pageInfoButton:hover { +#pageInfoButton:hover, #pageUpNaviButton:hover { background: white; color: black; } +#pageUpNaviButton { + top: 0.25em; + left: 4em; +} + /* * Albums */ @@ -403,9 +410,20 @@ display: none; } - #pageInfoButton { + #pageInfoButton, #pageUpNaviButton { opacity: 0.5; font-size: 1.5em; + top: auto; + left: auto; + bottom: 0.5em; + } + + #pageInfoButton { + right: 0.5em; + } + + #pageUpNaviButton { + right: 3.5em; } } @@ -426,12 +444,7 @@ width: 40%; } - #pageInfoButton { - top: auto; - left: auto; - bottom: 0.5em; - right: 0.5em; - + #pageInfoButton, #pageUpNaviButton { font-size: 2em; } }
--- a/mgallery.js Thu Mar 01 14:31:55 2018 +0200 +++ b/mgallery.js Tue Mar 13 13:28:56 2018 +0200 @@ -140,9 +140,11 @@ function mgalDisplayInfo(mvstate) { var mvbut = document.getElementById("pageInfoButton"); + var mvnbut = document.getElementById("pageUpNaviButton"); var mvelem = document.getElementById("pageInfoHeader"); - mvelem.style.display = mvstate ? "block" : "none"; - mvbut.style.display = !mvstate ? "block" : "none"; + mvelem.style.display = mvstate ? "block" : "none"; + mvbut.style.display = !mvstate ? "block" : "none"; + mvnbut.style.display = !mvstate ? "block" : "none"; mvInfoOpen = mvstate; }
--- a/mgallery.php Thu Mar 01 14:31:55 2018 +0200 +++ b/mgallery.php Tue Mar 13 13:28:56 2018 +0200 @@ -573,6 +573,7 @@ echo mgGetPageInfoHeaderEnd()."\n". "<div id=\"pageInfoButton\">_</div>\n". + "<a id=\"pageUpNaviButton\" href=\"".mgGetURL($galData["path"], FALSE)."\">^</a>\n". "<div id=\"imageCBox\">\n". mgGetNaviControlImageBoxJS($galImagesIndex, $index, "prevBtm", -1)."\n". mgGetNaviControlImageBox($galImagesIndex, $index, "prev", -1)."\n".