jekyll-dash 1.3.0 → 2.0.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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -5
  3. data/_includes/author.html +12 -3
  4. data/_includes/head.html +0 -1
  5. data/_includes/theme-toggle.html +22 -27
  6. data/_layouts/home.html +8 -1
  7. data/_layouts/post.html +3 -1
  8. data/_layouts/tag_page.html +3 -1
  9. data/_sass/dash.scss +4 -0
  10. data/_sass/dash/_fonts.scss +2 -1
  11. data/_sass/dash/_icons.scss +6 -7
  12. data/_sass/dash/_layout.scss +26 -57
  13. data/_sass/dash/_mixins.scss +2 -2
  14. data/_sass/dash/_themes.scss +1 -1
  15. data/_sass/fa/_animated.scss +20 -0
  16. data/_sass/fa/_bordered-pulled.scss +20 -0
  17. data/_sass/fa/_core.scss +21 -0
  18. data/_sass/fa/_fixed-width.scss +6 -0
  19. data/_sass/fa/_icons.scss +1397 -0
  20. data/_sass/fa/_larger.scss +23 -0
  21. data/_sass/fa/_list.scss +18 -0
  22. data/_sass/fa/_mixins.scss +56 -0
  23. data/_sass/fa/_rotated-flipped.scss +24 -0
  24. data/_sass/fa/_screen-reader.scss +5 -0
  25. data/_sass/fa/_shims.scss +2062 -0
  26. data/_sass/fa/_stacked.scss +31 -0
  27. data/_sass/fa/_variables.scss +1414 -0
  28. data/_sass/fa/brands.scss +22 -0
  29. data/_sass/fa/fontawesome.scss +16 -0
  30. data/_sass/fa/regular.scss +23 -0
  31. data/_sass/fa/solid.scss +24 -0
  32. data/_sass/fa/v4-shims.scss +6 -0
  33. data/assets/css/style.scss +6 -0
  34. data/assets/fonts/fa-brands-400.eot +0 -0
  35. data/assets/fonts/fa-brands-400.svg +3487 -0
  36. data/assets/fonts/fa-brands-400.ttf +0 -0
  37. data/assets/fonts/fa-brands-400.woff +0 -0
  38. data/assets/fonts/fa-brands-400.woff2 +0 -0
  39. data/assets/fonts/fa-regular-400.eot +0 -0
  40. data/assets/fonts/fa-regular-400.svg +803 -0
  41. data/assets/fonts/fa-regular-400.ttf +0 -0
  42. data/assets/fonts/fa-regular-400.woff +0 -0
  43. data/assets/fonts/fa-regular-400.woff2 +0 -0
  44. data/assets/fonts/fa-solid-900.eot +0 -0
  45. data/assets/fonts/fa-solid-900.svg +4667 -0
  46. data/assets/fonts/fa-solid-900.ttf +0 -0
  47. data/assets/fonts/fa-solid-900.woff +0 -0
  48. data/assets/fonts/fa-solid-900.woff2 +0 -0
  49. metadata +43 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4be59164c0e38ade84359bc8fa1d8344db6dffb153ed143afefdef515a83443c
4
- data.tar.gz: '0043099644efd633246f7d850baddf63b46060ddb8d43e780b49b5af0647d343'
3
+ metadata.gz: f29e755db2527c979641ecb23c33b2f262c0f211584ec242afc77484d1c654f7
4
+ data.tar.gz: 805c3a368c4a96784046d9f787cf066b2d156eacdcf4e58609c7ae927e3bad2a
5
5
  SHA512:
6
- metadata.gz: 3ef0a6042fa71660c330d00602d226cd7d38ad68d32149fd7292ddf0028fd74e102f408afd5d71fecac64807791b7235b191ebfe4a822959ef97cad1cbd55d03
7
- data.tar.gz: 0d0e3f59d5c27fd3bd400f5ec9de5032cf7f740182bc5ecfb94af257a17c7a7a7b5f1780cc2bdfcc579004d7f3dea25b1a41b8b1a1a03d17c7ddc0c5e65dc89e
6
+ metadata.gz: 9d1bf17a0e6c40756660b888e7ba6c7f6262afd9999a9e2d29fbe7a054b3e77a2e4de7f442dbdf98a273a4e5aee28cc8c08a4f658897203fe11320aacbc93c27
7
+ data.tar.gz: e14db70d0eb5c5c3ecf4b0d9cb0bfb28ac73ecd3210fd3a86778656f23fcee48ab21eb7e9867c52dd29343ec232bc90915ca37f2c2e60282c6238a1cb13f7a12
data/README.md CHANGED
@@ -1,21 +1,29 @@
1
1
  ![logo](logo.png)
2
2
  --
3
3
 
4
- A dark theme for Jekyll, inspired by Dash UI for Atom. 🌒
4
+ A dark and light theme for Jekyll, inspired by Dash UI for Atom. 🌒☀
5
5
 
6
6
  [![Build Status](https://img.shields.io/travis/bitbrain/braingdx/master.svg?logo=travis&style=flat-square)](https://travis-ci.org/bitbrain/jekyll-dash)
7
7
  [![license](https://img.shields.io/github/license/bitbrain/jekyll-dash.svg?style=flat-square)](LICENSE.MD)
8
8
  ---
9
9
  This theme for [Jekyll](https://jekyllrb.com/) has been inspired by [dash-ui](https://atom.io/themes/dash-ui), a dark theme for [Atom](https://atom.io).
10
10
 
11
- [![design](screenshot.png)](http://bitbrain.github.io)
11
+ [![design](theme.gif)](http://bitbrain.github.io)
12
12
 
13
13
  ## Installation
14
14
 
15
15
  Add this line to your Jekyll site's `Gemfile`:
16
16
 
17
+ For **Jekyll 3**:
17
18
  ```ruby
18
- gem "jekyll-dash"
19
+ gem 'jekyll-dash', '~> 1.0.0'
20
+ ```
21
+
22
+ > Keep in mind: Github pages generation only supports Jekyll 3.8 right now.
23
+
24
+ For **Jekyll 4**:
25
+ ```ruby
26
+ gem 'jekyll-dash', '~> 2.0.0'
19
27
  ```
20
28
 
21
29
  And add this line to your Jekyll site's `_config.yml`:
@@ -30,7 +38,7 @@ And then execute:
30
38
 
31
39
  Or install it yourself as:
32
40
 
33
- $ gem install jekyll-dash
41
+ $ gem install jekyll-dash -v version
34
42
 
35
43
  ## Configuration
36
44
 
@@ -53,7 +61,7 @@ dash:
53
61
  date_format: "%b %-d, %Y"
54
62
 
55
63
  disqus:
56
- shortname: <your-discuss-shortname>
64
+ shortname: <your-disqus-shortname>
57
65
 
58
66
  # generate social links in footer
59
67
  # supported colors: green, red, orange, blue, cyan, pink, teal, yellow, indigo, purple
@@ -67,6 +75,12 @@ dash:
67
75
  - url: https://github.com/bitbrain
68
76
  icon: github-square
69
77
  color: purple
78
+
79
+ show_author: true
80
+
81
+ # Replaces the default avatar provider (gravatar)
82
+ #avatar_source: github
83
+ #github_username: bitbrain
70
84
  ```
71
85
  ## Using this theme directly on Github Pages
72
86
 
@@ -1,6 +1,15 @@
1
1
  <div class="author-box">
2
- {% if site.plugins contains "liquid-md5" %}
3
- <img src="https://gravatar.com/avatar/{{ site.email | downcase | md5 }}?s=256" class="author-avatar" />
4
- {% endif %}
2
+ {% if site.avatar_source == "github" and site.github_username %}
3
+ {% capture avatar_image %}
4
+ https://github.com/{{ site.github_username }}.png
5
+ {% endcapture %}
6
+ {% elsif site.plugins contains "liquid-md5" %}
7
+ {% capture avatar_image %}
8
+ https://gravatar.com/avatar/{{ site.email | downcase | md5 }}?s=256
9
+ {% endcapture %}
10
+ {% endif %}
11
+ {% if avatar_image %}
12
+ <img src="{{ avatar_image }}" class="author-avatar" alt="Avatar" />
13
+ {% endif %}
5
14
  {{ site.description }}
6
15
  </div>
@@ -9,5 +9,4 @@
9
9
  {%- if jekyll.environment == 'production' and site.google_analytics -%}
10
10
  {%- include google-analytics.html -%}
11
11
  {%- endif -%}
12
- <script defer src="https://use.fontawesome.com/releases/v5.8.1/js/all.js" integrity="sha384-g5uSoOSBd7KkhAMlnQILrecXvzst9TdC09/VM+pjDTCM+1il8RHz5fKANTFFb+gQ" crossorigin="anonymous"></script>
13
12
  </head>
@@ -16,53 +16,48 @@
16
16
  </div>
17
17
  <script type="text/javascript">
18
18
  const theme = localStorage.getItem('theme');
19
- if (theme === "dark") {
20
- document.documentElement.setAttribute('data-theme', 'dark');
19
+
20
+ if (theme === "light") {
21
+ document.documentElement.setAttribute('data-theme', 'light');
22
+ } else {
23
+ document.documentElement.setAttribute('data-theme', 'dark');
21
24
  }
22
25
  const userPrefers = getComputedStyle(document.documentElement).getPropertyValue('content');
23
26
 
24
- if (theme === "dark") {
27
+ function activateDarkTheme() {
25
28
  document.getElementById('theme-toggle').checked = true;
26
29
  document.documentElement.setAttribute('data-theme', 'dark');
27
30
  document.documentElement.classList.add('theme--dark');
28
31
  document.documentElement.classList.remove('theme--light');
29
32
  document.getElementById("theme-toggle").className = 'light';
30
- } else if (theme === "light") {
33
+ window.localStorage.setItem('theme', 'dark');
34
+ }
35
+
36
+ function activateLightTheme() {
31
37
  document.getElementById('theme-toggle').checked = false;
32
38
  document.documentElement.setAttribute('data-theme', 'light');
33
39
  document.documentElement.classList.add('theme--light');
34
40
  document.documentElement.classList.remove('theme--dark');
35
41
  document.getElementById("theme-toggle").className = 'dark';
36
- } else if (userPrefers === "dark") {
37
- document.getElementById('theme-toggle').checked = false;
38
- document.documentElement.setAttribute('data-theme', 'dark');
39
- document.documentElement.classList.add('theme--dark');
40
- document.documentElement.classList.remove('theme--light');
41
- window.localStorage.setItem('theme', 'dark');
42
- document.getElementById("theme-toggle").className = 'light';
43
- } else {
44
- document.getElementById('theme-toggle').checked = true;
45
- document.documentElement.setAttribute('data-theme', 'light');
46
- document.documentElement.classList.add('theme--light');
47
- document.documentElement.classList.remove('theme--dark');
48
42
  window.localStorage.setItem('theme', 'light');
49
- document.getElementById("theme-toggle").className = 'dark';
43
+ }
44
+
45
+ if (theme === "dark") {
46
+ activateDarkTheme();
47
+ } else if (theme === "light") {
48
+ activateLightTheme();
49
+ } else if (userPrefers === "light") {
50
+ activateDarkTheme();
51
+ } else {
52
+ activateDarkTheme();
50
53
  }
51
54
 
52
55
  function modeSwitcher() {
53
56
  let currentMode = document.documentElement.getAttribute('data-theme');
54
57
  if (currentMode === "dark") {
55
- document.documentElement.setAttribute('data-theme', 'light');
56
- document.documentElement.classList.add('theme--light');
57
- document.documentElement.classList.remove('theme--dark');
58
- window.localStorage.setItem('theme', 'light');
59
- document.getElementById("theme-toggle").className = 'dark';
58
+ activateLightTheme();
60
59
  } else {
61
- document.documentElement.setAttribute('data-theme', 'dark');
62
- document.documentElement.classList.add('theme--dark');
63
- document.documentElement.classList.remove('theme--light');
64
- window.localStorage.setItem('theme', 'dark');
65
- document.getElementById("theme-toggle").className = 'light';
60
+ activateDarkTheme();
66
61
  }
67
62
  }
68
63
  </script>
@@ -1,7 +1,9 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- {% include author.html %}
4
+ {% unless site.dash.show_author == false %}
5
+ {% include author.html %}
6
+ {% endunless %}
5
7
  {% assign posts_count = paginator.posts | size %}
6
8
  {% if posts_count > 0 %}
7
9
  <h1>recent articles</h1>
@@ -23,6 +25,11 @@ layout: default
23
25
  {% else %}
24
26
  {{ post.date | date: "%b %-d, %Y" }}
25
27
  {% endif %}
28
+ {% if site.show_excerpts == true %}
29
+ <div class="post-excerpt">
30
+ {{ post.content | strip_html | truncatewords: 50 }}
31
+ </div>
32
+ {% endif %}
26
33
  </div>
27
34
  </div>
28
35
  {% endfor %}
@@ -1,7 +1,9 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- {% include author.html %}
4
+ {% unless site.dash.show_author == false %}
5
+ {% include author.html %}
6
+ {% endunless %}
5
7
  <div class="post">
6
8
  <h1 class="post-title">{{ page.title }}</h1>
7
9
  {% if site.plugins contains "jekyll/tagging" %}
@@ -1,7 +1,9 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
- {% include author.html %}
4
+ {% unless site.dash.show_author == false %}
5
+ {% include author.html %}
6
+ {% endunless %}
5
7
  <h1 class="post-title">articles tagged with <a class="tag" href="/tag/{{ page.tag }}/">{{ page.tag }}</a></h1>
6
8
  <div class="post-links">
7
9
  {% for post in site.posts %}
@@ -34,6 +34,10 @@ $spacing-unit: 30px !default;
34
34
 
35
35
  // Import partials.
36
36
  @import
37
+ "fa/fontawesome",
38
+ "fa/solid",
39
+ "fa/regular",
40
+ "fa/brands",
37
41
  "dash/fonts",
38
42
  "dash/icons",
39
43
  "dash/colors",
@@ -11,5 +11,6 @@
11
11
  }
12
12
  }
13
13
 
14
+
14
15
  @include font('Varela Round', '/assets/fonts/VarelaRound-Regular');
15
- @include font('Roboto Mono', '/assets/fonts/RobotoMono-Medium');
16
+ @include font('Roboto Mono', '/assets/fonts/RobotoMono-Medium');
@@ -1,9 +1,8 @@
1
1
  // Font Awesome Icons
2
2
 
3
- $icon-quote-right: "\f10e";
4
- $icon-chevron-right: "\f054";
5
- $icon-check: "\f00c";
6
- $icon-minus: "\f068";
7
- $icon-flask: "\f0c3";
8
- $icon-tag: "\f02b";
9
- $icon-lightbulb: "\f02b";
3
+ $icon-quote-right: fa-content($fa-var-quote-right);
4
+ $icon-chevron-right: fa-content($fa-var-chevron-right);
5
+ $icon-check: fa-content($fa-var-check);
6
+ $icon-minus: fa-content($fa-var-minus);
7
+ $icon-flask: fa-content($fa-var-flask);
8
+ $icon-tag: fa-content($fa-var-tag);
@@ -13,17 +13,12 @@
13
13
  .command_prompt {
14
14
  color: $color-blue;
15
15
  font-size: $base-font-size;
16
-
17
- svg {
18
- width: 20px;
19
- height: 20px;
20
- margin-bottom: -1px;
21
- margin-left: 1px;
22
- }
16
+ margin-left: 0.1em;
23
17
 
24
18
  &:before {
25
19
  content: $icon-chevron-right;
26
20
  @include font-awesome-icon;
21
+ margin-right: 0.2em;
27
22
  }
28
23
  }
29
24
  }
@@ -98,12 +93,7 @@
98
93
  width: 100%;
99
94
  animation: type 2s steps(60, end);
100
95
  margin-bottom: 1em;
101
-
102
- & > svg {
103
- color: $color-blue;
104
- margin-right: 0.6em;
105
- margin-bottom: -1px;
106
- }
96
+ margin-left: 0.5em;
107
97
 
108
98
  &:after {
109
99
  content: "_";
@@ -114,6 +104,8 @@
114
104
  &:before {
115
105
  content: $icon-chevron-right;
116
106
  @include font-awesome-icon;
107
+ margin-right: 0.5em;
108
+ color: $color-blue;
117
109
  }
118
110
  }
119
111
 
@@ -155,17 +147,10 @@
155
147
  list-style: none;
156
148
  margin-left: 0;
157
149
 
158
- svg {
159
- @include themed() {
160
- color: t('list-secondary');
161
- }
162
- margin-right: 0.65em;
163
- margin-bottom: -1px;
164
- }
165
-
166
150
  &:before {
167
151
  content: $icon-check;
168
152
  @include font-awesome-icon;
153
+ margin-right: 0.5em;
169
154
  }
170
155
  }
171
156
 
@@ -185,25 +170,18 @@
185
170
  color: t('quote-primary');
186
171
  }
187
172
 
173
+ & > p {
174
+ display: block;
175
+ padding-left: 3em;
176
+ }
177
+
188
178
  &:before {
189
179
  content: $icon-quote-right;
190
180
  @include font-awesome-icon;
191
- }
192
-
193
- & > svg.svg-inline--fa {
194
- @include themed() {
195
- color: t('quote-primary');
196
- }
181
+ margin-right: -2em;
197
182
  float: left;
198
- width: 3em;
199
- height: 3em;
200
- margin-right: 1em;
201
- }
202
183
 
203
- & > ul > li > svg {
204
- @include themed() {
205
- color: t('quote-primary');
206
- }
184
+ font-size: 2em;
207
185
  }
208
186
 
209
187
  li {
@@ -213,10 +191,6 @@
213
191
  &:before {
214
192
  content: $icon-minus;
215
193
  }
216
-
217
- & > svg {
218
- margin-left: 2em;
219
- }
220
194
  }
221
195
  }
222
196
  }
@@ -226,6 +200,8 @@
226
200
  & > .post-link {
227
201
  font-size: $base-font-size;
228
202
  font-size: $post-link-font-size;
203
+ display: inline-block;
204
+ text-align: initial;
229
205
  }
230
206
 
231
207
  & > .post-meta {
@@ -241,7 +217,7 @@
241
217
  text-align: left;
242
218
  & > a {
243
219
  display: inline-block;
244
- margin-bottom: 1em;
220
+ margin: 0.3em 0.3em 0.3em 0;
245
221
  }
246
222
  }
247
223
 
@@ -260,19 +236,22 @@
260
236
  }
261
237
  }
262
238
 
263
- & > svg {
264
- margin-right: 0.4em;
265
- }
266
-
267
239
  &:before {
268
240
  content: $icon-tag;
269
241
  @include font-awesome-icon;
242
+ margin-right: 0.5em;
270
243
  }
271
244
  }
272
245
 
246
+ .tag {
247
+ display: inline-block;
248
+ margin: 0.3em 0.3em 0.3em 0;
249
+ }
250
+
273
251
  .post-tags {
274
252
  margin-top: 0.3em;
275
253
  margin-bottom: 0.5em;
254
+ text-align: initial;
276
255
  }
277
256
 
278
257
  .credits {
@@ -304,10 +283,6 @@
304
283
  &:hover {
305
284
  text-decoration: none;
306
285
  }
307
-
308
- svg {
309
- padding-left: 0.1em;
310
- }
311
286
  }
312
287
 
313
288
  & > a {
@@ -365,17 +340,11 @@ ul.related-posts {
365
340
  margin: 0;
366
341
  }
367
342
 
368
- & > svg.svg-inline--fa {
369
- color: $color-green;
370
- margin-right: 0.3em;
371
- width: 22px;
372
- height: 22px;
373
- margin-bottom: -2px;
374
- }
375
-
376
343
  &:before {
377
344
  content: $icon-flask;
378
345
  @include font-awesome-icon;
346
+ color: $color-green;
347
+ margin-right: 0.5em;
379
348
  }
380
349
  }
381
350
  }
@@ -402,4 +371,4 @@ ul.related-posts {
402
371
  }
403
372
  color: $color-yellow;
404
373
  }
405
- }
374
+ }
@@ -5,11 +5,11 @@
5
5
  font-variant: normal;
6
6
  text-rendering: auto;
7
7
  font-weight: 900;
8
-
9
- display: none;
10
8
  -webkit-font-smoothing: antialiased;
11
9
  }
12
10
 
11
+ $theme-map: null;
12
+
13
13
  @mixin themed() {
14
14
  @each $theme, $map in $themes {
15
15
  .theme--#{$theme} & {