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

@ -2,22 +2,25 @@
{% from "_formhelpers.html" import errors %}
{% block content %}
<h1>Log In</h1>
<form action="" method="post">
<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>
</form>
<a href="{{ url_for('auth.reset_password') }}">Forgoten password?</a>
<div>
{{ form.submit() }}
<a href="{{ url_for('auth.reset_password') }}">Forgotten password?</a>
</div>
</form>
{% endblock content %}

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

@ -2,25 +2,28 @@
{% from "_formhelpers.html" import errors %}
{% block content %}
<h1>Log In</h1>
<form action="" method="post">
<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>
</form>
<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">
<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>
</form>
<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">
<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>
@ -22,5 +22,5 @@
{{ errors(form.rating) }}
</div>
<div>{{ form.submit() }}</div>
</form>
</form>
{% endblock content %}
Loading…
Cancel
Save