Ready for publish
This commit is contained in:
parent
99e222a4b5
commit
06e293b86a
9 changed files with 478 additions and 1 deletions
64
templates/base.html
Normal file
64
templates/base.html
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{# ``base.html`` is the template all our other templates derive from. While
|
||||
Flask-Bootstrap ships with its own base, it is good form to create a custom
|
||||
one for our app, as it allows customizing some aspects.
|
||||
|
||||
Deriving from bootstap/base.html gives us a basic page scaffoling.
|
||||
|
||||
You can find additional information about template inheritance at
|
||||
|
||||
http://jinja.pocoo.org/docs/templates/#template-inheritance
|
||||
#}
|
||||
{%- extends "bootstrap/base.html" %}
|
||||
|
||||
{# We also set a default title, usually because we might forget to set one.
|
||||
In our sample app, we will most likely just opt not to change it #}
|
||||
{% block title %}Tasmota SML Decoder{% endblock %}
|
||||
|
||||
{# While we are at it, we also enable fixes for legacy browsers. First we
|
||||
import the necessary macros: #}
|
||||
{% import "bootstrap/fixes.html" as fixes %}
|
||||
|
||||
{# Then, inside the head block, we apply these. To not replace the header,
|
||||
``super()`` is used: #}
|
||||
|
||||
{% block head %}
|
||||
{{super()}}
|
||||
|
||||
{#- Docs: http://pythonhosted.org/Flask-Bootstrap/macros.html#fixes
|
||||
The sample application already contains the required static files. #}
|
||||
{{fixes.ie8()}}
|
||||
{%- endblock %}
|
||||
|
||||
{# Adding our own CSS files is also done here. Check the documentation at
|
||||
http://pythonhosted.org/Flask-Bootstrap/basic-usage.html#available-blocks
|
||||
for an overview. #}
|
||||
{% block styles -%}
|
||||
{{super()}} {# do not forget to call super or Bootstrap's own stylesheets
|
||||
will disappear! #}
|
||||
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="{{url_for('static', filename='app.css')}}">
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{# Finally, round things out with navigation #}
|
||||
{% block navbar %}
|
||||
{{nav.frontend_top.render()}}
|
||||
{% endblock %}
|
||||
|
||||
{#
|
||||
{%- block content %}
|
||||
{{ super() }}
|
||||
{%- block footer %}
|
||||
<footer>© 2022 <a href="https://github.com/ixs/tasmota-sml-parser/">Andreas Thienemann</a></footer>
|
||||
{%- endblock footer %}
|
||||
{%- endblock content %}
|
||||
#}
|
||||
|
||||
|
||||
{%- block body %}
|
||||
{{ super() }}
|
||||
{%- block footer %}
|
||||
<footer>© 2022 <a href="https://github.com/ixs/tasmota-sml-parser/">Andreas Thienemann</a></footer>
|
||||
{%- endblock footer %}
|
||||
{%- endblock body %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue