Skip to content

Commit b53bef5

Browse files
committed
Add post style and lists
1 parent c061a9f commit b53bef5

File tree

9 files changed

+37
-6
lines changed

9 files changed

+37
-6
lines changed

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
title: Oliver Caldwell's lab
22
exclude: [vendor]
3+
permalink: :title/

_includes/header.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<header class='site-header'>
2-
<h1 class='site-title'><a href="{{site.url}}">{{site.title}}</a></h1>
2+
<h1 class='site-title'><a href="/">{{site.title}}</a></h1>
33
<h2 class="page-title">{{page.title}}</h2>
44
</header>

_layouts/base.html

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99

1010
<body>
1111
{% include header.html %}
12-
13-
<section class="page-content">
14-
{{content}}
15-
</section>
12+
{{content}}
1613
</body>
1714
</html>

_layouts/home.html

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,12 @@
22
layout: base
33
---
44

5-
{{content}}
5+
<section class="page-content">
6+
{{content}}
7+
8+
<ul class="posts">
9+
{% for post in site.posts %}
10+
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
11+
{% endfor %}
12+
</ul>
13+
</section>

_layouts/post.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
layout: base
3+
---
4+
5+
<aside class="post-meta">
6+
<p>github.com/<a href="https://github.com/Olical/lab">Olical/lab</a>/blob/js<a href="https://github.com/Olical/lab/blob/js{{page.url}}">{{page.url}}</a></p>
7+
</aside>
8+
9+
<section class="page-content">
10+
{{content}}
11+
</section>

_posts/2015-08-23-hello-world.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: post
3+
title: Hello, World!
4+
---
5+
6+
Test post, please ignore. The line below is generated with JavaScript.
7+
8+
<script src="/js/hello-world/main.js">

_sass/_post.scss

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.post-meta {
2+
background-color: $colour-off-white;
3+
padding: 10px 20px;
4+
}

css/main.scss

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
@import "typography";
77
@import "page";
88
@import "header";
9+
@import "post";

js/hello-world/main.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
document.write('Hello, World!')

0 commit comments

Comments
 (0)