Files
game-tracker/app/templates/base.html
2025-05-19 21:09:50 -07:00

66 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Game Tracker{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet">
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
</head>
<body>
<header>
<div class="container">
<h1><i class="fas fa-gamepad"></i> Game Tracker</h1>
<nav>
<ul>
<li><a href="{{ url_for('main.index') }}">Home</a></li>
<li><a href="{{ url_for('main.admin_login') }}">Admin</a></li>
</ul>
</nav>
</div>
</header>
<main class="container">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="flashes">
{% for category, message in messages %}
<div class="flash flash-{{ category }}">{{ message }}</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</main>
<footer>
<div class="container">
<p>Game data provided by <a href="https://www.igdb.com/" target="_blank">IGDB</a></p>
<p>Made with <span class="heart"></span> UwU</p>
</div>
</footer>
<script>
// Close flash messages
document.addEventListener('DOMContentLoaded', function() {
const flashes = document.querySelectorAll('.flash');
flashes.forEach(flash => {
flash.addEventListener('click', function() {
this.style.display = 'none';
});
// Auto-hide after 5 seconds
setTimeout(() => {
flash.style.opacity = '0';
setTimeout(() => {
flash.style.display = 'none';
}, 500);
}, 5000);
});
});
</script>
</body>
</html>