diff --git a/static/main.js b/static/main.js index 606ae6e..89dbc4c 100644 --- a/static/main.js +++ b/static/main.js @@ -118,16 +118,16 @@ // Back to top button $(window).scroll(function () { if ($(this).scrollTop() > 100) { - $('.back-to-top').fadeIn('slow'); + $('#topbutton').fadeIn('slow'); } else { - $('.back-to-top').fadeOut('slow'); + $('#topbutton').fadeOut('slow'); } }); - $('.back-to-top').click(function () { + $('#topbutton').click(function () { $('html, body').animate({ scrollTop: 0 - }, 1500, 'easeInOutExpo'); + }, 1000, 'easeInOutExpo'); return false; }); diff --git a/static/style.css b/static/style.css index 7e5082a..bd2c936 100644 --- a/static/style.css +++ b/static/style.css @@ -4,7 +4,8 @@ body { font-family: "Open Sans", sans-serif; color: #444444; - + scroll-behavior: smooth; + box-sizing: border-box; } a { @@ -67,6 +68,33 @@ h6 { } } +/* Back to top button */ + +#topbutton +{ + position:fixed; + right:2%; + bottom:5%; + background-color:#2AB5E8; + border-radius: 50%; + color:#fff; + transition-duration: 0.4s; + transition-property:background-color,transform; + outline:none; + cursor:pointer; + display: none; + z-index: 1000; + +} + +#topbutton:hover{ +background-color:#1f7b9c; +transform: scale(1.2); +} + + +/**************************/ + .usernamelink{ font-weight: 600; pointer-events: none; diff --git a/templates/base.html b/templates/base.html index d859914..128f6f6 100644 --- a/templates/base.html +++ b/templates/base.html @@ -40,6 +40,17 @@ + + + + + + + + - +
@@ -103,7 +114,6 @@

{% endblock %} -
@@ -166,6 +176,8 @@

Contact Us

+ + diff --git a/templates/dashboard.html b/templates/dashboard.html index 8b39c13..96e42c4 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -22,6 +22,14 @@ + + + + +