jekyll-dash 1.3.4 → 1.5.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
  SHA256:
3
- metadata.gz: 076ebeba1856c2e67b9335c861a3e3703be901f642adf07a32bfa7f6b38c535f
4
- data.tar.gz: b2b199bf7876a1e0064c080367c01cf1af09d3ce538a3b563dca92fd0ebaa25f
3
+ metadata.gz: df0f39301e659c4eccf39d3ea95fe379240e09eed9263115231eb12bbf689572
4
+ data.tar.gz: fa83e2b057f22f867a404c574115cef12c3f95b61851f646b59e1ebd90d3ff12
5
5
  SHA512:
6
- metadata.gz: 1875923346d684204e9ac255786b9d029ce60bbf992484bdf73e221450d35852f281ab4411dc6c29b6e819a005f05debacb813600626d14ce9ae77caac8508f7
7
- data.tar.gz: bebbfed3f7ce2b5c35f7bfeff5fba5f861facc8d5188d426c0973a8e01269e197abcbe9536f3ef4074e6b17d819a0f70d4ce3c5591f2fa43eb4db0b025e7dc33
6
+ metadata.gz: '081d5172841184bbbcf307ed86e4c86423ed73e9d17f82da6d2cb328103e54c4724fc3259e01a8846e67f60ad9aa61e2c91d58f2b24c85901d39b190ad2b3776'
7
+ data.tar.gz: ed45a3941b0cc37de4280e8d7ba1f8228553e2686acc4a5636ce08453ca5e14bfd0755881a366b468dd85fc39e2385d061cbfb3cdc25a6cb595d97ebd8241cf1
data/README.md CHANGED
@@ -3,8 +3,10 @@
3
3
 
4
4
  A dark and light theme for Jekyll, inspired by Dash UI for Atom. 🌒☀
5
5
 
6
- [![Build Status](https://img.shields.io/travis/bitbrain/braingdx/master.svg?logo=travis&style=flat-square)](https://travis-ci.org/bitbrain/jekyll-dash)
6
+ ![Build Status](https://github.com/bitbrain/jekyll-dash/actions/workflows/release-gem.yml/badge.svg)
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.1.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
 
@@ -50,10 +60,24 @@ tag_page_layout: tag_page
50
60
  tag_page_dir: tag
51
61
 
52
62
  dash:
63
+ # the way how dates should be displayed
53
64
  date_format: "%b %-d, %Y"
54
65
 
66
+ # (optional) discqus comment configuration
55
67
  disqus:
56
- shortname: <your-disqus-shortname>
68
+ shortname: <your-disqus-shortname>
69
+
70
+ # the animation speed of the post scroll-in effect
71
+ animation_speed: 50
72
+
73
+ # wether to enable Right-to-Left support or not
74
+ rtl: false
75
+
76
+ # Replaces the default avatar provider (gravatar)
77
+ #avatar_source: github
78
+ #github_username: bitbrain
79
+ #avatar_source: local
80
+ #avatar_path: /assets/avatar.png
57
81
 
58
82
  # generate social links in footer
59
83
  # supported colors: green, red, orange, blue, cyan, pink, teal, yellow, indigo, purple
@@ -67,17 +91,17 @@ dash:
67
91
  - url: https://github.com/bitbrain
68
92
  icon: github-square
69
93
  color: purple
70
-
94
+
95
+ # wether the author box should be displayed or not
71
96
  show_author: true
72
97
  ```
73
98
  ## Using this theme directly on Github Pages
74
99
 
75
- 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).
100
+ 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` [separately via Github Actions](https://jekyllrb.com/docs/continuous-integration/github-actions/).
76
101
 
77
- For example, you want to host your own blog on `https://<username>.github.io`. As a result, you require the following repositories:
102
+ * `<username>.github.io` - contains main source branch and orphan gh-pages branch ([see example](https://github.com/bitbrain/bitbrain.github.io))
78
103
 
79
- * `blog` - contains the actual Jekyll sources ([see example](https://github.com/bitbrain/blog))
80
- * `<username>.github.io` - contains generated webpage, pushed automatically via TravisCI ([see example](https://github.com/bitbrain/bitbrain.github.io))
104
+ I have created [a guide on how to set this up here](https://bitbra.in/2021/10/03/host-your-own-blog-for-free-with-custom-domain.html).
81
105
 
82
106
  You are not required to do this, but keep in mind that some functionality might not be available when using the Jekyll generator on Github directly!
83
107
 
@@ -109,6 +133,12 @@ gem "liquid-md5"
109
133
 
110
134
  **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.
111
135
 
136
+ > I am getting an error that Bundler could not find compatible versions for gem
137
+
138
+ **Solution**
139
+
140
+ 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.
141
+
112
142
  ## Contributing
113
143
 
114
144
  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,9 @@
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" />
2
+ {% if site.dash.rtl %}
3
+ <div class="description">{{ site.description }}</div>
4
+ {%- include avatar.html -%}
5
+ {% else %}
6
+ {%- include avatar.html -%}
7
+ <div class="description">{{ site.description }}</div>
4
8
  {% endif %}
5
- {{ site.description }}
6
9
  </div>
@@ -0,0 +1,16 @@
1
+ {% if site.dash.avatar_source == "github" and site.dash.github_username %}
2
+ {% capture avatar_image %}
3
+ https://github.com/{{ site.github_username }}.png
4
+ {% endcapture %}
5
+ {% elsif site.dash.avatar_source == "local" and site.dash.avatar_path %}
6
+ {% capture avatar_image %}
7
+ {{site.dash.avatar_path}}
8
+ {% endcapture %}
9
+ {% elsif site.plugins contains "liquid-md5" %}
10
+ {% capture avatar_image %}
11
+ https://gravatar.com/avatar/{{ site.email | downcase | md5 }}?s=256
12
+ {% endcapture %}
13
+ {% endif %}
14
+ {% if avatar_image %}
15
+ <img src="{{ avatar_image }}" class="author-avatar" alt="Avatar" />
16
+ {% endif %}
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>
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="{{ page.lang | default: site.lang | default: "en" }}">
2
+ <html class="{% if site.dash.rtl %}direction--rtl{% else %}direction--ltr{% endif %}"lang="{{ page.lang | default: site.lang | default: "en" }}">
3
3
 
4
4
  {%- include head.html -%}
5
5
 
data/_layouts/home.html CHANGED
@@ -4,6 +4,7 @@ layout: default
4
4
  {% unless site.dash.show_author == false %}
5
5
  {% include author.html %}
6
6
  {% endunless %}
7
+ {{ content }}
7
8
  {% assign posts_count = paginator.posts | size %}
8
9
  {% if posts_count > 0 %}
9
10
  <h1>recent articles</h1>
@@ -20,11 +21,16 @@ layout: default
20
21
  {% endfor %}
21
22
  </div>
22
23
  {% endif %}
23
- {% if site.date_format %}
24
- {{ post.date | date: site.date_format }}
24
+ {% if site.dash.date_format %}
25
+ {{ post.date | date: site.dash.date_format }}
25
26
  {% else %}
26
27
  {{ post.date | date: "%b %-d, %Y" }}
27
28
  {% endif %}
29
+ {% if site.show_excerpts == true %}
30
+ <div class="post-excerpt">
31
+ {{ post.content | strip_html | truncatewords: 50 }}
32
+ </div>
33
+ {% endif %}
28
34
  </div>
29
35
  </div>
30
36
  {% endfor %}
data/_layouts/post.html CHANGED
@@ -15,7 +15,10 @@ layout: default
15
15
  {% endif %}
16
16
  <div class="post-date">Published on {{ page.date | date_to_string }}</div>
17
17
  {% if page.description != null %}
18
- <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>
19
22
  {% endif %}
20
23
  {{ content }}
21
24
  </div>
@@ -44,3 +47,45 @@ layout: default
44
47
  </div>
45
48
  {% endif %}
46
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>
@@ -20,8 +20,8 @@ layout: default
20
20
  <a class="tag" href="/tag/{{ tag }}/">{{ tag }}</a>
21
21
  {% endfor %}
22
22
  </div>
23
- {% if site.date_format %}
24
- {{ post.date | date: site.date_format }}
23
+ {% if site.dash.date_format %}
24
+ {{ post.date | date: site.dash.date_format }}
25
25
  {% else %}
26
26
  {{ post.date | date: "%b %-d, %Y" }}
27
27
  {% endif %}
@@ -52,21 +52,75 @@
52
52
  }
53
53
 
54
54
  /**
55
- * Author box
55
+ * Right-to-Left support
56
56
  */
57
57
 
58
+ html.direction--rtl {
59
+ .author-box {
60
+ text-align: right;
61
+ & > .description {
62
+ direction: rtl;
63
+ }
64
+ & > img {
65
+ margin-right: 0em;
66
+ margin-left: 1em;
67
+ }
68
+ }
69
+ ol > li, ul > li {
70
+ text-align: right;
71
+ direction: rtl;
72
+ &::before {
73
+ float: right;
74
+ margin-left: 0.5em;
75
+ }
76
+ }
77
+ h1, h2, h3, h4, h5, h6 {
78
+ direction: rtl;
79
+ text-align: right;
80
+ }
81
+ .post-link-wrapper {
82
+ direction: rtl;
83
+ }
84
+ .post {
85
+ direction: rtl;
86
+ }
87
+ .pagination {
88
+ text-align: right;
89
+ }
90
+ .tag-cloud {
91
+ direction: rtl;
92
+ text-align: right;
93
+ }
94
+ .related-posts {
95
+ direction: rtl;
96
+ text-align: right;
97
+
98
+ & > li::before {
99
+ margin-right: 0;
100
+ margin-left: 0.5em;
101
+ }
102
+ }
103
+ pre {
104
+ direction: ltr;
105
+ text-align: left;
106
+ }
107
+ }
108
+
58
109
  .author-box {
59
110
  margin-bottom: 1em;
60
111
  text-align: left;
61
112
  min-height: 72px;
62
113
  font-style: italic;
114
+ display: inline-flex;
115
+ & > .description {
116
+ flex:8;
117
+ }
63
118
  & > .author-avatar {
64
- float: left;
65
- white-space: pre-line;
66
119
  margin-right: 1em;
67
120
  width: 72px;
68
- height: 72px;
121
+ height: 100%;
69
122
  border-radius: 0.3em;
123
+ flex: 1;
70
124
  }
71
125
  }
72
126
 
@@ -88,10 +142,8 @@
88
142
  @include themed() {
89
143
  color: t('foreground-color');
90
144
  }
91
- white-space: nowrap;
92
145
  overflow: hidden;
93
146
  width: 100%;
94
- animation: type 2s steps(60, end);
95
147
  margin-bottom: 1em;
96
148
  margin-left: 0.5em;
97
149
 
@@ -171,7 +223,7 @@
171
223
  }
172
224
 
173
225
  & > p {
174
- display: block;
226
+ display: inline-block;
175
227
  padding-left: 3em;
176
228
  }
177
229
 
@@ -184,6 +236,10 @@
184
236
  font-size: 2em;
185
237
  }
186
238
 
239
+ & > ul {
240
+ margin-left: 3em;
241
+ }
242
+
187
243
  li {
188
244
  @include themed() {
189
245
  color: t('quote-secondary');
@@ -371,4 +427,8 @@ ul.related-posts {
371
427
  }
372
428
  color: $color-yellow;
373
429
  }
430
+ }
431
+
432
+ .modal{
433
+ cursor: pointer;
374
434
  }
data/assets/avatar.png ADDED
Binary file