blog page (#8)

This commit is contained in:
czmj 2017-09-22 23:01:19 +01:00
parent a54c1912ff
commit 32f1d3d805
3 changed files with 54 additions and 5 deletions

View File

@ -10,11 +10,16 @@
<a href="#menu" class="menuToggle"><span>Menu</span></a> <a href="#menu" class="menuToggle"><span>Menu</span></a>
<div id="menu"> <div id="menu">
<ul> <ul>
{% for page in site.pages %} {% if page.layout == "default" %} {% for page in site.pages %}
<li><a href="{{ page.url | absolute_url }}">{{ page.title }}</a></li> {% if page.layout == "default" %}
{% endif %} {% endfor %} {% for page in site.pages %} {% if page.layout == "page" %} <li><a href="{{ page.url | absolute_url }}">{{ page.title }}</a></li>
<li><a href="{{ page.url | absolute_url }}">{{ page.title }}</a></li> {% endif %}
{% endif %} {% endfor %} {% endfor %}
{% for page in site.pages %}
{% if page.layout == "page" or page.layout == "spotlight" %}
<li><a href="{{ page.url | absolute_url }}">{{ page.title }}</a></li>
{% endif %}
{% endfor %}
</ul> </ul>
</div> </div>
</li> </li>

View File

@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<html>
{% include head.html %}
<body>
{% include header.html %}
<div id="main">
<header{% if page.image %} style="background-image: url('{% if site.featured-image-source %}{{ page.image | prepend: site.featured-image-source | absolute_url }}{% else %}{{ "" | absolute_url }}/assets/images/{{ page.image }}{% endif %}');"{% endif %}>
<h2>{{ page.title }}</h2>
<p>{{ page.description }}</p>
</header>
</div>
<section class="wrapper alt style2">
{% if page.tiles-source == 'posts' %}
{% assign items = site.posts %}
{% elsif page.tiles-source == 'pages' %}
{% assign items = site.pages %}
{% endif %}
{% for item in items limit:page.tiles-count %}
<section class="spotlight">
<div class="image">{% if item.image %}<img src="{% if site.featured-image-source %}{{ item.image | prepend: site.featured-image-source | absolute_url }}{% else %}{{ "" | absolute_url }}/assets/images/{{ item.image }}{% endif %}" alt="" />{% endif %}</div>
<div class="content">
<h2><a href="{{ item.url | relative_url }}" class="link">{{ item.title }}</a></h2>
<p>{{ item.description }}</p>
</div>
</section>
{% endfor %}
</section>
{% include footer.html %}
</body>
</html>

8
src/blog.md Normal file
View File

@ -0,0 +1,8 @@
---
layout: spotlight
title: Blog
tiles-source: posts
tiles-limit: 50
---
### Clients