1
1
Fork 0

Better styles for forms, template indentation

dev
Jan Kužílek 5 years ago
parent cf21dc2917
commit 22e6b0db9e

@ -433,6 +433,27 @@ header {
}
}
}
form {
margin: 0 auto;
width: 300px;
//text-align: center;
padding: 5px;
input {
margin: 5px 0;
//font-size: 1em;
&:not([type=checkbox]):not([type=submit]):not([type=radio]):not([type=file]) {
width: 100%;
}
&[type=file] {
//display: none;
}
}
}
}
footer { // DUE TO OVERFLOW OF THE SIDE PANEL, TRY TO KEEP IT ON THE RIGHT

@ -2,22 +2,25 @@
{% from "_formhelpers.html" import errors %}
{% block content %}
<h1>Log In</h1>
<form action="" method="post">
<h2>Log In</h2>
{{ form.csrf_token }}
<div>
{{ form.username.label }} {{ form.username(size=32) }}
{{ form.username(placeholder="Username") }}
{{ errors(form.username) }}
</div>
<div>
{{ form.password.label }} {{ form.password(size=32) }}
{{ form.password(placeholder="Password") }}
{{ errors(form.password) }}
</div>
<div>
{{ form.remember_me() }} {{ form.remember_me.label }}
{{ errors(form.remember_me) }}
</div>
<div>{{ form.submit() }}</div>
<div>
{{ form.submit() }}
<a href="{{ url_for('auth.reset_password') }}">Forgotten password?</a>
</div>
</form>
<a href="{{ url_for('auth.reset_password') }}">Forgoten password?</a>
{% endblock content %}

@ -2,25 +2,28 @@
{% from "_formhelpers.html" import errors %}
{% block content %}
<h1>Log In</h1>
<form action="" method="post">
<h2>Sign Up</h2>
{{ form.csrf_token }}
<div>
{{ form.username.label }} {{ form.username(size=32) }}
{{ form.username(placeholder="Username") }}
{{ errors(form.username) }}
</div>
<div>
{{ form.email.label }} {{ form.email(size=32) }}
{{ form.email(placeholder="Email address") }}
{{ errors(form.email) }}
</div>
<div>
{{ form.password.label }} {{ form.password(size=32) }}
{{ form.password(placeholder="Password") }}
{{ errors(form.password) }}
</div>
<div>
{{ form.password_again.label }} {{ form.password_again(size=32) }}
{{ form.password_again(placeholder="Repeat password") }}
{{ errors(form.password_again) }}
</div>
<div>{{ form.submit() }}</div>
<div>
{{ form.submit() }}
<a href="{{ url_for('auth.login') }}">Already registered?</a>
</div>
</form>
{% endblock content %}

@ -2,13 +2,18 @@
{% from "_formhelpers.html" import errors %}
{% block content %}
<h1>Log In</h1>
<form action="" method="post">
<h2>Reset password</h2>
<p>
Please insert your email address and we will send you a request for password reset.
</p>
{{ form.csrf_token }}
<div>
{{ form.email.label }} {{ form.email(size=32) }}
{{ form.email(placeholder="Your email address") }}
{{ errors(form.email) }}
</div>
<div>{{ form.submit() }}</div>
<div>
{{ form.submit() }}
</div>
</form>
{% endblock content %}

@ -2,19 +2,19 @@
{% from "_formhelpers.html" import errors %}
{% block content %}
<h1>Upload image</h1>
<form action="" method="post" enctype="multipart/form-data">
<h2>Upload post</h2>
{{ form.csrf_token }}
<div>
{{ form.post_img.label }} {{ form.post_img() }}
{{ errors(form.post_img) }}
</div>
<div>
{{ form.sauce.label }} {{ form.sauce() }}
{{ form.sauce(placeholder="Source URL") }}
{{ errors(form.sauce) }}
</div>
<div>
{{ form.tags.label }} {{ form.tags() }}
{{ form.tags(placeholder="Tags") }}
{{ errors(form.tags) }}
</div>
<div>

Loading…
Cancel
Save