Dramatic layout updates, still in progress.

This commit is contained in:
Anna Rose 2016-05-04 15:16:23 -04:00
parent f343f2b42c
commit 9ead6e05b6
7 changed files with 36 additions and 28 deletions

View File

@ -22,8 +22,11 @@ timezone: America/New_York
# Build settings
markdown: kramdown
# Category settings
main_categories:
- technology
- media
category_titles:
technology: "The Technologist"
media: "The Player of Games"

View File

@ -1,16 +0,0 @@
<ul class="post-list">
{% for post in site.categories[include.category] limit:include.limit %}
<li style="margin-top: 30px">
<h2 style="line-height: 1">
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">
{{ post.title }}
</a>
<span class="post-meta">{{ post.date | date: "%Y-%m-%d" }}</span>
</h2>
{{ post.excerpt }}
<p>
<a href="{{ post.url | prepend: site.baseurl }}">Read More...</a>
</p>
</li>
{% endfor %}
</ul>

18
_includes/post_list.html Normal file
View File

@ -0,0 +1,18 @@
<ul class="post-list">
{% for post in site.posts limit:include.limit %}
{% if include.categories contains post.category %}
<li style="margin-top: 30px">
<h2 style="line-height: 1">
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">
{{ post.title }}
</a>
<span class="post-meta">{{ post.date | date: "%Y-%m-%d" }}</span>
</h2>
{{ post.excerpt }}
<p>
<a href="{{ post.url | prepend: site.baseurl }}">Read More...</a>
</p>
</li>
{% endif %}
{% endfor %}
</ul>

View File

@ -8,7 +8,7 @@ layout: default
</header>
<div class="post-content">
{% include category_list.html category=page.category limit=1000000 %}
{% include post_list.html categories=page.category limit=1000000 %}
</div>
</article>

View File

@ -51,5 +51,5 @@ $on-laptop: 800px;
"base",
"layout",
"syntax-highlighting",
"columns"
"custom"
;

View File

@ -2,6 +2,17 @@
layout: default
---
<div class="home">
<div class="category-menu">
{% for category in site.categories %}
{% if category.first == "meta" %} {% continue %} {% endif %}
<span class="category-link">
<a href="{{category.first | prepend: site.baseurl}}">
{{ site.category_titles[category.first] }}
</a>
</span>
{% endfor %}
</div>
{% assign last_meta = site.categories.meta.first %}
{% if last_meta.active %}
<div class="site-update">
@ -12,13 +23,5 @@ layout: default
</div>
{% endif %}
{% for category in site.categories %}
{% if category.first == "meta" %} {% continue %} {% endif %}
<div class="column col-{{site.categories.size | minus: 1}}">
<a href="{{category.first | prepend: site.baseurl}}">
<h1 class="page-heading">{{ site.category_titles[category.first] }}</h1>
</a>
{% include category_list.html category=category.first limit=5 %}
</div>
{% endfor %}
{% include post_list.html categories=site.main_categories limit=5 %}
</div>