Skip to content

Commit e0a039c

Browse files
committed
next/prev + intro line
1 parent 9e07b13 commit e0a039c

File tree

5 files changed

+33
-5
lines changed

5 files changed

+33
-5
lines changed

_includes/next_and_prev.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div class="next-page-links">
2+
{% if page.previous.url %}
3+
<a class="prev-link" href="{{page.previous.url}}">&laquo; Previous post</a>
4+
{% endif %}
5+
6+
{% if page.next.url %}
7+
<a class="next-link" href="{{page.next.url}}">Next post &raquo;</a>
8+
{% endif %}
9+
</div>

_layouts/home.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
<div class="home">
66

7-
<h1 class="page-heading">Posts</h1>
8-
97
{{ content }}
8+
9+
<h1 class="page-heading">Posts</h1>
1010

1111
<ul class="post-list">
1212
{% for post in site.posts %}

_layouts/post.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ <h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
1414

1515
{% include share_icons.html %}
1616

17+
{% include next_and_prev.html %}
18+
1719
{% if site.disqus.shortname %}
1820
{% include disqus_comments.html %}
1921
{% endif %}

assets/main.scss

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,19 @@ svg {
106106
width: 50px;
107107
height: 50px;
108108
fill: #333;
109-
}
109+
}
110+
111+
.next-page-links {
112+
min-height: 10px;
113+
overflow: hidden;
114+
}
115+
116+
.prev-link {
117+
float: left;
118+
margin-bottom: 10px;
119+
}
120+
121+
.next-link {
122+
float: right;
123+
margin-bottom: 10px;
124+
}

index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
layout: home
33
image: /assets/imgs/learningjulia.svg
4-
height: 100
5-
width: 100
4+
image.height: 200
5+
image.width: 200
66
---
7+
8+
Welcome to Learning Julia! Follow [me](http://mprat.org) in my journey in learning the Julia programming language. Read the latest posts here, or [start with the very first post and read them all the way through!]({% post_url 2017-02-19-launching-learning-julia %})

0 commit comments

Comments
 (0)