Update photography.

This commit is contained in:
voussoir 2022-08-19 17:36:17 -07:00
parent 19046fbe2c
commit ec1ad0d393
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB
2 changed files with 23 additions and 2 deletions

View file

@ -40,6 +40,14 @@ body
margin-bottom: 0;
padding: 8px;
}
body.noscrollbar::-webkit-scrollbar
{
display: none;
}
body.noscrollbar
{
scrollbar-width: none;
}
header
{
@ -113,7 +121,8 @@ article .morelink
@media not all and (pointer: fine)
{
#keyboardhint
#keyboardhint,
#scrollbartoggle
{
display: none;
}

View file

@ -162,6 +162,7 @@ def write_directory_index(directory):
<body>
<header>
<div id="keyboardhint">hint: <kbd></kbd> / <kbd></kbd></div>
<a id="scrollbartoggle" onclick="return toggle_scrollbar();">scrollbar on/off</a>
{% if do_rss %}
<a href="/photography/photography.atom">Atom</a>
{% endif %}
@ -179,6 +180,17 @@ def write_directory_index(directory):
<script type="text/javascript">
let desired_scroll_position = null;
function toggle_scrollbar()
{
if (document.body.classList.contains("noscrollbar"))
{
document.body.classList.remove("noscrollbar");
}
else
{
document.body.classList.add("noscrollbar");
}
}
function get_center_img()
{
let center_x = window.innerWidth / 2;
@ -269,7 +281,7 @@ def write_directory_index(directory):
{
show_cursor();
clearTimeout(hide_cursor_timeout);
hide_cursor_timeout = setTimeout(hide_cursor, 5000);
hide_cursor_timeout = setTimeout(hide_cursor, 3000);
}
function on_pageload()
{