Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Wrap all page content in #main div to fix mmistakes#86
Browse files Browse the repository at this point in the history
- Adjust article styles to correctly display post indexes
- Remove top margin from page titles
  • Loading branch information
makaroniame committed Sep 30, 2014
1 parent 861ed02 commit 697f23f
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 47 deletions.
35 changes: 18 additions & 17 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,24 @@
</div><!-- /.image-wrap -->
{% endif %}

<div class="article-author-side">
{% include _author-bio.html %}
</div>

<div id="index">
<h3><a href="{{ site.url}}/posts/">Recent Posts</a></h3>
{% for post in site.posts limit:5 %}
<article>
{% if post.link %}
<h2 class="link-post"><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> <a href="{{ post.link }}" target="_blank" title="{{ post.title }}"><i class="fa fa-link"></i></h2>
{% else %}
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{{ post.excerpt | strip_html | truncate: 160 }}</p>
{% endif %}
</article>
{% endfor %}
</div><!-- /#index -->
<div id="main" role="main">
<div class="article-author-side">
{% include _author-bio.html %}
</div>
<div id="index">
<h3><a href="{{ site.url}}/posts/">Recent Posts</a></h3>
{% for post in site.posts limit:5 %}
<article>
{% if post.link %}
<h2 class="link-post"><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> <a href="{{ post.link }}" target="_blank" title="{{ post.title }}"><i class="fa fa-link"></i></h2>
{% else %}
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{{ post.excerpt | strip_html | truncate: 160 }}</p>
{% endif %}
</article>
{% endfor %}
</div><!-- /#index -->
</div><!-- /#main -->

<div class="footer-wrap">
<footer>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<div class="article-author-side">
{% include _author-bio.html %}
</div>
<article>
<article class="page">
<h1>{{ page.title }}</h1>
<div class="article-wrap">
{{ content }}
Expand Down
51 changes: 26 additions & 25 deletions _layouts/post-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,33 @@
</div><!-- /.image-wrap -->
{% endif %}

<div class="article-author-side">
{% include _author-bio.html %}
</div>

<div id="index">
<h1>{{ page.title }}</h1>
{% for post in site.posts %}
{% unless post.next %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% endif %}
{% endunless %}
<article>
{% if post.link %}
<h2 class="link-post"><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> <a href="{{ post.link }}" target="_blank" title="{{ post.title }}"><i class="fa fa-link"></i></h2>
<div id="main" role="main">
<div class="article-author-side">
{% include _author-bio.html %}
</div>
<div id="index">
<h1>{{ page.title }}</h1>
{% for post in site.posts %}
{% unless post.next %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% else %}
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{{ post.excerpt | strip_html | truncate: 160 }}</p>
{% endif %}
</article>
{% endfor %}
</div><!-- /#index -->
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% endif %}
{% endunless %}
<article>
{% if post.link %}
<h2 class="link-post"><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> <a href="{{ post.link }}" target="_blank" title="{{ post.title }}"><i class="fa fa-link"></i></h2>
{% else %}
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{{ post.excerpt | strip_html | truncate: 160 }}</p>
{% endif %}
</article>
{% endfor %}
</div><!-- /#index -->
</div><!-- /#main -->

<div class="footer-wrap">
<footer>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<div class="article-author-side">
{% include _author-bio.html %}
</div>
<article>
<article class="post">
<div class="headline-wrap">
{% if page.link %}
<h1><a href="{{ page.link }}">{{ page.title }}</a></h1>
Expand Down
10 changes: 7 additions & 3 deletions _sass/page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ body {
}
.navigation-wrapper {
@include container;
padding: 2em 0 0;
padding: 2em 0 1em;
font-family: $heading-font;
font-weight: 700;
text-transform: uppercase;
Expand Down Expand Up @@ -206,8 +206,12 @@ $button-size: 1.5rem;
@include container;
@include clearfix;
clear: both;
margin-top: 1em;
article {
margin-top: 2em;
h1 {
margin-top: 0;
}
.post,
.page {
@include container;
@include grid(12,10);
@include prefix(12,1);
Expand Down

0 comments on commit 697f23f

Please sign in to comment.