Test of news

This commit is contained in:
Magne Sjaastad
2014-04-11 21:26:10 +02:00
parent 40cfa59820
commit 57d314e82b
7 changed files with 137 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<div class="unit one-fifth hide-on-mobiles">
<aside>
<ul>
<li class="{% if page.title == 'News' %}current{% endif %}">
<a href="{{ site.baseurl }}/news/">All News</a>
</li>
<li class="{% if page.title == 'Releases' %}current{% endif %}">
<a href="{{ site.baseurl }}/news/releases/">ResInsight Releases</a>
</li>
</ul>
<h4>Recent Releases</h4>
<ul>
{% for post in site.posts limit:5 %}
<li class="{% if page.title == post.title %}current{% endif %}">
<a href="{{ post.url }}">Version {{ post.version }}</a>
</li>
{% endfor %}
<li>
<a href="{{ site.baseurl }}/docs/history/">History »</a>
</li>
</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>

24
_includes/news_item.html Normal file
View File

@@ -0,0 +1,24 @@
<article>
<h2>
<a href="{{ post.url }}">
{{ post.title }}
</a>
</h2>
<span class="post-category">
<span class="label">
{{ post.categories | array_to_sentence_string }}
</span>
</span>
<div class="post-meta">
<span class="post-date">
{{ post.date | date_to_string }}
</span>
<a href="https://github.com/{{ post.author }}" class="post-author">
<img src="https://github.com/{{ post.author }}.png" class="avatar" alt="{{ post.author }}" width="24" height="24">
{{ post.author }}
</a>
</div>
<div class="post-content">
{{ post.content }}
</div>
</article>