make better room for news
This commit is contained in:
parent
06ccf8a100
commit
ddc4cd437d
3 changed files with 63 additions and 48 deletions
|
|
@ -53,46 +53,10 @@
|
|||
|
||||
{% break %} {% endif %} {% endfor %}
|
||||
<!-- end Up next-->
|
||||
<div>
|
||||
|
||||
{% for post in site.posts %}
|
||||
<h2>{{ post.title }}</h2>
|
||||
|
||||
|
||||
<p>Nyhet postad den
|
||||
{% assign post-d = post.date | date: "%-d" %}
|
||||
{% case post-d %}
|
||||
{% when '1' or '21' or '31' or '2' or '22' %}{{ d }}:a
|
||||
{% else %}{{ post-d }}:e
|
||||
{% endcase %}
|
||||
|
||||
{% assign post-m = post.date | date: "%-m" %}
|
||||
{% case post-m %}
|
||||
{% when '1' %}Januar
|
||||
{% when '2' %}Februari
|
||||
{% when '3' %}Mars
|
||||
{% when '4' %}April
|
||||
{% when '5' %}Maj
|
||||
{% when '6' %}Juni
|
||||
{% when '7' %}Juli
|
||||
{% when '8' %}Augusti
|
||||
{% when '9' %}September {% when '10' %}October {% when '11' %}November {% when '12' %}December
|
||||
{% endcase %}
|
||||
{{ post.date | date: "%Y" }}
|
||||
<br />
|
||||
|
||||
<br /><strong>{{ post.description | truncatewords: 10 }}</strong>
|
||||
</p>
|
||||
<p><a class="cta" href="{{ post.url }}" style="padding:10px;"> Läs mer </a></p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<div id="flyer" style="background-image: url({{ page.image }})"></div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div id="decoration"></div>
|
||||
</div>
|
||||
|
|
|
|||
13
_includes/past-news.html
Normal file
13
_includes/past-news.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{% assign count = site.posts | size %}
|
||||
{% if count > 1 %}
|
||||
<br />
|
||||
<h3>Äldre inlägg</h3>
|
||||
|
||||
{% for post in site.posts | offset: 1%}
|
||||
|
||||
<div class="pastevents" {% if forloop.last == true %}style="border:none"{% endif %}>
|
||||
<p>{{ post.date | date: '%Y-%m-%d' }}<br />
|
||||
<a href="{{ event.url }}"><strong>{{ post.title }}</strong></a>
|
||||
</p>
|
||||
</div> {% endfor %}
|
||||
{% endif %}
|
||||
42
index.html
42
index.html
|
|
@ -4,7 +4,46 @@ image: /siteicon.png
|
|||
layout: default
|
||||
---
|
||||
<!-- begin /index.html -->
|
||||
{% include coming-events.html %}
|
||||
|
||||
|
||||
<div class="column">
|
||||
<div>
|
||||
{% for post in site.posts %}
|
||||
<h2>{{ post.title }}</h2>
|
||||
<p>Nyhet postad den
|
||||
{% assign post-d = post.date | date: "%-d" %}
|
||||
{% case post-d %}
|
||||
{% when '1' or '21' or '31' or '2' or '22' %}{{ d }}:a
|
||||
{% else %}{{ post-d }}:e
|
||||
{% endcase %}
|
||||
|
||||
{% assign post-m = post.date | date: "%-m" %}
|
||||
{% case post-m %}
|
||||
{% when '1' %}Januar
|
||||
{% when '2' %}Februari
|
||||
{% when '3' %}Mars
|
||||
{% when '4' %}April
|
||||
{% when '5' %}Maj
|
||||
{% when '6' %}Juni
|
||||
{% when '7' %}Juli
|
||||
{% when '8' %}Augusti
|
||||
{% when '9' %}September {% when '10' %}October {% when '11' %}November {% when '12' %}December
|
||||
{% endcase %}
|
||||
{{ post.date | date: "%Y" }}
|
||||
<br />
|
||||
|
||||
<br /><strong>{{ post.description }}</strong>
|
||||
</p>
|
||||
<p><a class="cta" href="{{ post.url }}" style="padding:10px;"> Läs mer </a></p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div>
|
||||
|
||||
{% include past-news.html %}
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<h1>{{ site.title }}</h1>
|
||||
<p><strong>{{ site.description }}</strong></p>
|
||||
<div class="editable">
|
||||
|
|
@ -21,8 +60,6 @@ layout: default
|
|||
<a href="/about/" class="cta" alt="About Momangen">Om Momangen</a>
|
||||
</div>
|
||||
|
||||
{% include coming-events.html %}
|
||||
|
||||
<div class="column">
|
||||
{% include past-events.html %}
|
||||
</div>
|
||||
|
|
@ -30,3 +67,4 @@ layout: default
|
|||
{% include hittahit.html %}
|
||||
</div>
|
||||
<!-- END /index.html -->
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue