Skip to content
Snippets Groups Projects
Commit 31b98993 authored by Thomas Schneider's avatar Thomas Schneider
Browse files

examples: Split templates into layout and extensions

parent 795ff1e1
No related branches found
No related tags found
No related merge requests found
<!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>
{%- 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 %}
<!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>
{%- 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 %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment