jekyll-dash 1.3.1 → 1.3.5

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
  SHA256:
3
- metadata.gz: e8bd89c0755e5356b45230261a258f5b2e0f30a6a0333ed3ff281d0e53035271
4
- data.tar.gz: eb823e5bea6157a0db3b7a29b467048074e3dbc8e46bea8afbbe5edc768d4cb1
3
+ metadata.gz: 86f04b81ad4187386d150a31f2e56cbe2ff90b3e3f620fa00068686165b38eee
4
+ data.tar.gz: f1fcde4a0bfc7504360a2c899d193e72b6faba8fc729ad24e8500803033c70e5
5
5
  SHA512:
6
- metadata.gz: 720501145ef7f3a3c609987ef0a3d36ce82fbb2406a0db4635c0c248c52cae3a0590568fd252b5f2001f85269383073b9f94889d10659182c5c104d312b68f86
7
- data.tar.gz: 9f3f824725435d704428e9086640721383be090ef2932842a7b28fc360930765dfdce999ad77b981d531c9cef630fe3d89961cc1700984666bfcde1a76d9cda1
6
+ metadata.gz: f4d3461936484aa3e947105f009c4b9bd568cb7556293341cd0656f923788d5c51eb226d7b95636b3ed45e2b1d397ab96f7269492505ec3a1b55c73feb1a992d
7
+ data.tar.gz: fe410766ad9ae71ead6fee0f404be1df9b3edb936e3b1e9056a24b8d8cecd8687b0c4457c03fdf3932887f446a2f00d7c26de37c6cb698d380281386c4461e4d
data/README.md CHANGED
@@ -5,6 +5,8 @@ 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
+ [![Gem](https://img.shields.io/gem/v/jekyll-dash.svg?style=flat)](http://rubygems.org/gems/jekyll-dash "View this project in Rubygems")
9
+ [![Downloads](https://ruby-gem-downloads-badge.herokuapp.com/jekyll-dash)](https://rubygems.org/gems/jekyll-dash "Number of Gem downloads")
8
10
  ---
9
11
  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
12
 
@@ -14,8 +16,16 @@ This theme for [Jekyll](https://jekyllrb.com/) has been inspired by [dash-ui](ht
14
16
 
15
17
  Add this line to your Jekyll site's `Gemfile`:
16
18
 
19
+ For **Jekyll 3**:
17
20
  ```ruby
18
- gem "jekyll-dash"
21
+ gem 'jekyll-dash', '~> 1.0.0'
22
+ ```
23
+
24
+ > Keep in mind: Github pages generation only supports Jekyll 3.8 right now.
25
+
26
+ For **Jekyll 4**:
27
+ ```ruby
28
+ gem 'jekyll-dash', '~> 2.0.0'
19
29
  ```
20
30
 
21
31
  And add this line to your Jekyll site's `_config.yml`:
@@ -30,7 +40,7 @@ And then execute:
30
40
 
31
41
  Or install it yourself as:
32
42
 
33
- $ gem install jekyll-dash
43
+ $ gem install jekyll-dash -v version
34
44
 
35
45
  ## Configuration
36
46
 
@@ -53,7 +63,7 @@ dash:
53
63
  date_format: "%b %-d, %Y"
54
64
 
55
65
  disqus:
56
- shortname: <your-discuss-shortname>
66
+ shortname: <your-disqus-shortname>
57
67
 
58
68
  # generate social links in footer
59
69
  # supported colors: green, red, orange, blue, cyan, pink, teal, yellow, indigo, purple
@@ -67,10 +77,16 @@ dash:
67
77
  - url: https://github.com/bitbrain
68
78
  icon: github-square
69
79
  color: purple
80
+
81
+ show_author: true
82
+
83
+ # Replaces the default avatar provider (gravatar)
84
+ #avatar_source: github
85
+ #github_username: bitbrain
70
86
  ```
71
87
  ## Using this theme directly on Github Pages
72
88
 
73
- Please keep in mind that Github Pages does only support [a limited list of Jekyll plugins](https://help.github.com/en/articles/configuring-jekyll-plugins#default-plugins). You will be able to use this theme on Github Pages but some functionality might not be available, for example displaying tags. In order to use this theme to a full extend, you have to generate the `_site` externally, for example on [TravisCI](https://travis-ci.org).
89
+ Please keep in mind that Github Pages does only support [a limited list of Jekyll plugins](https://pages.github.com/versions/). You will be able to use this theme on Github Pages but some functionality might not be available, for example displaying tags. In order to use this theme to a full extend, you have to generate the `_site` externally, for example on [TravisCI](https://travis-ci.org).
74
90
 
75
91
  For example, you want to host your own blog on `https://<username>.github.io`. As a result, you require the following repositories:
76
92
 
@@ -107,6 +123,12 @@ gem "liquid-md5"
107
123
 
108
124
  **Solution**: as described above you have to add the tagging plugin. Additionally, tags do not work natively by Github Pages. You have to build your site on an external CI and push the `_site` artifacts to a hosting repository.
109
125
 
126
+ > I am getting an error that Bundler could not find compatible versions for gem
127
+
128
+ **Solution**
129
+
130
+ Make sure you are using a version of this theme that is compatible with Jekyll. Version 1.x is only compatible with Jekyll 3.x while Version 2.x is only compatible with Jekyll 4.x.
131
+
110
132
  ## Contributing
111
133
 
112
134
  Bug reports and pull requests are welcome on GitHub at https://github.com/bitbrain/jekyll-dash. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -1,6 +1,19 @@
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.avatar_source == "local" and site.avatar_path %}
7
+ {% capture avatar_image %}
8
+ {{site.avatar_path}}
9
+ {% endcapture %}
10
+ {% elsif site.plugins contains "liquid-md5" %}
11
+ {% capture avatar_image %}
12
+ https://gravatar.com/avatar/{{ site.email | downcase | md5 }}?s=256
13
+ {% endcapture %}
14
+ {% endif %}
15
+ {% if avatar_image %}
16
+ <img src="{{ avatar_image }}" class="author-avatar" alt="Avatar" />
17
+ {% endif %}
5
18
  {{ site.description }}
6
19
  </div>
data/_includes/head.html CHANGED
@@ -5,8 +5,11 @@
5
5
  {%- seo -%}
6
6
  <link rel="stylesheet" href="{{ "/assets/css/style.css" | relative_url }}">
7
7
  <link rel="icon" type="image/png" href="{{ "/assets/favicon.png" | relative_url }}" />
8
+ <link rel="stylesheet" href="{{ "/assets/css/magnific-popup.css" | relative_url }}">
8
9
  {%- feed_meta -%}
9
10
  {%- if jekyll.environment == 'production' and site.google_analytics -%}
10
11
  {%- include google-analytics.html -%}
11
12
  {%- endif -%}
13
+ <script src="https://code.jquery.com/jquery-3.2.0.min.js"></script>
14
+ <script src="{{ "/assets/js/jquery.magnific-popup.js" | relative_url }}"></script>
12
15
  </head>
@@ -2,7 +2,13 @@
2
2
  <div class="wrapper">
3
3
  <a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}<b class="command_prompt"></b><b class="blinking_cursor">_</b></a>
4
4
  <span class="social_links">
5
- {% for link in site.dash.social_links %}<a class="color-{{ link.color }}-hover" href="{{ link.url }}"><i class="fab fa-{{ link.icon }}"></i></a>{% endfor %}
5
+ {% for link in site.dash.social_links %}
6
+ {% if link.fa == true %}
7
+ <a class="color-{{ link.color }}-hover" href="{{ link.url }}"><i class="fa fa-{{ link.icon }}"></i></a>
8
+ {% else %}
9
+ <a class="color-{{ link.color }}-hover" href="{{ link.url }}"><i class="fab fa-{{ link.icon }}"></i></a>
10
+ {% endif %}
11
+ {% endfor %}
6
12
  </span>
7
13
  </div>
8
14
  </div>
@@ -16,13 +16,11 @@
16
16
  </div>
17
17
  <script type="text/javascript">
18
18
  const theme = localStorage.getItem('theme');
19
- if (theme === 'undefined') {
20
- theme = "dark";
21
- }
22
- if (theme === "dark") {
23
- document.documentElement.setAttribute('data-theme', 'dark');
24
- } else {
19
+
20
+ if (theme === "light") {
25
21
  document.documentElement.setAttribute('data-theme', 'light');
22
+ } else {
23
+ document.documentElement.setAttribute('data-theme', 'dark');
26
24
  }
27
25
  const userPrefers = getComputedStyle(document.documentElement).getPropertyValue('content');
28
26
 
data/_layouts/home.html CHANGED
@@ -1,7 +1,10 @@
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 %}
7
+ {{ content }}
5
8
  {% assign posts_count = paginator.posts | size %}
6
9
  {% if posts_count > 0 %}
7
10
  <h1>recent articles</h1>
@@ -18,11 +21,16 @@ layout: default
18
21
  {% endfor %}
19
22
  </div>
20
23
  {% endif %}
21
- {% if site.date_format %}
22
- {{ post.date | date: site.date_format }}
24
+ {% if site.dash.date_format %}
25
+ {{ post.date | date: site.dash.date_format }}
23
26
  {% else %}
24
27
  {{ post.date | date: "%b %-d, %Y" }}
25
28
  {% endif %}
29
+ {% if site.show_excerpts == true %}
30
+ <div class="post-excerpt">
31
+ {{ post.content | strip_html | truncatewords: 50 }}
32
+ </div>
33
+ {% endif %}
26
34
  </div>
27
35
  </div>
28
36
  {% endfor %}
data/_layouts/post.html CHANGED
@@ -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" %}
@@ -13,7 +15,10 @@ layout: default
13
15
  {% endif %}
14
16
  <div class="post-date">Published on {{ page.date | date_to_string }}</div>
15
17
  {% if page.description != null %}
16
- <div class="post-description">{{ page.description }}</div>
18
+ <noscript>
19
+ <div class="post-description">{{ page.description }}</div>
20
+ </noscript>
21
+ <div id="animated-post-description" class="post-description" style="display: none;"></div>
17
22
  {% endif %}
18
23
  {{ content }}
19
24
  </div>
@@ -42,3 +47,45 @@ layout: default
42
47
  </div>
43
48
  {% endif %}
44
49
  {% include tagcloud.html %}
50
+
51
+ {% assign animation_speed = site.dash.animation_speed | default: 50 %}
52
+ <script>
53
+ let i = 0;
54
+ const text = '{{ page.description }}';
55
+ const speed = parseInt('{{ animation_speed }}');
56
+
57
+ function typeWriter() {
58
+ if (i < text.length) {
59
+ document.getElementById('animated-post-description').innerHTML += text.charAt(i);
60
+ i++;
61
+ setTimeout(typeWriter, speed);
62
+ }
63
+ }
64
+
65
+ document.getElementById('animated-post-description').style.display = 'initial';
66
+ typeWriter();
67
+
68
+ // Image modal
69
+ var $imgs = [];
70
+ $('img').each(function(idx) {
71
+ var obj = {
72
+ src: $(this).attr('src')
73
+ }
74
+ $imgs.push(obj);
75
+ var elem = $(this);
76
+ $(this).click(function() {
77
+ $('.modal').magnificPopup('open', idx);
78
+ });
79
+ });
80
+
81
+ $('.modal').magnificPopup({
82
+ items: $imgs,
83
+ type: 'image',
84
+ closeOnContentClick: true,
85
+ mainClass: 'mfp-img-mobile',
86
+ image: {
87
+ verticalFit: true
88
+ }
89
+
90
+ });
91
+ </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
  <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 %}
@@ -18,8 +20,8 @@ layout: default
18
20
  <a class="tag" href="/tag/{{ tag }}/">{{ tag }}</a>
19
21
  {% endfor %}
20
22
  </div>
21
- {% if site.date_format %}
22
- {{ post.date | date: site.date_format }}
23
+ {% if site.dash.date_format %}
24
+ {{ post.date | date: site.dash.date_format }}
23
25
  {% else %}
24
26
  {{ post.date | date: "%b %-d, %Y" }}
25
27
  {% endif %}
@@ -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
  }
@@ -93,17 +88,10 @@
93
88
  @include themed() {
94
89
  color: t('foreground-color');
95
90
  }
96
- white-space: nowrap;
97
91
  overflow: hidden;
98
92
  width: 100%;
99
- animation: type 2s steps(60, end);
100
93
  margin-bottom: 1em;
101
-
102
- & > svg {
103
- color: $color-blue;
104
- margin-right: 0.6em;
105
- margin-bottom: -1px;
106
- }
94
+ margin-left: 0.5em;
107
95
 
108
96
  &:after {
109
97
  content: "_";
@@ -114,6 +102,8 @@
114
102
  &:before {
115
103
  content: $icon-chevron-right;
116
104
  @include font-awesome-icon;
105
+ margin-right: 0.5em;
106
+ color: $color-blue;
117
107
  }
118
108
  }
119
109
 
@@ -155,17 +145,10 @@
155
145
  list-style: none;
156
146
  margin-left: 0;
157
147
 
158
- svg {
159
- @include themed() {
160
- color: t('list-secondary');
161
- }
162
- margin-right: 0.65em;
163
- margin-bottom: -1px;
164
- }
165
-
166
148
  &:before {
167
149
  content: $icon-check;
168
150
  @include font-awesome-icon;
151
+ margin-right: 0.5em;
169
152
  }
170
153
  }
171
154
 
@@ -185,25 +168,18 @@
185
168
  color: t('quote-primary');
186
169
  }
187
170
 
171
+ & > p {
172
+ display: block;
173
+ padding-left: 3em;
174
+ }
175
+
188
176
  &:before {
189
177
  content: $icon-quote-right;
190
178
  @include font-awesome-icon;
191
- }
192
-
193
- & > svg.svg-inline--fa {
194
- @include themed() {
195
- color: t('quote-primary');
196
- }
179
+ margin-right: -2em;
197
180
  float: left;
198
- width: 3em;
199
- height: 3em;
200
- margin-right: 1em;
201
- }
202
181
 
203
- & > ul > li > svg {
204
- @include themed() {
205
- color: t('quote-primary');
206
- }
182
+ font-size: 2em;
207
183
  }
208
184
 
209
185
  li {
@@ -213,10 +189,6 @@
213
189
  &:before {
214
190
  content: $icon-minus;
215
191
  }
216
-
217
- & > svg {
218
- margin-left: 2em;
219
- }
220
192
  }
221
193
  }
222
194
  }
@@ -226,6 +198,8 @@
226
198
  & > .post-link {
227
199
  font-size: $base-font-size;
228
200
  font-size: $post-link-font-size;
201
+ display: inline-block;
202
+ text-align: initial;
229
203
  }
230
204
 
231
205
  & > .post-meta {
@@ -241,7 +215,7 @@
241
215
  text-align: left;
242
216
  & > a {
243
217
  display: inline-block;
244
- margin-bottom: 1em;
218
+ margin: 0.3em 0.3em 0.3em 0;
245
219
  }
246
220
  }
247
221
 
@@ -260,19 +234,22 @@
260
234
  }
261
235
  }
262
236
 
263
- & > svg {
264
- margin-right: 0.4em;
265
- }
266
-
267
237
  &:before {
268
238
  content: $icon-tag;
269
239
  @include font-awesome-icon;
240
+ margin-right: 0.5em;
270
241
  }
271
242
  }
272
243
 
244
+ .tag {
245
+ display: inline-block;
246
+ margin: 0.3em 0.3em 0.3em 0;
247
+ }
248
+
273
249
  .post-tags {
274
250
  margin-top: 0.3em;
275
251
  margin-bottom: 0.5em;
252
+ text-align: initial;
276
253
  }
277
254
 
278
255
  .credits {
@@ -304,10 +281,6 @@
304
281
  &:hover {
305
282
  text-decoration: none;
306
283
  }
307
-
308
- svg {
309
- padding-left: 0.1em;
310
- }
311
284
  }
312
285
 
313
286
  & > a {
@@ -365,17 +338,11 @@ ul.related-posts {
365
338
  margin: 0;
366
339
  }
367
340
 
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
341
  &:before {
377
342
  content: $icon-flask;
378
343
  @include font-awesome-icon;
344
+ color: $color-green;
345
+ margin-right: 0.5em;
379
346
  }
380
347
  }
381
348
  }
@@ -403,3 +370,7 @@ ul.related-posts {
403
370
  color: $color-yellow;
404
371
  }
405
372
  }
373
+
374
+ .modal{
375
+ cursor: pointer;
376
+ }
@@ -5,8 +5,6 @@
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
 
@@ -3,7 +3,7 @@ $themes: (
3
3
  background-color: $color-background-dark,
4
4
  background-color-alt: $color-background-darker,
5
5
  foreground-color: $color-foreground,
6
- foreground-color-alt: $color-foreground-dark,
6
+ foreground-color-alt: lighten($color-foreground-dark, 10%),
7
7
  foreground-color-contrast: white,
8
8
  quote-primary: lighten($color-yellow, 20%),
9
9
  quote-secondary: $color-yellow,
data/_sass/dash.scss CHANGED
@@ -36,6 +36,7 @@ $spacing-unit: 30px !default;
36
36
  @import
37
37
  "fa/fontawesome",
38
38
  "fa/solid",
39
+ "fa/regular",
39
40
  "fa/brands",
40
41
  "dash/fonts",
41
42
  "dash/icons",
data/assets/avatar.png ADDED
Binary file