_layouts/home.html in jekyll-theme-prologue-0.2.4 vs _layouts/home.html in jekyll-theme-prologue-0.2.5
- old
+ new
@@ -8,40 +8,44 @@
<html>
{% include head.html %}
<body>
-
+
{% include header.html %}
-
+
<!-- Main -->
<div id="main">
{% assign sections = site.sections | where_exp: 'section','section.order >= 1' %}
-
+
{% if page.permalink %}
<!-- This enables the 404 page, the only page that should
have a permalink declared in its frontmatter. -->
{% assign sections = sections | push: page %}
{% endif %}
-
+
{% unless sections == null %}
{% assign sections = sections | sort: 'order' %}
-
+
<!-- Sections -->
{% for section in sections %}
-
+
{% assign title = section.title | default: 'Untitled' %}
{% assign slug = section.title | slugify | default: 'untitled' %}
-
- {% if section.order == 1 %}
+
+ {% if section.cover-photo and section.cover-photo-alt %}
+ {% capture photo %}
+ <img src="{{ section.cover-photo | relative_url }}" alt="{{ section.cover-photo-alt }}" class="back">
+ {% endcapture %}
{% assign class = 'shade-one cover dark' %}
{% else %}
+ {% assign photo = '' %}
{% capture class %}
shade-{% cycle 'two', 'three', 'four', 'three' %}
{% endcapture %}
{% endif %}
-
+
{% if section.auto-header == 'none' %}
{% assign heading = "" %}
{% elsif section.auto-header == null or section.auto-header == 'use-title' %}
{% capture heading %}
<header>
@@ -53,18 +57,16 @@
<header>
<h2>{{ section.auto-header }}</h2>
</header>
{% endcapture %}
{% endif %}
-
- {% include section.html id=slug class=class heading=heading content=section.content %}
-
+ {% include section.html id=slug class=class photo=photo heading=heading content=section.content %}
{% endfor %}
-
+
{% endunless %}
</div>
-
+
{% include footer.html %}
-
+
</body>
- </html>
\ No newline at end of file
+ </html>