add YAML options before-content and after-content

This commit is contained in:
Dean Attali 2020-08-24 22:04:22 +00:00
parent d88e0468c2
commit fcddc9e561
7 changed files with 71 additions and 2 deletions

View file

@ -5,5 +5,21 @@ layout: base
<div class="intro-header"></div>
<div role="main" class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}">
{% if page.before-content %}
<div class="before-content">
{% for file in page.before-content %}
{% include {{ file }} %}
{% endfor %}
</div>
{% endif %}
{{ content }}
{% if page.after-content %}
<div class="after-content">
{% for file in page.after-content %}
{% include {{ file }} %}
{% endfor %}
</div>
{% endif %}
</div>

View file

@ -21,7 +21,23 @@ common-ext-js:
<body>
<div role="main" class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %} main-content">
{% if page.before-content %}
<div class="before-content">
{% for file in page.before-content %}
{% include {{ file }} %}
{% endfor %}
</div>
{% endif %}
{{ content }}
{% if page.after-content %}
<div class="after-content">
{% for file in page.after-content %}
{% include {{ file }} %}
{% endfor %}
</div>
{% endif %}
</div>
{% include footer-minimal.html %}

View file

@ -7,7 +7,24 @@ layout: base
<div class="{% if page.full-width %} container-fluid {% else %} container-md {% endif %}" role="main">
<div class="row">
<div class="{% if page.full-width %} col {% else %} col-xl-8 offset-xl-2 col-lg-10 offset-lg-1 {% endif %}">
{% if page.before-content %}
<div class="before-content">
{% for file in page.before-content %}
{% include {{ file }} %}
{% endfor %}
</div>
{% endif %}
{{ content }}
{% if page.after-content %}
<div class="after-content">
{% for file in page.after-content %}
{% include {{ file }} %}
{% endfor %}
</div>
{% endif %}
{% include comments.html %}
</div>
</div>

View file

@ -31,6 +31,14 @@ layout: base
</div>
{% endif %}
{% if page.before-content %}
<div class="before-content">
{% for file in page.before-content %}
{% include {{ file }} %}
{% endfor %}
</div>
{% endif %}
<article role="main" class="blog-post">
{{ content }}
</article>
@ -44,6 +52,14 @@ layout: base
</div>
{% endif %}
{% if page.after-content %}
<div class="after-content">
{% for file in page.after-content %}
{% include {{ file }} %}
{% endfor %}
</div>
{% endif %}
{% if page.social-share %}
{% include social-share.html %}
{% endif %}