~hristoast/mousikofidi

5846ef054bc0c0fa509e5c0c77f97ffea49a28e7 — Hristos N. Triantafillou 1 year, 10 months ago 8d3ffb2
Fade up and down links in and out as needed

There's no need to show a "top link" when we're already at the top of
the page, same for the "bottom link" when we are at the bottom.
M mousikofidi/static/css/fidi.css => mousikofidi/static/css/fidi.css +3 -0
@@ 289,6 289,7 @@ div#bottom-link {
    border-right: 25px solid transparent;
    border-top: 25px solid grey;
    cursor: pointer;
    transition: opacity 0.5s;
}

div#top-link {


@@ 303,6 304,8 @@ div#top-link {
    border-right: 25px solid transparent;
    border-bottom: 25px solid grey;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.5s;
}

input#bulk-add {

M mousikofidi/static/js/player.js => mousikofidi/static/js/player.js +14 -0
@@ 1284,6 1284,20 @@ function FidiPlayerSetUp() {
        upArrow.addEventListener("click", function() {
            window.scrollTo({top: 0, behavior: 'smooth'});
        });

        window.onscroll = function() {
            if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
                downArrow.style.opacity = 0;
            } else if ((window.innerHeight + window.scrollY) <= document.body.offsetHeight) {
                downArrow.style.opacity = 1;
            }

            if (window.scrollY < 200) {
                upArrow.style.opacity = 0;
            } else if (window.scrollY > 200) {
                upArrow.style.opacity = 1;
            }
        };
    }

    if (document.getElementById("keyboard-controls-enabled"))

M mousikofidi/templates/top_link.html => mousikofidi/templates/top_link.html +1 -1
@@ 1,1 1,1 @@
<div{% if page_name == "Your Queue" %} class="hidden"{% endif %} id="top-link" title="Click this triangle to navigate back to the top of the current page without reloading it."></div>
<div id="top-link" title="Click this triangle to navigate back to the top of the current page without reloading it."></div>