Add home layout
This commit is contained in:
parent
f4daf4eccf
commit
0a0aabadce
6 changed files with 58 additions and 63 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
_site
|
*.gem
|
||||||
|
.bundle
|
||||||
.sass-cache
|
.sass-cache
|
||||||
.jekyll-metadata
|
_site
|
||||||
|
Gemfile.lock
|
||||||
|
|
22
Gemfile.lock
22
Gemfile.lock
|
@ -1,7 +1,7 @@
|
||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
tale (0.1.0)
|
tale (0.0.4)
|
||||||
jekyll (~> 3.6)
|
jekyll (~> 3.6)
|
||||||
jekyll-paginate (~> 1.1)
|
jekyll-paginate (~> 1.1)
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ GEM
|
||||||
colorator (1.1.0)
|
colorator (1.1.0)
|
||||||
ffi (1.9.18)
|
ffi (1.9.18)
|
||||||
forwardable-extended (2.6.0)
|
forwardable-extended (2.6.0)
|
||||||
jekyll (3.6.0)
|
jekyll (3.6.2)
|
||||||
addressable (~> 2.4)
|
addressable (~> 2.4)
|
||||||
colorator (~> 1.0)
|
colorator (~> 1.0)
|
||||||
jekyll-sass-converter (~> 1.0)
|
jekyll-sass-converter (~> 1.0)
|
||||||
|
@ -25,26 +25,28 @@ GEM
|
||||||
rouge (>= 1.7, < 3)
|
rouge (>= 1.7, < 3)
|
||||||
safe_yaml (~> 1.0)
|
safe_yaml (~> 1.0)
|
||||||
jekyll-paginate (1.1.0)
|
jekyll-paginate (1.1.0)
|
||||||
jekyll-sass-converter (1.5.0)
|
jekyll-sass-converter (1.5.1)
|
||||||
sass (~> 3.4)
|
sass (~> 3.4)
|
||||||
jekyll-watch (1.5.0)
|
jekyll-watch (1.5.1)
|
||||||
listen (~> 3.0, < 3.1)
|
listen (~> 3.0)
|
||||||
kramdown (1.15.0)
|
kramdown (1.16.2)
|
||||||
liquid (4.0.0)
|
liquid (4.0.0)
|
||||||
listen (3.0.8)
|
listen (3.1.5)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
|
ruby_dep (~> 1.2)
|
||||||
mercenary (0.3.6)
|
mercenary (0.3.6)
|
||||||
pathutil (0.16.0)
|
pathutil (0.16.1)
|
||||||
forwardable-extended (~> 2.6)
|
forwardable-extended (~> 2.6)
|
||||||
public_suffix (3.0.0)
|
public_suffix (3.0.1)
|
||||||
rake (10.4.2)
|
rake (10.4.2)
|
||||||
rb-fsevent (0.10.2)
|
rb-fsevent (0.10.2)
|
||||||
rb-inotify (0.9.10)
|
rb-inotify (0.9.10)
|
||||||
ffi (>= 0.5.0, < 2)
|
ffi (>= 0.5.0, < 2)
|
||||||
rouge (2.2.1)
|
rouge (2.2.1)
|
||||||
|
ruby_dep (1.5.0)
|
||||||
safe_yaml (1.0.4)
|
safe_yaml (1.0.4)
|
||||||
sass (3.5.2)
|
sass (3.5.5)
|
||||||
sass-listen (~> 4.0.0)
|
sass-listen (~> 4.0.0)
|
||||||
sass-listen (4.0.0)
|
sass-listen (4.0.0)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
|
|
29
_config.yml
29
_config.yml
|
@ -1,33 +1,22 @@
|
||||||
# Permalinks
|
|
||||||
permalink: /:year-:month-:day/:title
|
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
title: Tale
|
title: "Site title"
|
||||||
paginate: 5
|
paginate: 5
|
||||||
baseurl: "/tale"
|
baseurl: # the subpath of your site e.g. "/blog"
|
||||||
url: "https://chesterhow.github.io"
|
url: # the base hostname & protocol for your site e.g. "https://chesterhow.github.io"
|
||||||
|
|
||||||
# Assets
|
|
||||||
# sass:
|
|
||||||
# sass_dir: _sass
|
|
||||||
# style: :compressed
|
|
||||||
|
|
||||||
# Build settings
|
# Build settings
|
||||||
markdown: kramdown
|
markdown: kramdown
|
||||||
|
theme: tale
|
||||||
|
|
||||||
# About
|
# About
|
||||||
author:
|
author:
|
||||||
name: Chester How
|
name: "Your name"
|
||||||
url: http://chester.how
|
url:
|
||||||
email: chesterhow@gmail.com
|
email:
|
||||||
|
|
||||||
# Custom vars
|
|
||||||
version: 3.4.1
|
|
||||||
github:
|
|
||||||
repo: https://github.com/chesterhow/tale
|
|
||||||
|
|
||||||
# Gems
|
# Gems
|
||||||
plugins:
|
plugins:
|
||||||
- jekyll-paginate
|
- jekyll-paginate
|
||||||
|
|
||||||
theme: tale
|
# Permalinks
|
||||||
|
permalink: /:year-:month-:day/:title
|
||||||
|
|
31
_layouts/home.html
Normal file
31
_layouts/home.html
Normal file
|
@ -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">←</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if paginator.next_page %}
|
||||||
|
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="right arrow">→</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<span>{{ paginator.page }}</span>
|
||||||
|
</div>
|
31
index.html
31
index.html
|
@ -1,32 +1,3 @@
|
||||||
---
|
---
|
||||||
layout: default
|
layout: home
|
||||||
title: 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">←</a>
|
|
||||||
{% endif %}
|
|
||||||
{% if paginator.next_page %}
|
|
||||||
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="right arrow">→</a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<span>{{ paginator.page }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = "tale"
|
spec.name = "tale"
|
||||||
spec.version = "0.1.0"
|
spec.version = "0.0.5"
|
||||||
spec.authors = ["Chester How"]
|
spec.authors = ["Chester How"]
|
||||||
spec.email = ["chesterhow@gmail.com"]
|
spec.email = ["chesterhow@gmail.com"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue