mirror of
https://github.com/adulau/foo.be.git
synced 2024-11-22 01:37:05 +00:00
Add archives
This commit is contained in:
parent
c1e9cf7ba6
commit
fb804928d0
10 changed files with 124 additions and 16 deletions
|
@ -11,8 +11,11 @@ fixedNav: 'true' # true or false
|
||||||
theme: grey # green, blue, orange, purple, grey
|
theme: grey # green, blue, orange, purple, grey
|
||||||
twitterUsername: hybrid_alex
|
twitterUsername: hybrid_alex
|
||||||
githubUsername: alexcarpenter
|
githubUsername: alexcarpenter
|
||||||
|
dribbbleUsername:
|
||||||
|
codepenUsername:
|
||||||
|
|
||||||
# Build settings
|
# Build settings
|
||||||
|
permalink: /:year/:month/:title
|
||||||
markdown: kramdown
|
markdown: kramdown
|
||||||
include: [_pages]
|
include: [_pages]
|
||||||
exclude: [_site, CHANGELOG.md, LICENSE, README.md]
|
exclude: [_site, CHANGELOG.md, LICENSE, README.md]
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
<footer class="c-footer">
|
<footer class="c-footer">
|
||||||
<div class="u-container">
|
<div class="u-container c-footer__container">
|
||||||
|
<p>© {{ 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>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -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 == '/' %}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 == '/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.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>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -1,15 +1,4 @@
|
||||||
---
|
---
|
||||||
layout: default
|
layout: page
|
||||||
---
|
---
|
||||||
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
{{ content }}
|
||||||
|
|
||||||
<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
27
_pages/articles.html
Normal 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 %}
|
7
_posts/2014-01-03-two-thousand-fourteen.markdown
Normal file
7
_posts/2014-01-03-two-thousand-fourteen.markdown
Normal 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.
|
47
_sass/components/_archives.scss
Normal file
47
_sass/components/_archives.scss
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,7 +3,32 @@
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
.c-footer {
|
.c-footer {
|
||||||
|
padding-top: 14.1rem; // 75px
|
||||||
|
padding-left: 2.5rem;
|
||||||
|
padding-right: 2.5rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
background: $c__light-grey;
|
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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,4 +12,8 @@
|
||||||
.c-article__main a:not(.c-btn) {
|
.c-article__main a:not(.c-btn) {
|
||||||
color: $c__blue-grey;
|
color: $c__blue-grey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.c-footer a {
|
||||||
|
color: $c__blue-grey;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
'components/header',
|
'components/header',
|
||||||
'components/navigation',
|
'components/navigation',
|
||||||
'components/article',
|
'components/article',
|
||||||
|
'components/archives',
|
||||||
'components/social',
|
'components/social',
|
||||||
'components/buttons',
|
'components/buttons',
|
||||||
'components/footer';
|
'components/footer';
|
||||||
|
|
Loading…
Reference in a new issue