hitchens-theme 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +29 -4
- data/_includes/back-link.html +3 -0
- data/_layouts/home.html +93 -39
- data/_layouts/post.html +1 -3
- data/_sass/_article.scss +7 -7
- data/_sass/_base.scss +1 -30
- data/_sass/_masthead.scss +8 -7
- data/_sass/_post-list.scss +48 -0
- data/assets/css/main.scss +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ae8bd8658b4f17a242a1639bea0c5c4da770835
|
4
|
+
data.tar.gz: cfcadc4af9f2652078ab1a0ed23845fe23a58660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b2ffa812389556abaeef69853141ff4404f5f07dc7932ebd2d9827b2504d15a48a45082d9cb775409ae6f682e6c4e0b46c1da2238ce21ddc8222c61be1c1cf9
|
7
|
+
data.tar.gz: 720b4a446fe856dcf507409f565a44ca7b978076c0396b1f81608ecce8086321c2b3d34bdc75f84b44b4bbb4dae1051aad9dc8dbc044a50868a0dda685d20291
|
data/README.md
CHANGED
@@ -4,18 +4,20 @@
|
|
4
4
|
|
5
5
|
An inarguably well-designed Jekyll theme.
|
6
6
|
|
7
|
+
Undoubtably one of the great minds of our time, [Christopher Hitchens](https://en.wikipedia.org/wiki/Christopher_Hitchens) challenged his readers to think deeply on topics of politics, religion, war, and science. This Jekyll theme's design is inspired by the trade paperback version his book, [Arguably](https://en.wikipedia.org/wiki/Arguably), and is dedicated to his memory.
|
8
|
+
|
7
9
|
## Installation
|
8
10
|
|
9
11
|
Add this line to your Jekyll site's `Gemfile`:
|
10
12
|
|
11
13
|
```ruby
|
12
|
-
gem "hitchens"
|
14
|
+
gem "hitchens-theme"
|
13
15
|
```
|
14
16
|
|
15
17
|
And add this line to your Jekyll site's `_config.yml`:
|
16
18
|
|
17
19
|
```yaml
|
18
|
-
theme: hitchens
|
20
|
+
theme: hitchens-theme
|
19
21
|
```
|
20
22
|
|
21
23
|
And then execute:
|
@@ -24,7 +26,7 @@ And then execute:
|
|
24
26
|
|
25
27
|
Or install it yourself as:
|
26
28
|
|
27
|
-
$ gem install hitchens
|
29
|
+
$ gem install hitchens-theme
|
28
30
|
|
29
31
|
## Usage
|
30
32
|
|
@@ -49,6 +51,25 @@ To include navigation in your site's masthead:
|
|
49
51
|
|
50
52
|
Be sure to start your `url`s with a `/`.
|
51
53
|
|
54
|
+
## Pagination
|
55
|
+
|
56
|
+
To paginate your posts, add the following line to your site's `Gemfile`:
|
57
|
+
|
58
|
+
```
|
59
|
+
gem "jekyll-paginate"
|
60
|
+
```
|
61
|
+
|
62
|
+
Then, add the following lines to your site's `_config.yml` file:
|
63
|
+
|
64
|
+
```
|
65
|
+
plugins:
|
66
|
+
- jekyll-paginate
|
67
|
+
|
68
|
+
paginate: 20
|
69
|
+
paginate_path: "/page/:num/"
|
70
|
+
```
|
71
|
+
|
72
|
+
You can set the `paginate` and `paginate_path` settings to whatever best suits you.
|
52
73
|
|
53
74
|
### Post Layout
|
54
75
|
|
@@ -64,7 +85,11 @@ hide_credits: true
|
|
64
85
|
|
65
86
|
### Font
|
66
87
|
|
67
|
-
|
88
|
+
I spent a good amount of time trying to identify the font used on the front cover of the trade paperback version of Arguably. Unfortunately, I failed to accurately identify the exact font used. If you happen to know what font is used on the book cover, I would appreciate you [letting me know](mailto:hello@patdryburgh.com) :)
|
89
|
+
|
90
|
+
The theme includes a version of [EB Garamond](https://fonts.google.com/specimen/EB+Garamond), designed by Georg Duffner and Octavio Pardo. It's the closest alternative I could come up with that included an open license to include with the theme.
|
91
|
+
|
92
|
+
A [copy of the license](https://github.com/patdryburgh/hitchens/blob/master/assets/fonts/OFL.txt) has been included in the `assets` folder and must be included with any distributions of this theme that include the EB Garamond font files.
|
68
93
|
|
69
94
|
## Contributing & Requesting Features
|
70
95
|
|
data/_layouts/home.html
CHANGED
@@ -4,51 +4,105 @@ layout: default
|
|
4
4
|
|
5
5
|
{% assign menu = site.data.menu %}
|
6
6
|
|
7
|
-
|
8
|
-
{%
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
7
|
+
{% if site.paginate and site.paginate_path and paginator.page > 1 %}
|
8
|
+
{% include back-link.html %}
|
9
|
+
{% else %}
|
10
|
+
<header class="site-masthead">
|
11
|
+
{% if site.title %}
|
12
|
+
<h1>
|
13
|
+
{{ site.title }}
|
14
|
+
</h1>
|
15
|
+
{% endif %}
|
16
|
+
{% if site.title %}
|
17
|
+
<h2>
|
18
|
+
{{ site.description }}
|
19
|
+
</h2>
|
20
|
+
{% endif %}
|
21
|
+
{% if menu %}
|
22
|
+
<nav class="site-navigation">
|
23
|
+
<ul>
|
24
|
+
{% for item in site.data.menu %}
|
25
|
+
<li>
|
26
|
+
{% if item.url contains 'http' %}
|
27
|
+
<a href="{{ item.url }}">
|
28
|
+
{{ item.title }}
|
29
|
+
</a>
|
30
|
+
{% else %}
|
31
|
+
<a href="{{ item.url | prepend: site.baseurl }}">
|
32
|
+
{{ item.title }}
|
33
|
+
</a>
|
34
|
+
{% endif %}
|
35
|
+
</li>
|
36
|
+
{% endfor %}
|
37
|
+
</ul>
|
38
|
+
</nav>
|
39
|
+
{% endif %}
|
40
|
+
</header>
|
41
|
+
{% endif %}
|
42
|
+
|
43
|
+
<main class="home" aria-label="Content">
|
44
|
+
|
45
|
+
<h1 class="divided">
|
46
|
+
{% if site.paginate and site.paginate_path and paginator.page > 1 %}
|
47
|
+
Page {{ paginator.page }}
|
48
|
+
{% else %}
|
49
|
+
Contents
|
50
|
+
{% endif %}
|
51
|
+
</h1>
|
52
|
+
|
53
|
+
{% if site.paginate and site.paginate_path %}
|
54
|
+
|
55
|
+
<ul class="post-list">
|
56
|
+
{% for post in paginator.posts %}
|
22
57
|
<li>
|
23
|
-
<a href="{{
|
24
|
-
|
58
|
+
<a href="{{ post.url | absolute_url }}" class="post-link">
|
59
|
+
<span class="post-title">
|
60
|
+
{{ post.title }}
|
61
|
+
</span>
|
62
|
+
<span class="post-date">
|
63
|
+
{{ post.date | date: "%b %-d, '%y" }}
|
64
|
+
</span>
|
25
65
|
</a>
|
26
66
|
</li>
|
27
67
|
{% endfor %}
|
28
|
-
|
29
|
-
</nav>
|
30
|
-
{% endif %}
|
31
|
-
</header>
|
68
|
+
</ul>
|
32
69
|
|
33
|
-
|
70
|
+
{% if paginator.page > 1 %}
|
34
71
|
|
35
|
-
|
36
|
-
|
37
|
-
</
|
72
|
+
<div class="post-pagination">
|
73
|
+
{% if paginator.next_page %}
|
74
|
+
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}" class="pagination-next btn">⟨ Older</a>
|
75
|
+
{% else %}
|
76
|
+
<span> </span>
|
77
|
+
{% endif %}
|
78
|
+
<span class="pagination-number">{{ paginator.page }} of {{ paginator.total_pages }}</span>
|
79
|
+
{% if paginator.previous_page %}
|
80
|
+
<a href="{{ paginator.previous_page_path | prepend: site.baseurl }}" class="pagination-previous btn">Newer ⟩</a>
|
81
|
+
{% else %}
|
82
|
+
<span> </span>
|
83
|
+
{% endif %}
|
84
|
+
</div>
|
85
|
+
|
86
|
+
{% endif %}
|
38
87
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
88
|
+
{% else %}
|
89
|
+
|
90
|
+
<ul class="post-list">
|
91
|
+
{% for post in site.posts %}
|
92
|
+
<li>
|
93
|
+
<a href="{{ post.url | absolute_url }}" class="post-link">
|
94
|
+
<span class="post-title">
|
95
|
+
{{ post.title }}
|
96
|
+
</span>
|
97
|
+
<span class="post-date">
|
98
|
+
{{ post.date | date: "%b %-d, '%y" }}
|
99
|
+
</span>
|
100
|
+
</a>
|
101
|
+
</li>
|
102
|
+
{% endfor %}
|
103
|
+
</ul>
|
104
|
+
|
105
|
+
{% endif %}
|
106
|
+
|
53
107
|
|
54
108
|
</main>
|
data/_layouts/post.html
CHANGED
data/_sass/_article.scss
CHANGED
@@ -1,29 +1,29 @@
|
|
1
|
-
|
1
|
+
.post > * {
|
2
2
|
margin-left: auto;
|
3
3
|
margin-right: auto;
|
4
4
|
max-width: 36rem;
|
5
5
|
padding: 0 1em;
|
6
6
|
}
|
7
7
|
|
8
|
-
|
8
|
+
.post > h1 {
|
9
9
|
font-size: 2em;
|
10
10
|
max-width: 48rem;
|
11
11
|
padding: 2em 1em;
|
12
12
|
text-align: center;
|
13
13
|
}
|
14
14
|
|
15
|
-
|
15
|
+
.post p {
|
16
16
|
text-align: justify;
|
17
17
|
text-indent: 1.5rem;
|
18
18
|
text-justify: inter-word;
|
19
19
|
}
|
20
20
|
|
21
|
-
|
22
|
-
|
21
|
+
.post p:first-of-type,
|
22
|
+
.post h2 + p {
|
23
23
|
text-indent: 0;
|
24
24
|
}
|
25
25
|
|
26
|
-
|
26
|
+
.post img {
|
27
27
|
margin-left: -1em;
|
28
28
|
display: flex;
|
29
29
|
max-width: 100%;
|
@@ -31,7 +31,7 @@ article img {
|
|
31
31
|
margin: 2em auto;
|
32
32
|
}
|
33
33
|
|
34
|
-
|
34
|
+
.post li {
|
35
35
|
margin-left: 1.5rem;
|
36
36
|
margin-right: 1.5rem;
|
37
37
|
}
|
data/_sass/_base.scss
CHANGED
@@ -2,7 +2,7 @@ body {
|
|
2
2
|
color: $text-color;
|
3
3
|
font-family: "EB Garamond", Garamond, "Times New Roman", serif;
|
4
4
|
font-size: 1.3125em;
|
5
|
-
line-height: 1.
|
5
|
+
line-height: 1.5;
|
6
6
|
}
|
7
7
|
|
8
8
|
h2 {
|
@@ -87,35 +87,6 @@ hr {
|
|
87
87
|
text-align: center;
|
88
88
|
}
|
89
89
|
|
90
|
-
.post-list {
|
91
|
-
margin: 1em 0;
|
92
|
-
list-style: none;
|
93
|
-
}
|
94
|
-
|
95
|
-
.post-link {
|
96
|
-
color: $text-color;
|
97
|
-
display: flex;
|
98
|
-
flex-direction: column-reverse;
|
99
|
-
text-decoration: none;
|
100
|
-
padding: .25em 0;
|
101
|
-
.post-title {
|
102
|
-
display: block;
|
103
|
-
padding: .25em 0;
|
104
|
-
}
|
105
|
-
&:hover .post-title,
|
106
|
-
&:focus .post-title {
|
107
|
-
text-decoration: underline;
|
108
|
-
}
|
109
|
-
@media (min-width: $on-tablet) {
|
110
|
-
display: flex;
|
111
|
-
flex-direction: row;
|
112
|
-
justify-content: space-between;
|
113
|
-
.post-title {
|
114
|
-
margin-right: 4em;
|
115
|
-
}
|
116
|
-
}
|
117
|
-
}
|
118
|
-
|
119
90
|
.post-date {
|
120
91
|
color: $muted-text-color;
|
121
92
|
display: block;
|
data/_sass/_masthead.scss
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
.site-masthead {
|
2
2
|
background: $brand-color;
|
3
3
|
box-sizing: border-box;
|
4
|
-
min-height:
|
5
|
-
padding:
|
4
|
+
min-height: 50vh;
|
5
|
+
padding: 8em 2em;
|
6
6
|
position: relative;
|
7
7
|
|
8
8
|
display: flex;
|
@@ -13,7 +13,7 @@
|
|
13
13
|
|
14
14
|
.site-masthead h1 {
|
15
15
|
font-size: 3em;
|
16
|
-
margin-bottom:
|
16
|
+
margin-bottom: 0;
|
17
17
|
@media (min-width: $on-tablet) {
|
18
18
|
font-size: 6em;
|
19
19
|
}
|
@@ -29,10 +29,7 @@
|
|
29
29
|
}
|
30
30
|
|
31
31
|
.site-navigation {
|
32
|
-
|
33
|
-
bottom: .75em;
|
34
|
-
left: 2em;
|
35
|
-
right: 2em;
|
32
|
+
margin-top: 4rem;
|
36
33
|
}
|
37
34
|
|
38
35
|
.site-navigation ul {
|
@@ -53,4 +50,8 @@
|
|
53
50
|
display: block;
|
54
51
|
padding: .25em .5em;
|
55
52
|
text-decoration: none;
|
53
|
+
&:hover,
|
54
|
+
&:focus {
|
55
|
+
text-decoration: underline;
|
56
|
+
}
|
56
57
|
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
.post-list {
|
2
|
+
margin: 1em 0;
|
3
|
+
list-style: none;
|
4
|
+
}
|
5
|
+
|
6
|
+
.post-link {
|
7
|
+
color: $text-color;
|
8
|
+
display: flex;
|
9
|
+
flex-direction: column-reverse;
|
10
|
+
text-decoration: none;
|
11
|
+
padding: .25em 0;
|
12
|
+
.post-title {
|
13
|
+
display: block;
|
14
|
+
padding: .25em 0;
|
15
|
+
}
|
16
|
+
&:hover .post-title,
|
17
|
+
&:focus .post-title {
|
18
|
+
text-decoration: underline;
|
19
|
+
}
|
20
|
+
@media (min-width: $on-tablet) {
|
21
|
+
display: flex;
|
22
|
+
flex-direction: row;
|
23
|
+
justify-content: space-between;
|
24
|
+
.post-title {
|
25
|
+
margin-right: 4em;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
.post-pagination {
|
31
|
+
margin-top: 4rem;
|
32
|
+
font-size: .75em;
|
33
|
+
display: flex;
|
34
|
+
flex-direction: row;
|
35
|
+
justify-content: space-between;
|
36
|
+
* > {
|
37
|
+
flex-grow: 1;
|
38
|
+
flex-basis: 0;
|
39
|
+
}
|
40
|
+
a {
|
41
|
+
text-decoration: none;
|
42
|
+
text-transform: uppercase;
|
43
|
+
&:hover,
|
44
|
+
&:focus {
|
45
|
+
text-decoration: underline;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
data/assets/css/main.scss
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hitchens-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pat Dryburgh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -61,6 +61,7 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- LICENSE.txt
|
63
63
|
- README.md
|
64
|
+
- _includes/back-link.html
|
64
65
|
- _includes/disqus-comments.html
|
65
66
|
- _includes/google-analytics.html
|
66
67
|
- _layouts/default.html
|
@@ -72,6 +73,7 @@ files:
|
|
72
73
|
- _sass/_font.scss
|
73
74
|
- _sass/_masthead.scss
|
74
75
|
- _sass/_mixins.scss
|
76
|
+
- _sass/_post-list.scss
|
75
77
|
- _sass/_reset.scss
|
76
78
|
- _sass/_syntax-highlighting.scss
|
77
79
|
- _sass/_variables.scss
|