benjeto-jekyll-theme 0.1.5 → 0.1.7

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: 39604a7910dd5e0f815291647d0cba1b1bb2e8d4b802c27e17a87684b77f7f11
4
- data.tar.gz: 17c1143a2bd667f75afb0bcf763bef38a50fbb54c7cb9974bf8e995bd6dcdee7
3
+ metadata.gz: 77c4cf9a9ced53e2589bd5d2d829ce129b2d108778cc4313f3fd6b852a6ef06e
4
+ data.tar.gz: e1957eb102a9bda74a2cbf3040e0149f3aa0aa8456ff4a2edf3003c6260d1899
5
5
  SHA512:
6
- metadata.gz: 5dbb8e8f4ffb9fa78ea0997980265664f034ca173b5ad2d3a23865b158b81d2e87ff9e5212b05650dd3b2743793e9a9254dbf8cca8a15aacc09b2b93d2eeb9e1
7
- data.tar.gz: baac1d523a117e9e327a9aeff8036a4e928e6b8a24585f237a114c9fb396299ef23918bce21aebea2fcefffe3528f031c629226a2a9c8d91e73fc9158cc5941d
6
+ metadata.gz: fe9856722240baf442035b6e1546b58f9bf821c61e5f52b8c4e5d04951c02187a9b6955cb23ea8f3727985dd8b482b3f31450491f9f2a912991753b311dc4fca
7
+ data.tar.gz: de63b3cbfaf47b23b893358677603759ccbe1b0d7afc21689670541bfa60ecf188cd1d34306b39dc1657f1661c83ccba5954e1c827e1bc97606572896b767b4a
data/README.md CHANGED
@@ -8,7 +8,7 @@ This theme is perfect for sharing short posts or updates as well as long article
8
8
  - Supports multilingual functionality with [jekyll-polyglot](https://github.com/untra/polyglot), including RTL.
9
9
  - Compatible with [jekyll-paginate](https://github.com/jekyll/jekyll-paginate) and [jekyll-paginate-v2](https://github.com/sverrirs/jekyll-paginate-v2).
10
10
 
11
- [Sample website is here](https://benjeto.pages.dev).
11
+ [Sample website is here](https://benjeto.tsg0o0.com).
12
12
 
13
13
  ## Installation
14
14
 
@@ -3,7 +3,11 @@
3
3
  <img src="{{ include.icon | relative_url }}" class="app-icon" aria-hidden="true" alt="">
4
4
  {%- endif %}
5
5
  <div class="app-info">
6
+ {%- if include.type == "title" %}
7
+ <h1>{{ include.title }}</h1>
8
+ {%- else %}
6
9
  <b>{{ include.title }}</b>
10
+ {%- endif %}
7
11
  {{ include.description }}
8
12
  </div>
9
13
  </div>
@@ -14,7 +14,7 @@
14
14
  {%- if settings.copyright %}
15
15
  <p class="copy">{{ settings.copyright }}</p>
16
16
  {%- endif %}
17
- {%- if site.languages.size > 1 and site.plugins contains "jekyll-polyglot" %}
17
+ {%- if site.languages.size > 1 and site.plugins contains "jekyll-polyglot" and page.nolangs != true %}
18
18
  {%- include lang-select.html -%}
19
19
  {%- endif %}
20
20
  </div>
data/_includes/head.html CHANGED
@@ -78,6 +78,10 @@
78
78
  <meta name="robots" content="noindex">
79
79
  {% endif -%}
80
80
 
81
+ {% if settings.head.canonical -%}
82
+ <link rel="canonical" href="{{ settings.head.canonical }}{{ page.url }}">
83
+ {% endif -%}
84
+
81
85
  {% if page.itunes_app -%}
82
86
  <meta name="apple-itunes-app" content="app-id={{ page.itunes_app }}">
83
87
  {% endif -%}
@@ -91,7 +95,7 @@
91
95
  {% endif -%}
92
96
 
93
97
  {% if site.languages -%}
94
- {% if site.default_lang != "nil" -%}
98
+ {% if site.default_lang != "no-default" -%}
95
99
  <link rel="alternate" hreflang="{{ site.default_lang }}" href="{{ site.url }}{{ page.permalink }}">
96
100
  {% endif -%}
97
101
  {% for lang in site.languages -%}
@@ -1,9 +1,10 @@
1
1
  {%- assign texts = site.data.texts %}
2
2
  {% assign rtl_languages = "ar,arc,dv,fa,he,ks,nqo,ps,syr,ur,yi" | split: ',' %}
3
- {%- if page.lang-exclusive.size > 1 or page.lang-exclusive == nil %}
3
+ {% assign languages = page.lang-exclusive | default: site.languages %}
4
+ {%- if languages.size > 1 or page.lang-exclusive == nil %}
4
5
  <ul class="lang-select">
5
- {%- for lang in site.languages %}
6
- {%- if page.lang-exclusive contains lang or page.lang-exclusive == nil %}
6
+ {%- for lang in languages %}
7
+ {%- if languages contains lang or languages == nil %}
7
8
  <li><a {% static_href %}href="
8
9
  {%- if lang == site.default_lang -%}
9
10
  {{ page.url | relative_url | replace: 'index.html', '' }}
data/_includes/menu.html CHANGED
@@ -8,7 +8,7 @@
8
8
  {%- if profile.tip %}
9
9
  {%- if profile.tip.size > 1 %}
10
10
  {%- assign needjs = true %}
11
- <noscript>
11
+ <noscript class="nosc">
12
12
  <a class="menu-btn menues" href="{{ profile.tip[0].url }}" title="{{ texts.tip_menu }}">
13
13
  <img class="icon" src="{{ "/assets/icon/love.svg" | relative_url }}" alt="{{ texts.tip }}">
14
14
  </a>
@@ -38,7 +38,7 @@
38
38
  {%- if profile.message %}
39
39
  {%- if profile.message.size > 1 %}
40
40
  {%- assign needjs = true %}
41
- <noscript>
41
+ <noscript class="nosc">
42
42
  <a class="menu-btn menues" href="{{ profile.message[0].url }}" title="{{ texts.message_menu }}">
43
43
  <img class="icon" src="{{ "/assets/icon/message.svg" | relative_url }}" alt="{{ texts.message }}">
44
44
  </a>
@@ -70,7 +70,7 @@
70
70
  {%- assign subscribe_list = profile.subscribe | default: settings.home.tabs %}
71
71
  {%- if subscribe_list.size > 1 %}
72
72
  {%- assign needjs = true %}
73
- <noscript>
73
+ <noscript class="nosc">
74
74
  <a class="menu-btn subscribe menues" href="{{ subscribe_list[0].feed | relative_url }}" title="{{ texts.subscribe_menu }}">{{ texts.subscribe }}</a>
75
75
  </noscript>
76
76
  <button id="btn" class="menu-btn subscribe menues" data-menu="menu-subscribe" title="{{ texts.subscribe_menu }}" aria-haspopup="menu">{{ texts.subscribe }}</button>
@@ -12,7 +12,7 @@
12
12
  </a>
13
13
  <div class="buttonline">
14
14
  {%- if page.layout == "post" and type == "nav" and settings.post.share_button == true %}
15
- <button class="shareBtn" id="shareButton" data-title="{{ page.title | default: page.excerpt | strip_html }}" data-url="{{ page.url }}" role="button" title="{{ texts.share }}">
15
+ <button class="shareBtn" id="shareButton" data-title="{{ page.title | default: page.excerpt | strip_html }}" data-url="$here" role="button" title="{{ texts.share }}">
16
16
  <span class="shareMsg"></span>
17
17
  <img class="icon" src="{{ "/assets/icon/clip.svg" | relative_url }}" alt="{{ texts.copy }}">
18
18
  </button>
@@ -5,7 +5,7 @@
5
5
  <article class="feed-post pagebox"{% if post.lang %} lang="{{ post.lang }}"{% endif %}>
6
6
  <div class="post-excerpt">
7
7
  <a href="{{ post.url | relative_url }}" class="post-link post-lighter">
8
- {%- if post.title != "" %}
8
+ {%- if post.title != "" and post.hide_title != true %}
9
9
  <h2>{{ post.title | escape }}</h2>
10
10
  {%- endif %}
11
11
  {%- if post.title == "" or settings.home.show_excerpts == true %}
@@ -3,7 +3,7 @@ layout: base
3
3
  ---
4
4
  <header class="post">
5
5
  {%- include miniprof.html type="nav" -%}
6
- {%- if pagetitle != "" -%}
6
+ {%- if page.title != "" and page.hide_title != true -%}
7
7
  <h1>{{ page.title }}</h1>
8
8
  {%- endif -%}
9
9
  </header>
data/_layouts/post.html CHANGED
@@ -5,7 +5,7 @@ layout: base
5
5
  {%- assign settings = site.data.settings -%}
6
6
  <header class="post">
7
7
  {%- include miniprof.html type="nav" -%}
8
- {%- if page.title != "" -%}
8
+ {%- if page.title != "" and page.hide_title != true -%}
9
9
  <h1>{{ page.title }}</h1>
10
10
  {%- endif -%}
11
11
  <div class="meta">
@@ -38,7 +38,7 @@ article.post {
38
38
  h1, h2, h3 {
39
39
  margin: 20px 0 16px;
40
40
  color: var(--head);
41
- line-height: 1.2;
41
+ line-height: 1.5;
42
42
  font-weight: 600;
43
43
  }
44
44
  h2 {
@@ -61,7 +61,6 @@ hgroup {
61
61
 
62
62
  a {
63
63
  color: var(--link);
64
- transition: color 0.1s;
65
64
  text-decoration: none;
66
65
  &:hover, &:focus {
67
66
  color: var(--linkhover);
@@ -132,8 +131,8 @@ code {
132
131
  margin: 0 2px;
133
132
  }
134
133
  pre code {
135
- background: var(--boxbglight);
136
- border-color: var(--boxbglight);
134
+ background: var(--page);
135
+ border-color: var(--page);
137
136
  direction: ltr;
138
137
  display: block;
139
138
  border-radius: 6px;
@@ -141,6 +140,10 @@ pre code {
141
140
  overflow-x: auto;
142
141
  border-width: 1.5px;
143
142
  }
143
+ .pagebox pre code {
144
+ background: var(--boxbglight);
145
+ border-color: var(--boxbglight);
146
+ }
144
147
 
145
148
  details {
146
149
  margin: 16px 0;
@@ -197,13 +200,14 @@ video {
197
200
  border-radius: 6px;
198
201
  transition: filter 0.2s;
199
202
  .icon {
200
- width: 24px;
203
+ width: auto;
204
+ max-height: 24px;
201
205
  margin-bottom: 1px;
202
206
  }
203
207
  &:has(.icon) {
204
208
  padding: 4px;
205
209
  }
206
- &:hover, &:focus {
210
+ &:hover {
207
211
  filter: brightness(0.9);
208
212
  text-decoration: none;
209
213
  }
@@ -211,9 +215,6 @@ video {
211
215
  background: var(--link);
212
216
  color: var(--bg);
213
217
  border: 1px solid var(--link);
214
- &:hover, &:focus {
215
- filter: brightness(0.8);
216
- }
217
218
  }
218
219
  &#btn {
219
220
  display: none;
@@ -333,6 +334,7 @@ div.header {
333
334
  aspect-ratio: 5 / 1;
334
335
  margin-bottom: -8px;
335
336
  background: var(--boxbg);
337
+ border-radius: 0 0 8px 8px;
336
338
  img {
337
339
  vertical-align: bottom;
338
340
  width: 100%;
@@ -347,19 +349,14 @@ header.home {
347
349
  display: flex;
348
350
  flex-wrap: wrap;
349
351
  list-style: none;
350
- margin: 4px 0 0;
352
+ margin: 8px 0 0;
351
353
  padding: 0 4px;
352
354
  li {
353
355
  margin: 4px;
354
356
  a {
355
- background: var(--boxbglight);
356
357
  border: 1px solid var(--border);
357
358
  border-radius: 4px;
358
359
  padding: 4px 6px;
359
- transition: filter 0.15s;
360
- &:hover, &:focus {
361
- filter: brightness(0.9);
362
- }
363
360
  }
364
361
  }
365
362
  }
@@ -373,6 +370,9 @@ header.home {
373
370
  section.sidebutton {
374
371
  display: flex;
375
372
  flex-wrap: wrap;
373
+ .nosc {
374
+ display: flex;
375
+ }
376
376
  }
377
377
  }
378
378
  a.proficon {
@@ -401,6 +401,7 @@ header.home {
401
401
  h1 {
402
402
  display: inline-block;
403
403
  font-size: 1.8em;
404
+ line-height: 1.2;
404
405
  margin: 0;
405
406
  }
406
407
  p.bio {
@@ -622,7 +623,7 @@ ul.lang-select {
622
623
  }
623
624
 
624
625
  @media (prefers-contrast: more) {
625
- code, pre code {
626
+ code, pre code, .pagebox pre code {
626
627
  background: var(--bg);
627
628
  border-color: var(--border);
628
629
  }
@@ -17,7 +17,7 @@ div.app-info {
17
17
  min-width:166px;
18
18
  line-height: 1.2;
19
19
  margin-bottom: 4px;
20
- h2, h3, b {
20
+ h1, h2, h3, b {
21
21
  display: block;
22
22
  line-height: 1.2;
23
23
  font-size: 1.5em;
data/assets/js/share.js CHANGED
@@ -27,7 +27,6 @@ document.addEventListener('DOMContentLoaded', function () {
27
27
  const shareMsg = button.querySelector('.shareMsg');
28
28
 
29
29
  if (navigator.share) {
30
- const url = button.getAttribute('data-url');
31
30
  button.style.display = 'inline-block';
32
31
  img.src = '{{ "/assets/icon/share.svg" | relative_url }}';
33
32
 
@@ -47,25 +46,37 @@ document.addEventListener('DOMContentLoaded', function () {
47
46
  event.stopPropagation();
48
47
 
49
48
  const title = button.getAttribute('data-title');
49
+ const url = button.getAttribute('data-url');
50
+ if (url == "$here") {
51
+ shareurl = window.location.href;
52
+ } else {
53
+ shareurl = "{{ site.url }}" + url;
54
+ }
50
55
 
51
56
  try {
52
57
  await navigator.share({
53
58
  title: title,
54
- url: url
59
+ url: shareurl
55
60
  });
56
61
  } catch (error) {
57
62
  console.error('Error sharing:', error);
58
63
  }
59
64
  });
60
65
  } else {
61
- const url = window.location.protocol + "//" + window.location.host + button.getAttribute('data-url');
62
66
  button.style.display = 'inline-block';
63
67
 
64
68
  button.addEventListener('click', function () {
65
69
  event.preventDefault();
66
70
  event.stopPropagation();
67
71
 
68
- navigator.clipboard.writeText(url).then(() => {
72
+ const url = button.getAttribute('data-url');
73
+ if (url == "$here") {
74
+ shareurl = window.location.href;
75
+ } else {
76
+ shareurl = "{{ site.url }}" + url;
77
+ }
78
+
79
+ navigator.clipboard.writeText(shareurl).then(() => {
69
80
  button.classList.add('disabled');
70
81
 
71
82
  {%- if site.languages.size > 1 and site.plugins contains "jekyll-polyglot" %}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benjeto-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cizzuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-13 00:00:00.000000000 Z
11
+ date: 2024-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -39,33 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.17'
41
41
  - !ruby/object:Gem::Dependency
42
- name: jekyll-paginate-v2
42
+ name: jekyll-paginate
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.0
47
+ version: '1.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 3.0.0
55
- - !ruby/object:Gem::Dependency
56
- name: jekyll-polyglot
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 1.8.0
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 1.8.0
54
+ version: '1.1'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: bundler
71
57
  requirement: !ruby/object:Gem::Requirement