{% extends 'uk-base.html' %}

{% block title %} Register {% endblock %}

{% block content %}

    <div class="uk-width-medium-1-2 uk-width-small-1-1">
        <h3 class="uk-text-center uk-margin-top">欢迎注册！</h3>
        <form class="uk-form uk-form-stacked" id="vm-form" v-on:submit.prevent="submit">
            <div class="uk-alert uk-alert-danger" hidden="hidden" v-text="message"></div>
            <div class="uk-form-row">
                <label class="uk-form-label uk-hidden-small">名字:</label>
                <div class="uk-form-controls">
                    <input class="uk-form-width-large" type="text" placeholder="输入名字" maxlength="50" v-model="name">
                </div>
            </div>
            <div class="uk-form-row">
                <label class="uk-form-label uk-hidden-small">电子邮件:</label>
                <div class="uk-form-controls">
                    <input class="uk-form-width-large" type="text" placeholder="your-name@example.com" maxlength="50" v-model="email">
                </div>
            </div>
            <div class="uk-form-row">
                <label class="uk-form-label uk-hidden-small">输入口令:</label>
                <div class="uk-form-controls">
                    <input class="uk-form-width-large" type="password" placeholder="输入口令" maxlength="50" v-model="password">
                </div>
            </div>
            <div class="uk-form-row">
                <label class="uk-form-label uk-hidden-small">重复口令:</label>
                <div class="uk-form-controls">
                    <input class="uk-form-width-large" type="password" placeholder="重复口令" maxlength="50" v-model="password2">
                </div>
            </div>
            <div class="uk-form-row">
                <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-user"></i> 注册</button>
            </div>
        </form>
    </div>

{% endblock %}

{% block script %}
<script src="/static/js/vue.min.js"></script>
<script src="/static/js/sha1.min.js"></script>
<script src="/static/js/register.js"></script>
{% endblock %}