{% extends "base.html" %}
{% block content %}
<h2 class="subtitle">
{% if user and user.is_authenticated %}
你好,{{ user.name }}!
{% else %}
你好,游客!
{% endif %}
</h2>
{% if user.isActivated %}
<a href="{{ url_for('main.chat') }}">
<button type="button" class="btn btn-primary">开始聊天</button>
</a>
<p class="text-warning">您的账号暂未激活,请等待管理员激活此账号。</p>
<a href="{{ url_for('auth.login') }}">
<button type="button" class="btn btn-primary">登录</button>
或
<a href="{{ url_for('auth.signup') }}">
<button type="button" class="btn btn-default">注册</button>
{% with messages = get_flashed_messages() %}
{% if messages %}<div class="notification is-danger">{{ messages[0] }}</div>{% endif %}
{% endwith %}
<div id="homepage-notice" class="row" style="margin-top: 100px;">
{% if homepage_notice %}
<h3 class="subtitle">公告栏</h3>
<pre>{{ homepage_notice }}</pre>
</div>
{% endblock content %}