modified: app.py new file: templates/admin_dashboard.html.j2 new file: templates/base.html.j2 new file: templates/daily_leaderboard.html.j2 new file: templates/daily_puzzle.html.j2 new file: templates/home.html.j2 new file: templates/invite_admin.html.j2 new file: templates/king_of_the_mountain.html.j2 new file: templates/leaderboard_index.html.j2 new file: templates/login.html.j2 new file: templates/manage_admins.html.j2 new file: templates/profile.html.j2 new file: templates/puzzle_menu.html.j2 new file: templates/upload.html.j2 new file: templates/verify.html.j2
49 lines
1.8 KiB
Django/Jinja
49 lines
1.8 KiB
Django/Jinja
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>{% block title %}My Puzzle Game{% endblock %}</title>
|
|
<link href="https://unpkg.com/@picocss/pico@1.*/css/pico.min.css" rel="stylesheet">
|
|
<style>
|
|
/* Custom styles */
|
|
body { margin: 0; padding: 0; }
|
|
nav ul { list-style-type: none; padding: 0; display: flex; flex-wrap: wrap; }
|
|
nav ul li { margin-right: 10px; }
|
|
nav ul li a { text-decoration: none; }
|
|
@media (max-width: 600px) {
|
|
nav ul { flex-direction: column; }
|
|
nav ul li { margin-bottom: 10px; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<nav>
|
|
<ul>
|
|
{% if request.user and request.user.is_admin %}
|
|
<li><a href="{{ request.route_url('admin_dashboard') }}">Admin Dashboard</a></li>
|
|
{% endif %}
|
|
<li><a href="{{ request.route_url('home') }}">Home</a></li>
|
|
<li><a href="{{ request.route_url('puzzle_menu') }}">Today's Puzzles</a></li>
|
|
<li><a href="{{ request.route_url('leaderboard_index') }}">Leaderboards</a></li>
|
|
<li><a href="{{ request.route_url('king_of_the_mountain') }}">King of the Mountain</a></li>
|
|
{% if request.user %}
|
|
<li><a href="{{ request.route_url('profile') }}">Profile</a></li>
|
|
<li><a href="{{ request.route_url('logout') }}">Logout</a></li>
|
|
{% else %}
|
|
<li><a href="{{ request.route_url('login') }}">Login</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
|
|
{% if request.session.peek_flash() %}
|
|
{% for message in request.session.pop_flash() %}
|
|
<div class="alert">{{ message }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
<main class="container">
|
|
{% block content %}
|
|
<!-- Default content can go here, or leave blank -->
|
|
{% endblock %}
|
|
</main>
|
|
</body>
|
|
</html>
|