init
This commit is contained in:
commit
5309e0593b
22 changed files with 722 additions and 0 deletions
blog/templates
30
blog/templates/layout.html
Normal file
30
blog/templates/layout.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Flask Blog</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
|
||||
</head>
|
||||
<body class="container">
|
||||
<header>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="/">Flask Blog</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
{% if not session.logged_in %}
|
||||
<li><a href="{{ url_for('login')}}">ログイン</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ url_for('new_entry')}}">新規投稿</a></li>
|
||||
<li><a href="{{ url_for('logout')}}">ログアウト</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
{% for message in get_flashed_messages() %}
|
||||
<p>{{ message }}</p>
|
||||
{% endfor %}
|
||||
<main>
|
||||
{% block body %}{% endblock %}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue