news includes

This commit is contained in:
Parker Moore 2013-05-12 14:40:02 +02:00
parent 49ca6d4484
commit 4687b1f010
4 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,18 @@
<div class="unit one-fifth hide-on-mobiles">
<aside>
<h4>General</h4>
<ul>
<li class="{% if page.title == 'News' %}current{% endif %}">
<a href="/news/">News Listing</a>
</li>
</ul>
<h4>All Posts</h4>
<ul>
{% for post in site.posts %}
<li class="{% if page.title == post.title %}current{% endif %}">
<a href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
</aside>
</div>

View File

@ -0,0 +1,11 @@
<div class="docs-nav-mobile unit whole show-on-mobiles">
<select onchange="if (this.value) window.location.href=this.value">
<option value="">Navigate the blog…</option>
<option value="/news/">Home</option>
<optgroup label="v1.x">
{% for post in site.posts %}
<option value="{{ post.url }}">{{ post.title }}</option>
{% endfor %}
</optgroup>
</select>
</div>

View File

@ -0,0 +1,7 @@
<h2 class="center-on-mobiles"><a href="{{ post.url }}">{{ post.title }}</a></h2>
<p class="post-content">
{{ post.content }}
</p>
<p class="post-details">
Posted on {{ post.date | date_to_string }} by @{{ post.author }}, filed in {{ post.categories | array_to_sentence_string }}
</p>

22
site/_layouts/news.html Normal file
View File

@ -0,0 +1,22 @@
---
layout: default
---
<section class="docs news">
<div class="grid">
{% include news_contents_mobile.html %}
<div class="unit four-fifths">
<article class="news-listing">
<h1>{{ page.title }}</h1>
{{ content }}
</article>
</div>
{% include news_contents.html %}
<div class="clear"></div>
</div>
</section>