Implement cards the correct way. card-action outside of card-content

This commit is contained in:
Patrick Jentsch 2019-07-09 14:13:56 +02:00
parent b85c1e96a1
commit 3187cca1af
4 changed files with 50 additions and 45 deletions

View File

@ -2,10 +2,10 @@
{% block page_content %} {% block page_content %}
<div class="col s12"> <div class="col s12">
<div class="card large"> <h2>Change account information</h2>
<div class="card-content"> <div class="card">
<span class="card-title">Change account information</span> <form method="POST">
<form method="POST"> <div class="card-content">
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
<div class="input-field "> <div class="input-field ">
<i class="material-icons prefix">email</i> <i class="material-icons prefix">email</i>
@ -40,11 +40,11 @@
<span class="helper-text" style="color:red;">{{ error }}</span> <span class="helper-text" style="color:red;">{{ error }}</span>
{% endfor %} {% endfor %}
</div> </div>
<div class="card-action"> </div>
{{ form.submit(class='btn right') }} <div class="card-action right-align">
</div> {{ form.submit(class='btn') }}
</form> </div>
</div> </form>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -9,29 +9,34 @@
</div> </div>
<div class="card-content"> <div class="card-content">
<p>Sign in into an exisiting account or register a new one!</p> <p>Sign in into an exisiting account or register a new one!</p>
<br> </div>
<div class="card-action"> <div class="card-action">
<a class="btn" href="{{url_for('auth.register')}}">Register</a> <a class="btn" href="{{url_for('auth.register')}}">Register</a>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="col s12 m6"> <div class="col s12 m6">
<div class="card medium"> <div class="card medium">
<div class="card-content"> <form method="POST">
<span class="card-title">Log In</span> <div class="card-content">
<form method="POST"> <span class="card-title">Log In</span>
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
<div class="input-field"> <div class="input-field">
<i class="material-icons prefix">person</i> <i class="material-icons prefix">person</i>
{{ form.login(class='validate') }} {{ form.login(class='validate') }}
{{ form.login.label }} {{ form.login.label }}
{% for error in form.login.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
{% endfor %}
</div> </div>
<div class="input-field"> <div class="input-field">
<i class="material-icons prefix">vpn_key</i> <i class="material-icons prefix">vpn_key</i>
{{ form.password(class='validate') }} {{ form.password(class='validate') }}
{{ form.password.label }} {{ form.password.label }}
{% for error in form.password.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
{% endfor %}
</div> </div>
<div class="switch left"> <div class="switch left">
<label> <label>
@ -41,11 +46,11 @@
</label> </label>
</div> </div>
<a href="{{ url_for('auth.password_reset_request') }}" class="right">Forgot Password?</a> <a href="{{ url_for('auth.password_reset_request') }}" class="right">Forgot Password?</a>
<div class="card-action"> </div>
{{ form.submit(class='btn right') }} <div class="card-action">
</div> {{ form.submit(class='btn right') }}
</form> </div>
</div> </form>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -2,10 +2,10 @@
{% block page_content %} {% block page_content %}
<div class="col s12"> <div class="col s12">
<div class="card large"> <div class="card">
<div class="card-content"> <form method="POST">
<span class="card-title">Register</span> <div class="card-content">
<form method="POST"> <span class="card-title">Register</span>
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
<div class="input-field"> <div class="input-field">
<i class="material-icons prefix">account_circle</i> <i class="material-icons prefix">account_circle</i>
@ -39,11 +39,11 @@
<span class="helper-text" style="color:red;">{{ error }}</span> <span class="helper-text" style="color:red;">{{ error }}</span>
{% endfor %} {% endfor %}
</div> </div>
<div class="card-action"> </div>
{{ form.submit(class='btn right') }} <div class="card-action right-align">
</div> {{ form.submit(class='btn') }}
</form> </div>
</div> </form>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -2,18 +2,18 @@
{% block page_content %} {% block page_content %}
<div class="col s12 m8 offset-m2"> <div class="col s12 m8 offset-m2">
<div class="card small"> <div class="card">
<div class="card-content"> <form method="POST">
<span class="card-title">Reset Your Password</span> <div class="card-content">
<form method="POST"> <span class="card-title">Reset Your Password</span>
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
{% if form.email is defined %}
<div class="input-field"> <div class="input-field">
{{ form.email(class='validate', type='email') }} {{ form.email(class='validate', type='email') }}
{{ form.email.label }} {{ form.email.label }}
{% for error in form.email.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
{% endfor %}
</div> </div>
{% endif %}
{% if form.password is defined %}
<div class="input-field"> <div class="input-field">
{{ form.password(class='validate', type='password') }} {{ form.password(class='validate', type='password') }}
{{ form.password.label }} {{ form.password.label }}
@ -21,18 +21,18 @@
<span class="helper-text" style="color:red;">{{ error }}</span> <span class="helper-text" style="color:red;">{{ error }}</span>
{% endfor %} {% endfor %}
</div> </div>
{% endif %}
{% if form.password2 is defined %}
<div class="input-field"> <div class="input-field">
{{ form.password2(class='validate', type='password') }} {{ form.password2(class='validate', type='password') }}
{{ form.password2.label }} {{ form.password2.label }}
{% for error in form.password2.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
{% endfor %}
</div> </div>
{% endif %} </div>
<div class="card-action"> <div class="card-action">
{{ form.submit(class='btn right') }} {{ form.submit(class='btn right') }}
</div> </div>
</form> </form>
</div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}