externalise header - add support for image
This commit is contained in:
parent
646ca39aaf
commit
cc4b6388fd
5 changed files with 11 additions and 25 deletions
|
@ -11,12 +11,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="bg-primary">
|
{% include 'extras/header.html' with context %}
|
||||||
<div class="container text-center text-uppercase">
|
|
||||||
<h1 class="section-heading uppercase">{{ article.title }}</h1>
|
|
||||||
<hr class="light">
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section>
|
<section>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{ article.content }}
|
{{ article.content }}
|
||||||
|
|
|
@ -11,16 +11,11 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="bg-primary">
|
{% include 'extras/header.html' with context %}
|
||||||
<div class="container text-center text-uppercase">
|
|
||||||
<h1 class="section-heading uppercase">{{ article.title }}</h1>
|
|
||||||
<hr class="light">
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section>
|
<section>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<p class="text-right small">
|
<p class="text-right small">
|
||||||
Published: {{ article.date|datetime }}
|
Published: {{ article.date|datetime }}
|
||||||
</p>
|
</p>
|
||||||
{{ article.content }}
|
{{ article.content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
6
theme/templates/extras/header.html
Normal file
6
theme/templates/extras/header.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<section id="header" class="bg-primary image" data-image="{{ article.image if article else page.image }}">
|
||||||
|
<div class="container text-center text-uppercase">
|
||||||
|
<h1 class="section-heading">{{ article.title if article else page.title }}</h1>
|
||||||
|
<hr class="light">
|
||||||
|
</div>
|
||||||
|
</section>
|
|
@ -12,12 +12,7 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if not page.no_container %}
|
{% if not page.no_container %}
|
||||||
<section class="bg-primary">
|
{% include 'extras/header.html' with context %}
|
||||||
<div class="container text-center text-uppercase">
|
|
||||||
<h1 class="section-heading uppercase">{{ page.title }}</h1>
|
|
||||||
<hr class="light">
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section>
|
<section>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{ page.content }}
|
{{ page.content }}
|
||||||
|
|
|
@ -11,12 +11,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="bg-primary">
|
{% include 'extras/header.html' with context %}
|
||||||
<div class="container text-center text-uppercase">
|
|
||||||
<h1 class="section-heading uppercase">{{ article.title }}</h1>
|
|
||||||
<hr class="light">
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section>
|
<section>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<p class="text-right small">
|
<p class="text-right small">
|
||||||
|
|
Reference in a new issue