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>

19
_layouts/news.html Normal file
View File

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

27
_layouts/news_item.html Normal file
View File

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

View File

@@ -0,0 +1,15 @@
---
layout: news_item
title: "ResInsight 1.0.0 Released"
date: "2013-05-06 02:12:52 +0200"
author:
version: 1.0.0
categories: [release]
---
Batch functionality
Faults
Vizualisation of NNCS

18
news/index.html Normal file
View File

@@ -0,0 +1,18 @@
---
layout: news
title: News
permalink: /news/
author: all
---
{% for post in site.posts %}
{% include news_item.html %}
{% endfor %}