Skip to content

Commit

Permalink
Increase flexibility of 'home' layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmaroli committed Jun 29, 2017
1 parent 73aaafe commit 67ea9ab
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
32 changes: 18 additions & 14 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@
---

<div class="home">
{% if page.title %}
<h1 class="page-heading">{{ page.title }}</h1>
{% endif %}

{{ content }}

<h1 class="page-heading">Posts</h1>

<ul class="post-list">
{% for post in site.posts %}
<li>
{% assign date_format = site.minima.date_format | default: "%b %-d, %Y" %}
<span class="post-meta">{{ post.date | date: date_format }}</span>
{% if site.posts.size > 0 %}
<h2 class="post-list-heading">{{ page.list_title | default: "Posts" }}</h2>
<ul class="post-list">
{% for post in site.posts %}
<li>
{% assign date_format = site.minima.date_format | default: "%b %-d, %Y" %}
<span class="post-meta">{{ post.date | date: date_format }}</span>

<h2>
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
</h2>
</li>
{% endfor %}
</ul>
<h3>
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
</h3>
</li>
{% endfor %}
</ul>

<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
{% endif %}

</div>
6 changes: 5 additions & 1 deletion _sass/minima/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@
}

.page-heading {
@include relative-font-size(1.25);
@include relative-font-size(2);
}

.post-list-heading {
@include relative-font-size(1.75);
}

.post-list {
Expand Down

0 comments on commit 67ea9ab

Please sign in to comment.