Skip to content

Commit

Permalink
Add home layout
Browse files Browse the repository at this point in the history
  • Loading branch information
chesterhow committed Jan 8, 2018
1 parent f4daf4e commit 0a0aaba
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 63 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
_site
*.gem
.bundle
.sass-cache
.jekyll-metadata
_site
Gemfile.lock
22 changes: 12 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
tale (0.1.0)
tale (0.0.4)
jekyll (~> 3.6)
jekyll-paginate (~> 1.1)

Expand All @@ -13,7 +13,7 @@ GEM
colorator (1.1.0)
ffi (1.9.18)
forwardable-extended (2.6.0)
jekyll (3.6.0)
jekyll (3.6.2)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
Expand All @@ -25,26 +25,28 @@ GEM
rouge (>= 1.7, < 3)
safe_yaml (~> 1.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.5.0)
jekyll-sass-converter (1.5.1)
sass (~> 3.4)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.15.0)
jekyll-watch (1.5.1)
listen (~> 3.0)
kramdown (1.16.2)
liquid (4.0.0)
listen (3.0.8)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
pathutil (0.16.0)
pathutil (0.16.1)
forwardable-extended (~> 2.6)
public_suffix (3.0.0)
public_suffix (3.0.1)
rake (10.4.2)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (2.2.1)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.5.2)
sass (3.5.5)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
Expand Down
29 changes: 9 additions & 20 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
# Permalinks
permalink: /:year-:month-:day/:title

# Setup
title: Tale
title: "Site title"
paginate: 5
baseurl: "/tale"
url: "https://chesterhow.github.io"

# Assets
# sass:
# sass_dir: _sass
# style: :compressed
baseurl: # the subpath of your site e.g. "/blog"
url: # the base hostname & protocol for your site e.g. "https://chesterhow.github.io"

# Build settings
markdown: kramdown
theme: tale

# About
author:
name: Chester How
url: http://chester.how
email: [email protected]

# Custom vars
version: 3.4.1
github:
repo: https://github.com/chesterhow/tale
name: "Your name"
url:
email:

# Gems
plugins:
- jekyll-paginate

theme: tale
# Permalinks
permalink: /:year-:month-:day/:title
31 changes: 31 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
layout: default
---

<div class="catalogue">
{% for post in paginator.posts %}
<a href="{{ post.url | prepend: site.baseurl }}" class="catalogue-item">
<div>
<time datetime="{{ post.date }}" class="catalogue-time">{{ post.date | date: "%B %d, %Y" }}</time>
<h1 class="catalogue-title">{{ post.title }}</h1>
<div class="catalogue-line"></div>

<p>
{{ post.content | truncatewords: 30 | strip_html }}
</p>

</div>
</a>
{% endfor %}
</div>

<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl }}" class="left arrow">&#8592;</a>
{% endif %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="right arrow">&#8594;</a>
{% endif %}

<span>{{ paginator.page }}</span>
</div>
31 changes: 1 addition & 30 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
---
layout: default
title: Home
layout: home
---

<div class="catalogue">
{% for post in paginator.posts %}
<a href="{{ post.url | prepend: site.baseurl }}" class="catalogue-item">
<div>
<time datetime="{{ post.date }}" class="catalogue-time">{{ post.date | date: "%B %d, %Y" }}</time>
<h1 class="catalogue-title">{{ post.title }}</h1>
<div class="catalogue-line"></div>

<p>
{{ post.content | truncatewords: 30 | strip_html }}
</p>

</div>
</a>
{% endfor %}
</div>

<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl }}" class="left arrow">&#8592;</a>
{% endif %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="right arrow">&#8594;</a>
{% endif %}

<span>{{ paginator.page }}</span>
</div>
2 changes: 1 addition & 1 deletion tale.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "tale"
spec.version = "0.1.0"
spec.version = "0.0.5"
spec.authors = ["Chester How"]
spec.email = ["[email protected]"]

Expand Down

0 comments on commit 0a0aaba

Please sign in to comment.