hitchens-theme 0.5.0 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a071cff5270aca2b7c2fea9d848789d5a86cb8b
4
- data.tar.gz: 7987ed8efbac19c71532d200cc338eff96575481
3
+ metadata.gz: 848dd09026adddac19a4acb55fcb1b192b301080
4
+ data.tar.gz: 9fc6eff55c8901dcbfd64c402b62f1a4937b30d6
5
5
  SHA512:
6
- metadata.gz: f2c5e9d01aae90e8d685c69ff3112a44f5421a719327fe6b17243097aca09e7c71303b77f0848f423e471b09c8071a90795b2f8d407daf6fa56d77a9817ac5a1
7
- data.tar.gz: 5768360a3fc73155b3d10986470ec8afe411f751ba403c457f2c86ad15286801283e3dae82cddb68b282596c84309af9b733000ac347fa98610596dd8da3c825
6
+ metadata.gz: 71f0cfe7006063bc92b02312a948f3b062daef4ab0ad129482972620e77483270e6924e5750dd9b7a838fdc3db31fb48f4fc9ec880221a894db1781c539f3470
7
+ data.tar.gz: 35e2be73ed4563fde09e9603c3717b591de562c3f6dcc941bfb3926d5de4f7b1555bce817500414e4757f511b3bcc5d02a56d647fe0a48cf8873731a154a1570
data/README.md CHANGED
@@ -3,7 +3,7 @@ layout: page
3
3
  title: "Hitchens"
4
4
  ---
5
5
 
6
- An inarguably well-designed [Jekyll](http://jekyllrb.com) theme.
6
+ An inarguably well-designed [Jekyll](http://jekyllrb.com) theme by [Pat Dryburgh](https://patdryburgh.com).
7
7
 
8
8
  ![Hitchens Preview](https://raw.githubusercontent.com/patdryburgh/hitchens/master/screenshot.png)
9
9
 
@@ -136,8 +136,6 @@ layout: post
136
136
 
137
137
  ### Icons
138
138
 
139
-
140
-
141
139
  The [JSON Feed spec](https://jsonfeed.org/version/1) states that feeds should include an icon. To add your icon, add the following line in your site's `_config.yml` file:
142
140
 
143
141
  ```
@@ -146,8 +144,6 @@ feed_icon: /assets/images/icon-512.png
146
144
 
147
145
  Then, replace the `/assets/images/icon-512.png` file with your own image.
148
146
 
149
-
150
-
151
147
  ### Credits
152
148
 
153
149
  The theme credits that appear at the bottom of each page can be turned off by including the following line in your site's `_config.yml` file:
@@ -156,6 +152,14 @@ The theme credits that appear at the bottom of each page can be turned off by in
156
152
  hide_credits: true
157
153
  ```
158
154
 
155
+ ### Search
156
+
157
+ The theme uses a [custom DuckDuckGo Search Form](https://patdryburgh.com/blog/adding-a-custom-duckduckgo-search-bar-to-your-site/) that can be turned off by including the following line in your site's `_config.yml` file:
158
+
159
+ ```
160
+ hide_search: true
161
+ ```
162
+
159
163
  ### Font
160
164
 
161
165
  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) :)
data/_includes/menu.html CHANGED
@@ -1,7 +1,7 @@
1
1
  {% assign menu = site.data.menu %}
2
2
 
3
3
  {% if menu %}
4
- <nav class="site-navigation">
4
+ <nav class="site-navigation" role="navigation">
5
5
  <ul>
6
6
  <li>
7
7
  <a href="{{ '/' | prepend: site.baseurl }}">
@@ -0,0 +1,8 @@
1
+ <form method="get" id="search" action="https://duckduckgo.com/">
2
+ <input type="hidden" name="sites" value="{{ site.url }}"/>
3
+ <input type="hidden" name="k8" value="#222222"/>
4
+ <input type="hidden" name="k9" value="#dc4b3c"/>
5
+ <input type="hidden" name="kt" value="h"/>
6
+ <input type="text" id="search__input" name="q" placeholder="Search&hellip;"/ autocomplete="off">
7
+ <button type="submit" class="btn btn-bordered" tabindex="-1">Search</button>
8
+ </form>
@@ -19,8 +19,22 @@
19
19
  </head>
20
20
  <body>
21
21
 
22
+ {% if page.layout == 'home' %}
23
+ <a href="#main" class="skip-navigation">
24
+ Skip to list of posts
25
+ </a>
26
+ {% else %}
27
+ <a href="#main" class="skip-navigation">
28
+ Skip to content
29
+ </a>
30
+ {% endif %}
31
+
22
32
  {{ content }}
23
33
 
34
+ {% unless site.hide_search %}
35
+ {% include search.html %}
36
+ {% endunless %}
37
+
24
38
  {% include menu.html %}
25
39
 
26
40
  {% unless site.hide_credits %}
data/_layouts/home.html CHANGED
@@ -22,7 +22,7 @@ layout: default
22
22
  </header>
23
23
  {% endif %}
24
24
 
25
- <main class="home" aria-label="Content">
25
+ <main class="home" id="main" role="main" aria-label="Content">
26
26
 
27
27
  <h1 class="content-title divided">
28
28
  {% if site.paginate and site.paginate_path and paginator.page > 1 %}
data/_layouts/post.html CHANGED
@@ -8,7 +8,7 @@ layout: default
8
8
  {% include back-link.html %}
9
9
  {% endif %}
10
10
 
11
- <article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
11
+ <article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting" id="main" role="article" aria-label="Content">
12
12
 
13
13
  {% if page.title != "" %}
14
14
  <h1 class="post-title divided p-name" itemprop="name headline">
data/_sass/_article.scss CHANGED
@@ -23,10 +23,16 @@
23
23
  text-indent: 0;
24
24
  }
25
25
 
26
+ .post dl,
27
+ .post ul,
28
+ .post ol {
29
+ margin: 1.5em;
30
+ }
31
+
26
32
  .post li {
27
33
  margin-left: 1.5rem;
28
34
  margin-right: 1.5rem;
29
- }
35
+ }
30
36
 
31
37
  .post-content:first-child {
32
38
  margin-top: 4em;
data/_sass/_base.scss CHANGED
@@ -1,6 +1,6 @@
1
1
  body {
2
2
  color: $text-color;
3
- font-family: "EB Garamond", Garamond, "Times New Roman", serif;
3
+ font-family: $font-family;
4
4
  font-size: 1.3125em;
5
5
  line-height: 1.5;
6
6
  }
@@ -55,6 +55,14 @@ a {
55
55
  color: $text-color;
56
56
  }
57
57
 
58
+ a:hover {
59
+ background: $highlight;
60
+ }
61
+
62
+ a:focus {
63
+ outline: 1px dashed $text-color;
64
+ }
65
+
58
66
  blockquote {
59
67
  margin: 2em auto;
60
68
  opacity: .8;
@@ -134,4 +142,24 @@ figcaption {
134
142
  margin: 0 auto 2em;
135
143
  padding: 0 2em;
136
144
  text-align: center;
145
+ }
146
+
147
+ .skip-navigation {
148
+ background: $brand-color;
149
+ border: 1px dashed transparent;
150
+ display: block;
151
+ font-size: .875em;
152
+ font-weight: 700;
153
+ margin-top: -2.625rem;
154
+ padding: .5rem;
155
+ text-align: center;
156
+ text-decoration: none;
157
+ text-transform: uppercase;
158
+ transition: all .125s ease-in-out;
159
+ &:hover,
160
+ &:focus {
161
+ background: lighten($brand-color, 2.5%);
162
+ border-color: $text-color;
163
+ margin-top: 0;
164
+ }
137
165
  }
data/_sass/_menu.scss CHANGED
@@ -1,5 +1,6 @@
1
1
  .site-navigation {
2
2
  margin-top: 2rem;
3
+ padding: 0 1rem;
3
4
  }
4
5
 
5
6
  .site-navigation ul {
@@ -12,7 +12,7 @@
12
12
  display: flex;
13
13
  flex-direction: column-reverse;
14
14
  text-decoration: none;
15
- padding: .25em 0;
15
+ padding: .25em;
16
16
  @media (min-width: $on-tablet) {
17
17
  display: flex;
18
18
  flex-direction: row;
@@ -0,0 +1,20 @@
1
+ #search {
2
+ margin: 0 auto;
3
+ padding: 0 1rem;
4
+ text-align: center;
5
+ }
6
+
7
+ #search__input {
8
+ border: 0;
9
+ font: 1em $font-family;
10
+ padding: .5em;
11
+ color: $text-color;
12
+ text-align: center;
13
+ &:focus {
14
+ outline: 1px dashed $text-color;
15
+ }
16
+ }
17
+
18
+ #search button[type="submit"] {
19
+ display: none;
20
+ }
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  code.highlighter-rouge {
6
- background: #eef;
6
+ background: $highlight;
7
7
  font-family: courier, monospace;
8
8
  font-size: .875em;
9
9
  }
@@ -19,7 +19,7 @@ code.highlighter-rouge {
19
19
  }
20
20
 
21
21
  .highlighter-rouge & {
22
- background: #eef;
22
+ background: $highlight;
23
23
  }
24
24
 
25
25
  .c { color: #998; font-style: italic } // Comment
@@ -1,6 +1,8 @@
1
1
  $brand-color: #f2e300;
2
+ $highlight: lighten($brand-color, 35%);
2
3
  $text-color: #0b0404;
3
4
  $muted-text-color: #79785b;
5
+ $font-family: "EB Garamond", Garamond, "Times New Roman", serif;
4
6
 
5
7
  $on-bigphone: 375px;
6
8
  $on-tablet: 768px;
data/assets/css/main.scss CHANGED
@@ -16,5 +16,6 @@ $asset_url: '{{ '/assets' | absolute_url }}';
16
16
  "menu",
17
17
  "post-list",
18
18
  "article",
19
- "footnotes"
19
+ "footnotes",
20
+ "search"
20
21
  ;
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.5.0
4
+ version: 0.6.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-10-19 00:00:00.000000000 Z
11
+ date: 2018-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -67,6 +67,7 @@ files:
67
67
  - _includes/menu.html
68
68
  - _includes/post-excerpt.html
69
69
  - _includes/post-list-item.html
70
+ - _includes/search.html
70
71
  - _layouts/default.html
71
72
  - _layouts/home.html
72
73
  - _layouts/page.html
@@ -80,6 +81,7 @@ files:
80
81
  - _sass/_mixins.scss
81
82
  - _sass/_post-list.scss
82
83
  - _sass/_reset.scss
84
+ - _sass/_search.scss
83
85
  - _sass/_syntax-highlighting.scss
84
86
  - _sass/_variables.scss
85
87
  - assets/css/main.scss