2021-09-18 18:15:33 +00:00
< style >
.btn-dead:hover, .active.btn-dead:hover, .active.btn-dead {
border: 1px solid var(--primary)!important;
}
< / style >
2021-09-25 21:13:52 +00:00
< script >
// Mobile bottom navigation bar
window.onload = function () {
var prevScrollpos = window.pageYOffset;
window.onscroll = function () {
var currentScrollPos = window.pageYOffset;
var topBar = document.getElementById("fixed-bar-mobile");
var bottomBar = document.getElementById("mobile-bottom-navigation-bar");
var dropdown = document.getElementById("mobileSortDropdown");
var navbar = document.getElementById("navbar");
if (bottomBar != null) {
if (prevScrollpos > currentScrollPos & & (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 65)) {
bottomBar.style.bottom = "0px";
}
else if (currentScrollPos < = 125 & & (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 65)) {
bottomBar.style.bottom = "0px";
}
else if (prevScrollpos > currentScrollPos & & (window.innerHeight + currentScrollPos) >= (document.body.offsetHeight - 65)) {
bottomBar.style.bottom = "-50px";
}
else {
bottomBar.style.bottom = "-50px";
}
}
// Execute if bottomBar exists
if (topBar != null & & dropdown != null) {
if (prevScrollpos > currentScrollPos) {
topBar.style.top = "48px";
navbar.classList.remove("shadow");
}
else if (currentScrollPos < = 125) {
topBar.style.top = "48px";
navbar.classList.remove("shadow");
}
else {
topBar.style.top = "-48px";
dropdown.classList.remove('show');
navbar.classList.add("shadow");
}
}
prevScrollpos = currentScrollPos;
}
}
< / script >
2021-07-21 01:12:26 +00:00
< div class = "container d-inline-flex d-lg-none" >
< div class = "row fixed-bottom bg-white border-top p-2" id = "mobile-bottom-navigation-bar"
style="z-index: 100; bottom: 0px; transition: bottom cubic-bezier(0, 0, 0.2, 1) 220ms;">
2021-09-20 13:11:10 +00:00
< button type = "button" class = "col px-0 ml-3 btn btn-dead m-0" style = "background: None !important; border: None;" >
2021-07-21 01:12:26 +00:00
< a href = "/" class = "text-decoration-none" role = "button" >
< div class = "text-center {% if request.path=='/' and request.full_path!='/?sort=hot&t=all' and request.full_path!='/?sort=new&t=all' %}text-purple{% else %}text-muted{% endif %}" >
< i class = "fas fa-home-alt text-lg d-block" > < / i >
< div class = "text-small" > Home< / div >
< / div >
< / a >
< / button >
{% if v and v.defaultsorting == 'new' %}
2021-09-08 19:08:09 +00:00
< button type = "button" class = "col px-0 btn btn-dead m-0" style = "background: None !important; border: None;" >
2021-07-21 01:12:26 +00:00
< a href = "/?sort=hot&t=all" class = "text-decoration-none" role = "button" >
< div class = "text-center {% if request.full_path=='/?sort=hot&t=all' %}text-purple{% else %}text-muted{% endif %}" >
< i class = "fas fa-fire text-lg d-block" > < / i >
< div class = "text-small" > Hot< / div >
< / div >
< / a >
< / button >
{% else %}
2021-09-08 19:08:09 +00:00
< button type = "button" class = "col px-0 btn btn-dead m-0" style = "background: None !important; border: None;" >
2021-07-21 01:12:26 +00:00
< a href = "/?sort=new&t=all" class = "text-decoration-none" role = "button" >
< div class = "text-center {% if request.full_path=='/?sort=new&t=all' %}text-purple{% else %}text-muted{% endif %}" >
< i class = "fas fa-sparkles text-lg d-block" > < / i >
< div class = "text-small" > New< / div >
< / div >
< / a >
< / button >
{% endif %}
2021-09-08 19:08:09 +00:00
< button type = "button" class = "col px-2 btn btn-dead m-0" style = "background: None !important; border: None;" >
2021-07-21 01:12:26 +00:00
< a href = "/comments" class = "text-decoration-none" role = "button" >
< div class = "text-center {% if request.path=='/comments' %}text-purple{% else %}text-muted{% endif %}" >
< i class = "fas fa-comment-dots text-lg d-block" > < / i >
< div class = "text-small" > Comments< / div >
< / div >
< / a >
< / button >
2021-09-08 19:08:09 +00:00
< button type = "button" class = "col px-0 btn btn-dead m-0" style = "background: None !important; border: None;" >
2021-07-21 01:12:26 +00:00
< a href = "/leaderboard" class = "text-decoration-none" role = "button" >
< div class = "text-center {% if request.path=='/leaderboard' %}text-purple{% else %}text-muted{% endif %}" >
< i class = "fas fa-trophy text-lg d-block" > < / i >
< div class = "text-small" > Users< / div >
< / div >
< / a >
< / button >
{% if v %}
2021-09-20 13:11:10 +00:00
< button type = "button" class = "col px-0 mr-3 btn btn-dead m-0" style = "background: None !important; border: None;" >
2021-07-27 00:05:58 +00:00
< a href = "{{v.url}}" class = "text-decoration-none" role = "button" >
< div class = "text-center {% if request.path==v.url %}text-purple{% else %}text-muted{% endif %}" >
2021-07-21 01:12:26 +00:00
< i class = "fas fa-user-circle text-lg d-block" > < / i >
< div class = "text-small" > Profile< / div >
< / div >
< / a >
< / button >
{% else %}
2021-09-20 13:11:10 +00:00
< button type = "button" class = "col px-0 mr-3 btn btn-dead m-0" style = "background: None !important; border: None;" >
2021-07-21 01:12:26 +00:00
< a href = "/signup" class = "text-decoration-none" role = "button" >
< div class = "text-center text-muted" >
< i class = "fas fa-user-plus text-lg d-block" > < / i >
< div class = "text-small" > Sign Up< / div >
< / div >
< / a >
< / button >
{% endif %}
< / div >
< / div >