initial commit

This commit is contained in:
hex
2025-05-19 20:13:39 -07:00
commit 11f14f5048
12 changed files with 1408 additions and 0 deletions

65
app/templates/base.html Normal file
View File

@@ -0,0 +1,65 @@
<!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 Twacker{% 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 Twacker</h1>
<nav>
<ul>
<li><a href="{{ url_for('main.index') }}">My Games</a></li>
<li><a href="{{ url_for('main.search_games') }}">Add New Game</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>