Plankton_Detector/PlanktonDetector/templates/base.html

43 lines
1.4 KiB
HTML
Raw Normal View History

2023-12-06 18:12:31 +01:00
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{% static 'DetectionApp/css/base.css' %}">
{%block extracss%}{%endblock extracss%}
<title>Plankton Detector</title>
</head>
<body>
<div class="top-menu">
2023-12-13 02:11:29 +01:00
<a href="{% url 'posts' %}">Community</a>
2023-12-06 18:12:31 +01:00
<a href="{% url 'detect' %}">Predict</a>
{% if user.is_authenticated %}
2023-12-13 02:11:29 +01:00
<a href="{% url 'history' %}">History</a>
2023-12-06 18:12:31 +01:00
<a href="{% url 'logout' %}">Logout {{user}}</a>
{%else%}
<a href="{% url 'login' %}">Login</a>
{%endif%}
</div>
{%block content%}{%endblock content%}
<div class="footer">
<p>Footer</p>
</div>
2023-12-19 17:33:46 +01:00
<script>
var prevScrollpos = window.pageYOffset;
window.onscroll = function() {
var currentScrollPos = window.pageYOffset;
if (prevScrollpos > currentScrollPos) {
document.getElementsByClassName("top-menu").style.top = "0";
} else {
document.getElementsByClassName("top-menu").style.top = "-50px";
}
prevScrollpos = currentScrollPos;
}
</script>
2023-12-06 18:12:31 +01:00
</body>
</html>