diff --git a/pyconbalkan/core/static/css/components/page.css b/pyconbalkan/core/static/css/components/page.css index 5acc2b0e..b07832f6 100644 --- a/pyconbalkan/core/static/css/components/page.css +++ b/pyconbalkan/core/static/css/components/page.css @@ -6,8 +6,9 @@ margin: 0 auto; grid-template-areas: ". logo ." - "menu menu menu" - "sidebar main main"; + "menu menu menu" + "sidebar main main" + ". footer ."; grid-template-rows: 240px 60px auto; grid-template-columns: 1fr 1fr 1fr; grid-gap: 20px; diff --git a/pyconbalkan/core/static/css/main.css b/pyconbalkan/core/static/css/main.css index d5829a57..6ffdc2d4 100644 --- a/pyconbalkan/core/static/css/main.css +++ b/pyconbalkan/core/static/css/main.css @@ -61,6 +61,7 @@ ul li { background-size: contain; background-repeat: no-repeat; background-position: center; + /*z-index: 1000;*/ } .coming-soon { @@ -83,6 +84,24 @@ ul li { overflow: hidden; } +footer { + grid-area: footer; + /*width: 100%;*/ +} + +#totop { + display: none; +} + +.hide { + opacity:0; + left:-100%; +} +.show { + opacity:1; + left:0; +} + #bgVideo { position: fixed; right: 0; diff --git a/pyconbalkan/core/static/js/go_to_top.js b/pyconbalkan/core/static/js/go_to_top.js index 808dff9d..af472074 100644 --- a/pyconbalkan/core/static/js/go_to_top.js +++ b/pyconbalkan/core/static/js/go_to_top.js @@ -1,4 +1,15 @@ function topFunction() { document.body.scrollTop = 0; document.documentElement.scrollTop = 0; -} \ No newline at end of file +} + +// When the user scrolls down 20px from the top of the document, show the button +window.onscroll = function() {scrollFunction()}; + +function scrollFunction() { + if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { + document.getElementById("totop").style.display = "inline-block"; + } else { + document.getElementById("totop").style.display = "none"; + } +} diff --git a/pyconbalkan/core/templates/base.html b/pyconbalkan/core/templates/base.html index b80280b3..c64dde21 100644 --- a/pyconbalkan/core/templates/base.html +++ b/pyconbalkan/core/templates/base.html @@ -83,9 +83,13 @@ {% block main_content %}{% endblock %} + {% include 'includes/footer.html' %} + - {% block scripts %}{% endblock %} + {% block scripts %} + + {% endblock %} diff --git a/pyconbalkan/core/templates/includes/event_sidebar.html b/pyconbalkan/core/templates/includes/event_sidebar.html index ec35b416..9a71b2cc 100644 --- a/pyconbalkan/core/templates/includes/event_sidebar.html +++ b/pyconbalkan/core/templates/includes/event_sidebar.html @@ -30,6 +30,6 @@

#{{ request.conference.number }}

Supported by

{% for sidebar_sponsor in sidebar_sponsors %} -
+
{% endfor %} diff --git a/pyconbalkan/core/templates/includes/footer.html b/pyconbalkan/core/templates/includes/footer.html new file mode 100644 index 00000000..0fd4caf1 --- /dev/null +++ b/pyconbalkan/core/templates/includes/footer.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/pyconbalkan/info/templates/info.html b/pyconbalkan/info/templates/info.html index 93b77140..d2940808 100644 --- a/pyconbalkan/info/templates/info.html +++ b/pyconbalkan/info/templates/info.html @@ -133,14 +133,7 @@

Nikola Tesla Museum

-
- Back to top -
{% endblock %} - -{% block scripts %} - -{% endblock %} diff --git a/pyconbalkan/speaker/templates/speakers.html b/pyconbalkan/speaker/templates/speakers.html index ac2d4c2d..67daacb5 100644 --- a/pyconbalkan/speaker/templates/speakers.html +++ b/pyconbalkan/speaker/templates/speakers.html @@ -44,6 +44,9 @@

{{ presentation.title }}

{% endfor %} +
+ Back to top +
{% else %}

Coming Soon