type-on-strap 2.4.5 → 2.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59ac223fb0f31b7759001250d368dc5f60f777f5230a654a91e622e86119778f
4
- data.tar.gz: de7216c62581d2d226e80379fe232c85c916e3f91768dbe15a935f10eb69137e
3
+ metadata.gz: 2057d2682bf6c8aa2883be048665715575c0b577f9ef5e88a2999da1c05dd4ee
4
+ data.tar.gz: ef6d4db972b7d1c12e0353afe99b9a0b019ac257fe7826e1672b417b8af14786
5
5
  SHA512:
6
- metadata.gz: 6e762537afcd2650b819616d71a90fb0330a6bc171c4024a598889774912db2e7629f657c6822d37e3f2d249ac3d047478e004fc6ecab73d53de3b34f562e364
7
- data.tar.gz: c2cc08a7b40dde40c2a66101202d45c429fe27fa8c74c9d6ac95b0c6ee269ec76f7399bd56dc905437cc7b6071b9de4921feb5cf9d8b018aeefe98a5a5eb0490
6
+ metadata.gz: 87368acc73d55075d24a1c5a5807ea5951410d7fe2b245df05d28bb755641dcf04d5a18d6506187482400ea5d9cbde6025b45992871026cb1832cc1345f984ff
7
+ data.tar.gz: 4af9107da561f1b4e2965e649b1f14a1653286ca491d9a46a4dab0aba954d15388f1040ae430687bb30e019b7aa4bbdb49e817eb4bfeb91741998fbeea60a448
data/README.md CHANGED
@@ -6,7 +6,8 @@
6
6
 
7
7
  [![Default Type on Strap blog](https://github.com/Sylhare/Type-on-Strap/blob/master/assets/img/screenshot.png?raw=true)](https://sylhare.github.io/Type-on-Strap/)
8
8
 
9
- A free and open-source [Jekyll](https://jekyllrb.com) theme. Based on Rohan Chandra [type-theme](https://github.com/rohanchandra/type-theme) packed with extra features and easily customizable:
9
+ A free and open-source [Jekyll](https://jekyllrb.com) theme.
10
+ Based on Rohan Chandra [type-theme](https://github.com/rohanchandra/type-theme) packed with extra features and easily customizable:
10
11
 
11
12
  * Responsive design on all devices (🖥, 💻, 📱, ...)
12
13
  * Portfolio 🗂, Gallery 🖼 pages for your projects
@@ -46,7 +47,7 @@ Check out this tutorial: [Use as Ruby Gem](#use-as-ruby-gem-)
46
47
  Here are the main files of the template
47
48
 
48
49
  ```shell
49
- Type-on-Strap
50
+ ./Type-on-Strap
50
51
  ├── _includes # Theme includes
51
52
  ├── _layouts # Theme layouts (see below for details)
52
53
  ├── _portfolio # Collection of articles for the portfolio page
@@ -116,8 +117,8 @@ To configure the blog part and default plugins. Those plugins are validated by G
116
117
 
117
118
  #### Meta and Branding
118
119
 
119
- Meta variables hold basic information about your Jekyll site which will be used throughout the site
120
- and as meta properties that are used for search engines, browsers, and the site's RSS feed.
120
+ _Meta variables_ hold basic information about your Jekyll site, which will be used throughout the site
121
+ and as _meta properties_ that are used for search engines, browsers, and the site's RSS feed.
121
122
 
122
123
  Change these variables in `_config.yml`:
123
124
 
@@ -135,7 +136,7 @@ Using _auto_ you'll have a tiny icon in the navbar allowing the use to manually
135
136
 
136
137
  ### Theme customization 🎨
137
138
 
138
- #### Footer and Header's text
139
+ #### Footer and Header text
139
140
 
140
141
  Customize your site header/footer with these variables in `_config.yml`:
141
142
 
@@ -164,17 +165,19 @@ with suffix `-small` (620x320) and `-medium` (1240x640) to display on smaller sc
164
165
  Localization string is a way to quickly change the template language for text like *Next Post* or *Follow on*, ...
165
166
  You can find all the properties in `_data/language.yml`.
166
167
 
167
- By default, it is in english, but you can easily add your own language.
168
+ By default, it is in English, but you can easily add your own language.
168
169
 
169
170
  ### Google Analytics
170
171
 
171
- To enable Google Analytics, add your [tracking ID](https://support.google.com/analytics/answer/1032385)
172
+ To enable Google Analytics (GA4), add your [Measurement ID](https://support.google.com/analytics/answer/12270356?hl=en&sjid=1593376271608310401-NA)
172
173
  to `_config.yml` like so:
173
174
 
174
175
  ```yml
175
- google_analytics: UA-NNNNNNNN-N
176
+ google_analytics: G-XXXXXXXXXX
176
177
  ```
177
178
 
179
+ It will use the [Google Tag Manager](https://support.google.com/analytics/answer/10220869?hl=en&ref_topic=9355633&sjid=1593376271608310401-NA)
180
+
178
181
  ### Comments 💬
179
182
 
180
183
  #### Disqus
@@ -191,10 +194,10 @@ comments:
191
194
 
192
195
  #### Cusdis
193
196
 
194
- [Cusdis](https://cusdis.com/) is an open source alternative to Disqus.
197
+ [Cusdis](https://cusdis.com/) is an open-source alternative to Disqus.
195
198
  You can read more about it in the [documentation](https://cusdis.com/doc#/)
196
199
 
197
- To enable it, set your cusdis name in `_config.yml`:
200
+ To enable it, set your Cusdis name in `_config.yml`:
198
201
 
199
202
  ```yaml
200
203
  comments:
@@ -273,7 +276,7 @@ You can also enable RSS.
273
276
  The site icons come from [Font Awesome](https://fontawesome.com/).
274
277
 
275
278
  In `_data/icons.yml` you can set the footer icon that will appear at the bottom of the page.
276
- They will redirect the user on your profile on the other platform like Twitter, GitHub and so many more!
279
+ They will redirect the user on your profile on to other platforms like Twitter, GitHub and so many more!
277
280
 
278
281
  ### Cookie consent
279
282
 
@@ -616,7 +619,7 @@ Then you can start adding content like:
616
619
 
617
620
  ### Remote Theme
618
621
 
619
- Now you can use any theme gem with GitHub pages with [29/11/2017 Github Pages Broadcast](https://github.com/blog/2464-use-any-theme-with-github-pages).
622
+ Now you can use any theme gem with GitHub pages with [29/11/2017 GitHub Pages Broadcast](https://github.com/blog/2464-use-any-theme-with-github-pages).
620
623
  For that remove all `theme:` attributes from `_config.yml` and add instead:
621
624
 
622
625
  ```yml
@@ -625,7 +628,7 @@ remote_theme: sylhare/Type-on-Strap
625
628
 
626
629
  ## License
627
630
 
628
- This theme is licensed under the [The MIT License (MIT)](/LICENSE)
631
+ This theme is licensed under the [MIT License (MIT)](/LICENSE)
629
632
 
630
633
  - Pictures from [Pexels](https://www.pexels.com/) are under Creative Commons Zero (CC0) license
631
634
  - Fonts are licensed under the [SIL Open Font License (OFL)](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
@@ -4,7 +4,7 @@
4
4
  <div class="post-info">
5
5
  {%- if author.url -%}<a href="{{ author.url | relative_url }}" target="_blank" rel="noopener">{%- endif -%}
6
6
  {% if author.avatar %}
7
- <img alt="Author's avatar" src="{{ author.avatar | relative_url }}">
7
+ <img alt="Author's avatar" src="{{ author.avatar | relative_url }}" loading="lazy">
8
8
  {% endif %}
9
9
  <p class="meta">
10
10
  {% if author.name %}{{ author.name }} - {% endif %}
@@ -68,8 +68,6 @@
68
68
  {% if site.google_analytics %}
69
69
  <!-- Global site tag (gtag.js) -->
70
70
  <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
71
- <!-- Page analysis (analytics.js) -->
72
- <script async src='https://www.google-analytics.com/analytics.js'></script>
73
71
  {% endif %}
74
72
 
75
73
  <!-- seo tags -->
@@ -85,7 +83,7 @@
85
83
 
86
84
  <!-- Twitter Cards -->
87
85
  <meta name="twitter:title" content="{{ page.title | default: site.title }}">
88
- <meta name="twitter:description" content="{{ page.content | strip_html | strip_newlines | truncate: 160 | default: site.header_text}}">
86
+ <meta name="twitter:description" content="{{ page.content | default: site.header_text | strip_html | strip_newlines | truncate: 160 }}">
89
87
  {% if site.data.social.twitter %}
90
88
  <meta name="twitter:creator" content="@{{ site.data.social.twitter }}">
91
89
  <meta name="twitter:site" content="@{{ site.data.social.twitter }}">
@@ -4,7 +4,7 @@
4
4
  <div class="branding">
5
5
  {% if site.avatar %}
6
6
  <a href="{{ '/' | relative_url }}">
7
- <img alt="logo img" class="avatar" src="{{ site.avatar | relative_url }}" />
7
+ <img alt="logo img" class="avatar" src="{{ site.avatar | relative_url }}" loading="lazy"/>
8
8
  </a>
9
9
  {% endif %}
10
10
  <a class="site-title" aria-label="{{ site.title }}" href="{{ '/' | relative_url }}">
@@ -34,7 +34,7 @@
34
34
  {% endunless %}
35
35
  {% assign name_page = page.title | append: name_page %}
36
36
  {% endfor %}
37
-
37
+
38
38
  {% if site.color_theme == 'auto' %}
39
39
  <li class="separator"> | </li>
40
40
  <li><a id="theme-toggle" title="{{ page.title }} " aria-label="{{ page.title }}" onclick="themeToggle()"></a></li>
@@ -2,7 +2,7 @@
2
2
  data-host="https://cusdis.com"
3
3
  data-app-id="{% if site.comments.cusdis_app_id %}{{ site.comments.cusdis_app_id }}{% else %}{{ site.cusdis_app_id }}{% endif %}"
4
4
  data-page-id="{{ page.relative_path }}"
5
- data-page-url="{{ page.url }}"
5
+ data-page-url="{{ page.url | absolute_url }}"
6
6
  data-page-title="{{ page.title }}"
7
7
  data-theme="{{ site.color_theme }}"
8
8
  ></div>
@@ -10,4 +10,4 @@
10
10
  {% if site.data.language.cusdis_lang %}
11
11
  <script defer src="https://cusdis.com/js/widget/lang/{{ site.data.language.cusdis_lang }}.js"></script>
12
12
  {% endif %}
13
- <script async src="https://cusdis.com/js/cusdis.es.js"></script>
13
+ <script defer src="https://cusdis.com/js/cusdis.es.js"></script>
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <!--
3
- Type on Strap jekyll theme v2.4.5
3
+ Type on Strap jekyll theme v2.4.7
4
4
  Theme free for personal and commercial use under the MIT license
5
5
  https://github.com/sylhare/Type-on-Strap/blob/master/LICENSE
6
6
  -->
@@ -186,6 +186,7 @@ p,
186
186
  ol,
187
187
  ul,
188
188
  dl,
189
+ details,
189
190
  .math-display {
190
191
  line-height: 1.5;
191
192
  margin-bottom: 1em;
@@ -237,6 +238,17 @@ kbd {
237
238
  white-space: nowrap;
238
239
  }
239
240
 
241
+ details {
242
+ & > summary {
243
+ cursor: pointer;
244
+ display: list-item;
245
+ }
246
+
247
+ &[open] > summary {
248
+ color: var(--link);
249
+ }
250
+ }
251
+
240
252
  // Cookie consent
241
253
  #cookie-notice {
242
254
  padding: 0.5rem 1rem;
@@ -270,3 +282,4 @@ kbd {
270
282
  max-width: 100%;
271
283
  }
272
284
  }
285
+
@@ -1,5 +1,6 @@
1
1
  /* @preserve Cookie Consent Init */
2
- function createCookie(e,t,n){var o="";if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),o="; expires="+i.toUTCString()}document.cookie=`${e}=${t}${o}; path=/`}function readCookie(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var i=n[o];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null}function addCookieConsentListener(){document.getElementById("cookie-notice-accept").addEventListener("click",(function(){createCookie(cookieName,"true",31),document.getElementById("cookie-notice").style.display="none",location.reload()}))}function googleAnalytics(){if(""!==analyticsName.toLowerCase()){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config",analyticsName),e("config",analyticsNameGA4,{anonymize_ip:!0}),window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create",analyticsName,"auto"),ga("send","pageview")}}"true"===isCookieConsent.toLowerCase()?(addCookieConsentListener(),"true"===readCookie(cookieName)?googleAnalytics():document.getElementById("cookie-notice").style.display="block"):googleAnalytics()
3
- /* @preserve Dark mode Init */;const themeButton={light:'<i class="fas fa-adjust" aria-hidden="true"></i>',dark:'<i class="fas fa-adjust fa-rotate-180" aria-hidden="true"></i>'},currentTheme=()=>sessionStorage.getItem("theme");function setMode(e){document.documentElement.setAttribute("data-theme",e),sessionStorage.setItem("theme",e);const t=document.getElementById("theme-toggle");t&&(t.innerHTML=themeButton[e])}function themeToggle(){setMode("light"===currentTheme()?"dark":"light")}window.onload=function(){if(isAutoTheme){if(!currentTheme()){let e=window.matchMedia("(prefers-color-scheme: dark)");e.addEventListener("change",(()=>{e.matches&&sessionStorage.setItem("theme","dark")}))}let e=currentTheme();setMode(e||"light")}}
4
- /* @preserve Masonry Init */;try{var elem=document.querySelector(".grid"),msnry=new Masonry(elem,{itemSelector:".grid-item",columnWidth:".grid-sizer",gutter:".gutter-sizer",percentPosition:!0}),imgLoad=imagesLoaded(elem);imgLoad.on("progress",(function(e,t){msnry.layout()}))}catch(e){if(!(e instanceof ReferenceError))throw e}
5
- /* @preserve Navbar */document.addEventListener("DOMContentLoaded",(function(e){const t=document.getElementById("pull"),n=document.querySelector("nav ul");["click","touch"].forEach((function(e){t?.addEventListener(e,(function(){n.classList.toggle("hide")}),!1)})),window.addEventListener("scroll",(function(){const e=-(window.scrollY||window.pageYOffset||document.body.scrollTop)/3,t=document.getElementById("main");t&&(t.style.backgroundPosition="100% "+(e-50)+"px, 0%, center top")}))}));
2
+ function createCookie(e,t,o){var n="";if(o){var i=new Date;i.setTime(i.getTime()+24*o*60*60*1e3),n="; expires="+i.toUTCString()}document.cookie=`${e}=${t}${n}; path=/`}function readCookie(e){for(var t=e+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var i=o[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null}function addCookieConsentListener(){document.getElementById("cookie-notice-accept").addEventListener("click",(function(){createCookie(cookieName,"true",31),document.getElementById("cookie-notice").style.display="none",location.reload()}))}function googleAnalytics(){if(""!==analyticsName.toLowerCase()){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config",analyticsName,{anonymize_ip:!0}),analyticsNameGA4&&e("config",analyticsNameGA4,{anonymize_ip:!0})}}"true"===isCookieConsent.toLowerCase()?(addCookieConsentListener(),"true"===readCookie(cookieName)?googleAnalytics():document.getElementById("cookie-notice").style.display="block"):googleAnalytics()
3
+ /* @preserve Dark mode Init */;const themeButton={light:'<i class="fas fa-adjust" aria-hidden="true"></i>',dark:'<i class="fas fa-adjust fa-rotate-180" aria-hidden="true"></i>'},currentTheme=()=>localStorage.getItem("theme");function setMode(e){document.documentElement.setAttribute("data-theme",e),localStorage.setItem("theme",e);const t=document.getElementById("theme-toggle");t&&(t.innerHTML=themeButton[e])}function themeToggle(){setMode("light"===currentTheme()?"dark":"light")}function bootstrapTheme(){if(isAutoTheme){if(!currentTheme()){let e=window.matchMedia("(prefers-color-scheme: dark)");e.matches&&localStorage.setItem("theme","dark"),e.addEventListener("change",(()=>{e.matches&&localStorage.setItem("theme","dark")}))}let e=currentTheme();setMode(e||"light")}}bootstrapTheme();
4
+ /* @preserve Masonry Init */
5
+ try{var elem=document.querySelector(".grid"),msnry=new Masonry(elem,{itemSelector:".grid-item",columnWidth:".grid-sizer",gutter:".gutter-sizer",percentPosition:!0}),imgLoad=imagesLoaded(elem);imgLoad.on("progress",(function(e,t){msnry.layout()}))}catch(e){if(!(e instanceof ReferenceError))throw e}
6
+ /* @preserve Navbar */document.addEventListener("DOMContentLoaded",(function(e){const t=document.getElementById("pull"),o=document.querySelector("nav ul");["click","touch"].forEach((function(e){t?.addEventListener(e,(function(){o.classList.toggle("hide")}),!1)})),window.addEventListener("scroll",(function(){const e=-(window.scrollY||window.pageYOffset||document.body.scrollTop)/3,t=document.getElementById("main");t&&(t.style.backgroundPosition="100% "+(e-50)+"px, 0%, center top")}))}));
@@ -34,23 +34,19 @@ function googleAnalytics() {
34
34
  window.dataLayer = window.dataLayer || [];
35
35
  function gtag() { dataLayer.push(arguments); }
36
36
  gtag('js', new Date());
37
- gtag('config', analyticsName);
38
- gtag('config', analyticsNameGA4, { 'anonymize_ip': true });
39
-
40
- // Google analytics
41
- window.ga = window.ga || function () { (ga.q = ga.q || []).push(arguments) };
42
- ga.l = +new Date;
43
- ga('create', analyticsName, 'auto');
44
- ga('send', 'pageview');
37
+ gtag('config', analyticsName, { 'anonymize_ip': true });
38
+ if (analyticsNameGA4) {
39
+ gtag('config', analyticsNameGA4, { 'anonymize_ip': true });
40
+ }
45
41
  }
46
42
  }
47
43
 
48
44
  if (isCookieConsent.toLowerCase() === 'true') {
49
45
  addCookieConsentListener();
50
46
  if (readCookie(cookieName) === 'true') {
51
- googleAnalytics();
47
+ googleAnalytics();
52
48
  } else {
53
- document.getElementById('cookie-notice').style.display = 'block';
49
+ document.getElementById('cookie-notice').style.display = 'block';
54
50
  }
55
51
  } else {
56
52
  googleAnalytics();
@@ -10,11 +10,11 @@ const themeButton = {
10
10
  'dark': '<i class="fas fa-adjust fa-rotate-180" aria-hidden="true"></i>'
11
11
  }
12
12
 
13
- const currentTheme = () => sessionStorage.getItem('theme')
13
+ const currentTheme = () => localStorage.getItem('theme')
14
14
 
15
15
  function setMode(theme) {
16
16
  document.documentElement.setAttribute('data-theme', theme)
17
- sessionStorage.setItem('theme', theme)
17
+ localStorage.setItem('theme', theme)
18
18
  const toggle = document.getElementById('theme-toggle')
19
19
  if (toggle) {
20
20
  toggle.innerHTML = themeButton[theme]
@@ -30,13 +30,14 @@ function themeToggle() {
30
30
  }
31
31
  }
32
32
 
33
- window.onload = function bootstrapTheme() {
33
+ function bootstrapTheme() {
34
34
  if (isAutoTheme) {
35
35
  if (!currentTheme()) {
36
36
  // Load browser's preference
37
37
  let browserPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
38
+ if (browserPrefersDark.matches) localStorage.setItem('theme', 'dark');
38
39
  browserPrefersDark.addEventListener('change', () => {
39
- if (browserPrefersDark.matches) sessionStorage.setItem('theme', 'dark')
40
+ if (browserPrefersDark.matches) localStorage.setItem('theme', 'dark')
40
41
  });
41
42
  }
42
43
 
@@ -45,3 +46,8 @@ window.onload = function bootstrapTheme() {
45
46
  setMode(sessionPrefers ? sessionPrefers : 'light')
46
47
  }
47
48
  }
49
+
50
+ // Init
51
+ (function () {
52
+ bootstrapTheme();
53
+ })()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: type-on-strap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.5
4
+ version: 2.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylhare
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-03-07 00:00:00.000000000 Z
12
+ date: 2023-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
@@ -290,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  - !ruby/object:Gem::Version
291
291
  version: '0'
292
292
  requirements: []
293
- rubygems_version: 3.3.26
293
+ rubygems_version: 3.3.3
294
294
  signing_key:
295
295
  specification_version: 4
296
296
  summary: A simple and responsive jekyll theme template