python-gallery/templates/layout.html

59 lines
2.2 KiB
HTML
Raw Normal View History

2022-12-01 18:48:31 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gallery</title>
<link rel="stylesheet" href="{{url_for('static', filename='css/style.css')}}" defer>
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
</script>
<script src="https://unpkg.com/phosphor-icons" defer></script>
</head>
<body>
2022-12-19 15:07:41 +00:00
<nav id="navRoot">
2022-12-01 18:48:31 +00:00
<div>
<a href="{{ url_for('home') }}"><i class="ph-house-line"></i><span>Home</span></a>
<a href="{{ url_for('home') }}"><i class="ph-package"></i><span>Groups</span></a>
<a href="{{ url_for('home') }}"><i class="ph-upload"></i><span>Upload</span></a>
2022-12-01 18:48:31 +00:00
</div>
<div>
<a href="{{ url_for('home') }}"><i class="ph-user-circle"></i><span>Profile</span></a>
<a href="{{ url_for('home') }}"><i class="ph-gear"></i><span>Settings</span></a>
2022-12-01 18:48:31 +00:00
</div>
</nav>
<main>
{% block content %}
{% endblock %}
2022-12-19 21:15:56 +00:00
<i class="ph-arrow-circle-up" id="topButton"></i>
2022-12-01 18:48:31 +00:00
</main>
<script>
2022-12-19 15:07:41 +00:00
let navToggle = true;
2022-12-01 18:48:31 +00:00
document.onscroll = function() {
document.querySelector('header').style.opacity = `${1 - window.scrollY / 169}`;
2022-12-19 15:07:41 +00:00
document.querySelector('header img').style.cssText = `object-position: center ${window.scrollY / 2}px`;
2022-12-01 18:48:31 +00:00
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
document.querySelector('#topButton').style.opacity = 1;
2022-12-19 15:07:41 +00:00
document.querySelector('#topButton').style.right = "0.75rem";
2022-12-01 18:48:31 +00:00
} else {
document.querySelector('#topButton').style.opacity = 0;
document.querySelector('#topButton').style.right = "-3rem";
}
}
document.querySelector('#topButton').onclick = function() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
function imgFade(obj) {
2022-12-14 19:55:40 +00:00
$(obj).fadeIn(621);
2022-12-01 18:48:31 +00:00
}
</script>
</body>
</html>