KankenOnline/kanken_online/templates/base.html

46 lines
1.9 KiB
HTML
Raw Permalink Normal View History

2024-10-09 22:44:40 +00:00
<!DOCTYPE html>
<html lang="{{session['language'] or 'ja'}}">
2024-10-09 22:44:40 +00:00
<head>
2024-10-16 14:43:11 +00:00
<meta charset="UTF-8">
<title>{% block title %}{% endblock %} ・ {{ localize("kanken_online") }}</title>
2024-10-09 22:44:40 +00:00
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
2024-10-14 16:10:12 +00:00
{% if session %}
<link rel="stylesheet" href="{{ url_for('static', filename='dark_theme.css') if session['theme'] == 'dark' else url_for('static', filename='light_theme.css')}}">
{% else %}
<link rel="stylesheet" href="{{ url_for('static', filename='theme_select.css') }}"> <!-- Use CSS-based theme detection if no user login supplied -->
{% endif %}
{% block styles %}{% endblock %}
{% block scripts %}{% endblock %}
2024-10-09 22:44:40 +00:00
</head>
<body>
<nav>
<h1><a href="/">{{ localize("kanken_online") }}</a></h1>
2024-10-09 22:44:40 +00:00
<ul>
{% if g.user %}
2024-10-19 16:14:49 +00:00
<li><a href="{{ url_for('my_page') }}">{{ g.user['username'] }}</a>
2024-10-14 10:49:16 +00:00
<li><a href="{{ url_for('auth.logout') }}">{{ localize("log_out") }}</a>
2024-10-09 22:44:40 +00:00
{% else %}
2024-10-14 10:49:16 +00:00
<li><a href="{{ url_for('auth.register') }}">{{ localize("register") }}</a>
<li><a href="{{ url_for('auth.login') }}">{{ localize("log_in") }}</a>
2024-10-09 22:44:40 +00:00
{% endif %}
<li><a href="{{ url_for('options') }}">{{ localize("options") }}</a>
2024-10-14 15:25:09 +00:00
<li><a href="{{ url_for('about_page') }}">{{ localize("about") }}</a></li>
2024-10-14 15:34:31 +00:00
<li><a href="{{ url_for('indices.indices_page') }}">{{ localize("indices") }}</a></li>
2024-10-14 16:38:04 +00:00
<li><a href="{{ url_for('search.search_page') }}">{{ localize("search") }}</a></li>
2024-10-24 10:36:09 +00:00
<li><a href="{{ url_for('exam') }}">{{ localize("exam") }}</a></li>
2024-10-16 12:19:33 +00:00
<li><a href="{{ url_for('forum.index') }}">{{ localize("forum") }}</a></li>
<li><a href="{{ url_for('data_page') }}">{{ localize("data") }}</a></li>
2024-10-09 22:44:40 +00:00
</ul>
</nav>
<section class="content">
<header>
{% block header %}{% endblock %}
</header>
{% for message in get_flashed_messages() %}
2024-10-14 11:48:15 +00:00
<div class="flash">{{ localize(message) }}</div>
2024-10-09 22:44:40 +00:00
{% endfor %}
{% block content %}{% endblock %}
</section>
</body>
</html>