Browse Source

added collection and testing

redesign
Anxhelo Lushka 7 years ago
parent
commit
ee924cf203
  1. 4
      _config.yml
  2. 22
      events/index.html

4
_config.yml

@ -25,3 +25,7 @@ gems:
paginate: 6 paginate: 6
paginate_path: "blog/older:num" paginate_path: "blog/older:num"
collections:
- events
output: true

22
events/index.html

@ -4,15 +4,15 @@ section_id: event
title: Events title: Events
--- ---
{% for post in paginator.events %} {% for item in site.events %}
<div class="row"> <div class="row">
<div class="large-12 columns table" style="border-bottom: 3px solid aliceblue;"> <div class="large-12 columns table" style="border-bottom: 3px solid aliceblue;">
{% assign mod = forloop.index | modulo: 1 %} {% assign mod = forloop.index | modulo: 1 %}
{% if mod == 0 %} {% if mod == 0 %}
<div class="large-1 blog centered-text columns"> <div class="large-1 blog centered-text columns">
{% if post.categories != empty %} {% if item.categories != empty %}
<span> <span>
{% for cat in post.categories %} {% for cat in item.categories %}
<a href="#">{{cat | capitalize }}</a> <a href="#">{{cat | capitalize }}</a>
{% unless forloop.last %} {% unless forloop.last %}
, ,
@ -21,24 +21,24 @@ title: Events
</span> </span>
/ /
{% endif %} {% endif %}
<h1 class="blogdate"><a href="{{ post.url | replace:'.html','' }}">{{ post.date | date: "%d" }}</h1> <h1 class="blogdate"><a href="{{ item.url | replace:'.html','' }}">{{ item.date | date: "%d" }}</h1>
<p id="post-month">{{ post.date | date: "%B %Y" }}</p></a> <p id="post-month">{{ item.date | date: "%B %Y" }}</p></a>
</div> </div>
<div class="large-8 columns bottom-blog"> <div class="large-8 columns bottom-blog">
<div class="post-content blog"> <div class="post-content blog">
<h3 id="blog-title" class="blog"><a href="{{ post.url | replace:'.html','' }}">{{post.title}}</a></h3> <h3 id="blog-title" class="blog"><a href="{{ post.url | replace:'.html','' }}">{{item.title}}</a></h3>
<p>{{post.excerpt}}</p> <p>{{item.excerpt}}</p>
<div class="tags"> <div class="tags">
{% for tag in post.tags %} {% for tag in item.tags %}
<a href="{{ site.baseurl }}/tags/#{{tag | slugify }}">{{ tag }}</a> <a href="{{ site.baseurl }}/tags/#{{tag | slugify }}">{{ tag }}</a>
{% endfor %} {% endfor %}
</div> </div>
<p><a href="{{ post.url | replace:'.html','' }}" class="button tiny blue simple boxed">Read more</a></p> <p><a href="{{ item.url | replace:'.html','' }}" class="button tiny blue simple boxed">Read more</a></p>
</div> </div>
</div> </div>
<div class="large-3 columns blog middle-blog" style="margin-bottom: 30px;"> <div class="large-3 columns blog middle-blog" style="margin-bottom: 30px;">
{% if post.images %} {% if item.images %}
<a href="{{ post.url | replace:'.html','' }}"><img style="display: block; margin: auto;" src="{{site.url}}/{{post.images[0]}}" alt="post"></a> <a href="{{ item.url | replace:'.html','' }}"><img style="display: block; margin: auto;" src="{{site.url}}/{{item.images[0]}}" alt="post"></a>
{% endif %} {% endif %}
</div> </div>
</div> </div>

Loading…
Cancel
Save