Skip to content

Commit

Permalink
Merge in updates from Poole 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
agude committed Nov 20, 2016
1 parent 63c873b commit 4838610
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 65 deletions.
4 changes: 3 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ gems:
permalink: pretty

# Setup
author: "Alexander Gude"
author:
name: "Alexander Gude"

title: "Alex Gude"
tagline: "Data Scientist"
description: "The home page and blog of Alexander Gude"
Expand Down
8 changes: 3 additions & 5 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">

<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--Twitter card and OpenGraph-->
{% if page.title == "Home" %}
Expand Down Expand Up @@ -76,8 +74,8 @@

<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.baseurl }}/public/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="{{ site.baseurl }}/public/favicon.ico">
<link rel="shortcut icon" href="{{ site.baseurl }}/public/favicon.ico">

<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">
<link rel="alternate" type="application/atom+xml" title="{{ site.title }}" href="{{ site.baseurl }}/atom.xml">
</head>
32 changes: 15 additions & 17 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
<div class="sidebar">
{% assign homeurl = site.baseurl | append: "/" %}

<aside class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<h1>
<a href="{{ site.baseurl }}/">
{{ site.title }}
</a>
<a href="{{ homeurl }}" title="Home">{{ site.title }}</a>
</h1>
<p class="lead">{{ site.description }}</p>
</div>

<nav class="sidebar-nav">
<a class="sidebar-nav-item{% if page.url == site.baseurl %} active{% endif %}" href="{{ site.baseurl }}/">Home</a>
<a class="sidebar-nav-item{% if page.url == homeurl %} active{% endif %}" href="{{ homeurl }}">Home</a>

{% comment %}
The code below dynamically generates a sidebar nav of pages with
`layout: page` in the front-matter. See readme for usage.
The code below dynamically generates a sidebar nav of pages with `layout: page` in the front-matter.
{% endcomment %}

{% assign pages_list = site.pages %}
{% for node in pages_list %}
{% if node.title != null %}
{% if node.layout == "page" %}
{% unless node.url contains "page" %} {% comment %} Paginated Blog pages should not be included in the sidebar. {% endcomment %}
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{site.baseurl}}{{ node.url }}">{{ node.title }}</a>
{% endunless %}
{% endif %}
{% for node in site.pages %}
{% if node.title != null and node.layout == "page" %}
{% unless node.url contains "page" %} {% comment %} Paginated Blog pages should not be included in the sidebar. {% endcomment %}
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{site.baseurl}}{{ node.url }}">{{ node.title }}</a>
{% endunless %}
{% endif %}
{% endfor %}

</nav>

<p>&copy; {{ site.time | date: '%Y' }}. All rights reserved.</p>
<small>
&copy; <time datetime="{{ site.time | date_to_xmlschema }}">{{ site.time | date: '%Y' }}</time>. All rights reserved.
</small>
</div>
</div>
</aside>
6 changes: 3 additions & 3 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html lang="en-us">
<html lang="en">

{% include head.html %}

<body>

{% include sidebar.html %}

<div class="content container">
<main class="content container">
{{ content }}
</div>
</main>

</body>
</html>
4 changes: 2 additions & 2 deletions _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
---

<div class="page">
<article class="page">
<h1 class="page-title">{{ page.title }}</h1>
{{ content }}
</div>
</article>
40 changes: 21 additions & 19 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,30 @@
layout: default
---

<div class="post">
<article class="post">
<h1 class="post-title">{{ page.title }}</h1>
<span class="post-date">{{ page.date | date: '%B %d, %Y' }}</span>
<time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date: '%B %d, %Y' }}</time>
{{ content }}
</div>
</article>

<!-- Related Posts -->
<div class="related">
<h2>Related Posts</h2>
<ul class="related-posts">
{% for post in site.related_posts limit:3 %}
<li>
<h3>
<a href="{{ post.url }}">
{{ post.title }}
<small>{{ post.date | date: '%B %d, %Y' }}</small>
</a>
</h3>
</li>
{% endfor %}
</ul>
</div>
{% if site.related_posts != empty %}
<!-- Related Posts -->
<aside class="related">
<h2>Related Posts</h2>
<ul class="related-posts">
{% for post in site.related_posts limit:3 %}
<li>
<h3>
<a href="{{ site.baseurl }}{{ post.url }}">
{{ post.title }}
<small><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: '%B %d, %Y' }}</time></small>
</a>
</h3>
</li>
{% endfor %}
</ul>
</aside>
{% endif %}

<!-- Share Buttons -->
{% include share.html %}
9 changes: 4 additions & 5 deletions atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ layout: null
<feed xmlns="http://www.w3.org/2005/Atom">

<title>{{ site.title }}</title>
<link href="{{ site.url }}/atom.xml" rel="self"/>
<link href="{{ site.url }}/"/>
<link href="{{ site.url }}{{ site.baseurl }}/atom.xml" rel="self"/>
<link href="{{ site.url }}{{ site.baseurl }}/"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.url }}</id>
<author>
<name>{{ site.author.name }}</name>
<email>{{ site.author.email }}</email>
</author>

{% for post in site.posts %}
<entry>
<title>{{ post.title }}</title>
<link href="{{ site.url }}{{ post.url }}"/>
<title>{{ post.title | xml_escape }}</title>
<link href="{{ site.url }}{{ site.baseurl }}{{ post.url }}"/>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>{{ site.url }}{{ post.id }}</id>
<content type="html">{{ post.content | xml_escape }}</content>
Expand Down
24 changes: 11 additions & 13 deletions blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,28 @@

<div class="posts">
{% for post in paginator.posts %}
<div class="post">
<h1 class="post-title">
<a href="{{ post.url }}">
{{ post.title }}
</a>
</h1>
<article class="post">
<h1 class="post-title">
<a href="{{site.baseurl}}{{ post.url }}">
{{ post.title }}
</a>
</h1>

<span class="post-date">{{ post.date | date: '%B %d, %Y' }}</span>
<time datetime="{{ post.date | date_to_xmlschema }}" class="post-date">{{ post.date | date: '%B %d, %Y' }}</time>

{{ post.content }}
</div>
{{ post.content }}
</article>
{% endfor %}
</div>

<div class="pagination">
{% if paginator.next_page %}
<a class="pagination-item older" href="{{ paginator.next_page_path }}">Older</a>
<a class="pagination-item older" href="{{ paginator.next_page_path | prepend: site.baseurl }}">Older</a>
{% else %}
<span class="pagination-item older">Older</span>
{% endif %}
{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<a class="pagination-item newer" href="{{ paginator.previous_page_path }}">Newer</a>
{% endif %}
<a class="pagination-item newer" href="{{ paginator.previous_page_path | prepend: site.baseurl }}">Newer</a>
{% else %}
<span class="pagination-item newer">Newer</span>
{% endif %}
Expand Down

0 comments on commit 4838610

Please sign in to comment.