diff --git a/examples/templates/_layout.html.j2 b/examples/templates/_layout.html.j2 new file mode 100644 index 0000000000000000000000000000000000000000..ac9d804e549115b16ab459072291af19e6623c70 --- /dev/null +++ b/examples/templates/_layout.html.j2 @@ -0,0 +1,26 @@ +<!doctype html> +<html lang="{% block lang %}de{% endblock %}"> + <head> + <meta charset="UTF-8" /> + <link rel="stylesheet" href="{{ url_for('instance.static', filename='schild.css') }}" /> + </head> + + <body> + <main> + <header> + <h1 id="title">{% block title %}{% endblock %}</h1> + </header> + + {% block content %}{% endblock %} + </main> + <footer> + <div id="footer"> + {{ config['SCHILD_FOOTER'] }} + </div> + + <div id="logo"> + <img src="{{ url_for('instance.static', filename='geier.png') }}" /> + </div> + </footer> + </body> +</html> diff --git a/examples/templates/image-left.html.j2 b/examples/templates/image-left.html.j2 new file mode 100644 index 0000000000000000000000000000000000000000..aa4c93c9cd8fd7dc62caba8e24ce387864565473 --- /dev/null +++ b/examples/templates/image-left.html.j2 @@ -0,0 +1,14 @@ +{%- set description = "Bild links" -%} +{%- extends "instance:_layout.html.j2" -%} +{%- block title -%} + {{ schild.title|default("Überschrift") }} +{% endblock title %} +{%- block content -%} + <div class="container"> + <img id="image" src="{{ url_for('instance.static', + filename=schild.image) if schild.image else 'placeholder' }}" /> + <p id="text"> + {{ schild.text|default("Inhalt") }} + </p> + </div> +{% endblock content %} diff --git a/examples/templates/schild.html.j2 b/examples/templates/schild.html.j2 deleted file mode 100644 index 0573cc66234495c804efceb82abbba617fe7056d..0000000000000000000000000000000000000000 --- a/examples/templates/schild.html.j2 +++ /dev/null @@ -1,33 +0,0 @@ -<!doctype html> -<html lang="{{ lang|default('de') }}"> - <head> - <meta charset="UTF-8" /> - <link rel="stylesheet" href="{{ url_for('.static', filename='schild.css') }}" /> - </head> - - <body> - <main> - <header> - <h1 id="title">{{ schild.title }}</h1> - </header> - - <div{% if schild.image %} class="container"{% endif %}> - {% if schild.image %} - <img id="image" src="{{ url_for('.static', filename='img/' + schild.image) }}" /> - {% endif %} - <p id="text"> - {{ schild.text }} - </p> - </div> - </main> - <footer> - <div id="footer"> - {{ config['SCHILD_FOOTER'] }} - </div> - - <div id="logo"> - <img src="{{ url_for('.static', filename=config['SCHILD_LOGO']) }}" /> - </div> - </footer> - </body> -</html> diff --git a/examples/templates/text-only.html.j2 b/examples/templates/text-only.html.j2 new file mode 100644 index 0000000000000000000000000000000000000000..c65bf7634b9a7dfdc2cb6c3374696e3c35a4d3d9 --- /dev/null +++ b/examples/templates/text-only.html.j2 @@ -0,0 +1,12 @@ +{%- set description = "Nur Text, ohne Bild" -%} +{%- extends "instance:_layout.html.j2" -%} +{%- block title -%} + {{ schild.title|default("Überschrift") }} +{%- endblock title -%} +{%- block content -%} + <div> + <p id="text"> + {{ schild.text|default("Inhalt") }} + </p> + </div> +{% endblock content %}