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 footer { // DUE TO OVERFLOW OF THE SIDE PANEL, TRY TO KEEP IT ON THE RIGHT

@ -2,7 +2,7 @@
{% from '_includes.html' import render_tags, render_pagination with context %} {% from '_includes.html' import render_tags, render_pagination with context %}
{% block content %} {% block content %}
<div class="important_subwrap"> <div class="important_subwrap">
<section class="side_panel"> <section class="side_panel">
{{ render_tags() }} {{ render_tags() }}
</section> </section>
@ -29,5 +29,5 @@
</div> </div>
{{ render_pagination('post.posts') }} {{ render_pagination('post.posts') }}
</section> </section>
</div> </div>
{% endblock content %} {% endblock content %}

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

@ -3,7 +3,7 @@
{% from "_formhelpers.html" import errors %} {% from "_formhelpers.html" import errors %}
{% block content %} {% block content %}
<div class="important_subwrap"> <div class="important_subwrap">
<section class="side_panel"> <section class="side_panel">
<article class="post_desc"> <article class="post_desc">
<!-- <h4>Description</h4> --> <!-- <h4>Description</h4> -->
@ -36,8 +36,8 @@
<img src="{{ post.url(path=post.image_url, endpoint='jpeg') }}" alt=""> <img src="{{ post.url(path=post.image_url, endpoint='jpeg') }}" alt="">
</div> </div>
</section> </section>
</div> </div>
<section class="comments"> <section class="comments">
<h3>Comments</h3> <h3>Comments</h3>
{{ render_comments() }} {{ render_comments() }}
@ -57,5 +57,5 @@
{% else %} {% else %}
<h4>To comment, please log in.</h3> <h4>To comment, please log in.</h3>
{% endif %} {% endif %}
</section> </section>
{% endblock content %} {% endblock content %}

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

@ -2,13 +2,18 @@
{% from "_formhelpers.html" import errors %} {% from "_formhelpers.html" import errors %}
{% block content %} {% block content %}
<h1>Log In</h1> <form action="" method="post">
<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 }} {{ form.csrf_token }}
<div> <div>
{{ form.email.label }} {{ form.email(size=32) }} {{ form.email(placeholder="Your email address") }}
{{ errors(form.email) }} {{ errors(form.email) }}
</div> </div>
<div>{{ form.submit() }}</div> <div>
</form> {{ form.submit() }}
</div>
</form>
{% endblock content %} {% endblock content %}

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