Add archives

This commit is contained in:
Alex Carpenter 2015-12-30 10:31:33 -05:00
parent c1e9cf7ba6
commit fb804928d0
10 changed files with 124 additions and 16 deletions

View file

@ -11,8 +11,11 @@ fixedNav: 'true' # true or false
theme: grey # green, blue, orange, purple, grey
twitterUsername: hybrid_alex
githubUsername: alexcarpenter
dribbbleUsername:
codepenUsername:
# Build settings
permalink: /:year/:month/:title
markdown: kramdown
include: [_pages]
exclude: [_site, CHANGELOG.md, LICENSE, README.md]

View file

@ -1,5 +1,11 @@
<footer class="c-footer">
<div class="u-container">
<div class="u-container c-footer__container">
<p>&copy; {{ site.title }} {{ site.time | date: '%Y' }}</p>
<p>
{% if site.twitterUsername %}<a href="https://twitter.com/{{ site.twitterUsername }}">Twitter</a>{% endif %}
{% if site.githubUsername %}<a href="https://github.com/{{ site.githubUsername }}">Github</a>{% endif %}
{% if site.dribbbleUsername %}<a href="https://dribbble.com/{{ site.dribbbleUsername }}">Dribbble</a>{% endif %}
{% if site.codepenUsername %}<a href="http://codepen.io/{{ site.codepenUsername }}">CodePen</a>{% endif %}
</p>
</div>
</footer>

View file

@ -3,6 +3,5 @@
<a class="c-navigation__item {% if page.url == '/' %}is-active{% endif %}" href="{{ "/" | prepend: site.baseurl }}">Home</a>
<a class="c-navigation__item {% if page.url == '/articles/' %}is-active{% endif %}" href="{{ "/articles/" | prepend: site.baseurl }}">Articles</a>
<a class="c-navigation__item {% if page.url == '/about/' %}is-active{% endif %}" href="{{ "/about/" | prepend: site.baseurl }}">About</a>
<a class="c-navigation__item {% if page.title == '/contact/' %}is-active{% endif %}" href="{{ "/contact/" | prepend: site.baseurl }}">Contact</a>
</div>
</nav>

View file

@ -1,15 +1,4 @@
---
layout: default
layout: page
---
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
</header>
<div class="post-content" itemprop="articleBody">
{{ content }}
</div>
</article>

27
_pages/articles.html Normal file
View file

@ -0,0 +1,27 @@
---
layout: page
title: Articles
permalink: /articles/
---
{% for post in site.posts %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
{% if forloop.first %}
<h2 class="c-archives__year" id="{{ this_year }}-ref">{{this_year}}</h2>
<ul class="c-archives__list">
{% endif %}
<li class="c-archives__item">
<h3><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h3>
<p>{{ post.date | date: "%b %-d, %Y" }}</p>
</li>
{% if forloop.last %}
</ul>
{% else %}
{% if this_year != next_year %}
</ul>
<h2 class="c-archives__year" id="{{ next_year }}-ref">{{next_year}}</h2>
<ul class="c-archives__list">
{% endif %}
{% endif %}
{% endfor %}

View file

@ -0,0 +1,7 @@
---
layout: post
title: "Two Thousand Fourteen"
date: 2014-01-03 18:52:21
categories: jekyll update
---
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

View file

@ -0,0 +1,47 @@
/* ==========================================================================
Archives
========================================================================== */
.c-archives {
margin-bottom: 10rem;
}
.c-archives__year {
margin-bottom: 2.5rem;
@include fs--heading-1;
}
.c-archives__list {
margin-bottom: 2.5rem;
list-style: none;
}
.c-archives__item {
padding-top: 2.5rem;
padding-bottom: 2.5rem;
border-top: 1px solid #EFF1F3;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
h3 {
@include fs--body;
}
p {
@include fs--body;
color: #515862;
}
}

View file

@ -3,7 +3,32 @@
========================================================================== */
.c-footer {
padding-top: 14.1rem; // 75px
padding-left: 2.5rem;
padding-right: 2.5rem;
width: 100%;
height: 300px;
background: $c__light-grey;
p {
@include fs--meta;
}
a:not(:first-of-type) {
margin-left: 2rem;
}
}
.c-footer__container {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
}

View file

@ -12,4 +12,8 @@
.c-article__main a:not(.c-btn) {
color: $c__blue-grey;
}
.c-footer a {
color: $c__blue-grey;
}
}

View file

@ -21,6 +21,7 @@
'components/header',
'components/navigation',
'components/article',
'components/archives',
'components/social',
'components/buttons',
'components/footer';