src/templates_tornado/base.html
<!doctype html>
<html>
<head>
{% if page_title %}
<title>{{ page_title }}</title>
{% else %}
<title>{{ config.TITLE }}</title>
{% end %}
<meta charset="utf-8">
<script src="{{ static('js/main.js') }}"></script>
<link rel="stylesheet" href="{{ static('css/style.css') }}">
{% block head %}{% end %}
</head>
<body>
<div>
{% if req.current_user %}
<a href="{{ url_for('signout') }}">注销</a>
{% else %}
<a href="{{ url_for('signup') }}">注册</a>
<a href="{{ url_for('signin') }}">登录</a>
{% end %}
</div>
{% for msg in get_messages() %}
{% if msg.tag == 'success' %}
<div class="ui-green">
{{ msg.txt }}
</div>
{% elif msg.tag == 'error' %}
<div class="ui-red">
{{ msg.txt }}
</div>
{% end %}
{% end %}
{% block body %}{% end %}
{% block script %}{% end %}
</body>
</html>