type-on-strap 2.4.3 → 2.4.4

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: 156bbe1cf170b38f6c26d3ef1d10ec7ab44bae0f906d319fe81f236bc3655e84
4
- data.tar.gz: 70be3647db492019087c9a1dbb81efe75194a739829d9fb9807dd4fbad9195c5
3
+ metadata.gz: 4157a77521844cd3f5783f5d197e44235f96515940d273cae73481c59a88d930
4
+ data.tar.gz: f45cb27c4e1967784456db131d137f5787fc54d6ecd06062f85c73e80fd06fea
5
5
  SHA512:
6
- metadata.gz: c2106f5c0a8fdb10ee22cc986ded7efcc21eb347e7ea68b54da1a8dd9c99327cde99ef4fb8cab8b937e0b8de889fdea53a0a986a7e03316295a95e7eb53f292e
7
- data.tar.gz: 248f2a9d816a92a9ed1d8a32ebe615a49f8537cce9f88a22d313114fb36236ca383936bfcd63c27681b177dc526318d58996a1856923236b328a70542fd6f7e2
6
+ metadata.gz: ec25088df0ae54c8f60ffebcc5f49fbf7b788f9dc9f01cf2ce3f4aa2baf2f254c67869996675e64802377c4ce1ed845d75db0961d0c868b91aafa0e41a17ec82
7
+ data.tar.gz: d676492ae7ab46997529ed24850e4cdc018d504a45b544ea0fa599b61e7798ea4b71fc53afb4a95258e3f0764b8195d3db9d5c7094485b80fac57f08ff2312cf
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <!--
3
- Type on Strap jekyll theme v2.4.3
3
+ Type on Strap jekyll theme v2.4.4
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
  -->
@@ -1 +1 @@
1
- function createCookie(e,t,o){var n,i="";o&&((n=new Date).setTime(n.getTime()+24*o*60*60*1e3),i="; expires="+n.toUTCString()),document.cookie=`${e}=${t}${i}; 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(){function e(){dataLayer.push(arguments)}""!==analyticsName.toLowerCase()&&(window.dataLayer=window.dataLayer||[],e("js",new Date),e("config",analyticsName),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();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),document.getElementById("theme-toggle").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")})}var e=currentTheme();setMode(e||"light")}};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}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(){var e=-(window.scrollY||window.pageYOffset||document.body.scrollTop)/3;document.getElementById("main").style.backgroundPosition="100% "+(e-50)+"px, 0%, center top"})});
1
+ function createCookie(e,t,n){var o,i="";n&&((o=new Date).setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toUTCString()),document.cookie=e+`=${t}${i}; 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(){function e(){dataLayer.push(arguments)}""!==analyticsName.toLowerCase()&&(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();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")})}var e=currentTheme();setMode(e||"light")}};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}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(){var e=-(window.scrollY||window.pageYOffset||document.body.scrollTop)/3;const t=document.getElementById("main");t&&(t.style.backgroundPosition="100% "+(e-50)+"px, 0%, center top")})});
@@ -15,7 +15,10 @@ const currentTheme = () => sessionStorage.getItem('theme')
15
15
  function setMode(theme) {
16
16
  document.documentElement.setAttribute('data-theme', theme)
17
17
  sessionStorage.setItem('theme', theme)
18
- document.getElementById('theme-toggle').innerHTML = themeButton[theme]
18
+ const toggle = document.getElementById('theme-toggle')
19
+ if (toggle) {
20
+ toggle.innerHTML = themeButton[theme]
21
+ }
19
22
  }
20
23
 
21
24
  function themeToggle() {
@@ -8,7 +8,7 @@ document.addEventListener("DOMContentLoaded", function (event) {
8
8
  const menu = document.querySelector('nav ul');
9
9
 
10
10
  ['click', 'touch'].forEach(function (e) {
11
- pull.addEventListener(e, function () {
11
+ pull?.addEventListener(e, function () {
12
12
  menu.classList.toggle('hide')
13
13
  }, false);
14
14
  });
@@ -18,6 +18,9 @@ document.addEventListener("DOMContentLoaded", function (event) {
18
18
  */
19
19
  window.addEventListener('scroll', function () {
20
20
  const offset = -(window.scrollY || window.pageYOffset || document.body.scrollTop) / 3;
21
- document.getElementById("main").style.backgroundPosition = '100% ' + (offset - 50) + 'px' + ', 0%, center top';
21
+ const main = document.getElementById('main');
22
+ if (main) {
23
+ main.style.backgroundPosition = '100% ' + (offset - 50) + 'px' + ', 0%, center top';
24
+ }
22
25
  });
23
26
  });
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.3
4
+ version: 2.4.4
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: 2022-05-30 00:00:00.000000000 Z
12
+ date: 2022-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll