Last active
January 20, 2021 04:13
-
-
Save merRen22/3cd0bb75cb02a7a1c165b4ac0f7fd248 to your computer and use it in GitHub Desktop.
Sample on how to use css with flask wtf componets (wtf.quick_form)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.btn { | |
display: block; | |
width: 100%; | |
position: relative; | |
} | |
.form-group { | |
text-align: start; | |
} | |
ul.checkList li::before { | |
content: "\2705"; | |
display: inline-block; | |
width: 5em; | |
margin-left: -3em; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html * { | |
font-family: "Bodoni MT"; | |
background-color: #F0F8FF; | |
} | |
ul { | |
text-align: start; | |
list-style: none; | |
} | |
img { | |
max-width: 30px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'base.html' %} | |
{% import 'macros.html' as macros %} | |
{% import 'bootstrap/wtf.html' as wtf %} | |
{% block head %} | |
{{ super() }} | |
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/login.css') }}"> | |
{% endblock %} | |
{% block title %} | |
{{ super() }} Bienvenido bandido | |
{% endblock %} | |
{% block content %} | |
{% if user_ip %} | |
<div class="container" style="text-align: center;"> | |
<div style="margin-block: 32px"> | |
<img | |
style="max-width: 50%; align-content: center" | |
src="{{ url_for('static',filename='images/party_boy_bart.jpg') }}" | |
> | |
</div> | |
<h1>Hola 👋 {{ user_ip }} bienvenido a PyTask</h1> | |
<h2>El mejor manejaro de tareas en la vía láctea 🌌</h2> | |
</br> | |
<div class="container col-lg-4 col-md-4 col-sm-6"> | |
<form | |
action="{{ url_for('hello') }}" | |
method="post"> | |
{{ wtf.quick_form(login_form, | |
button_map={'submit': 'btn btn-success'} | |
) }} | |
</form> | |
</div> | |
</br> | |
<div class="container col-lg-4 col-md-4 col-sm-6"> | |
<ul class="checkList"> | |
{% for todo in todos %} | |
{{ macros.render_todo(todo) }} | |
{% endfor %} | |
</ul> | |
</div> | |
</div> | |
{% else %} | |
<a href="{{ url_for('index') }}">Ir a inicio</a> | |
{% endif %} | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment