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 +4 -4
- data/_layouts/default.html +1 -1
- data/assets/js/main.min.js +1 -1
- data/assets/js/partials/dark-mode.js +4 -1
- data/assets/js/partials/navbar.js +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4157a77521844cd3f5783f5d197e44235f96515940d273cae73481c59a88d930
|
|
4
|
+
data.tar.gz: f45cb27c4e1967784456db131d137f5787fc54d6ecd06062f85c73e80fd06fea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec25088df0ae54c8f60ffebcc5f49fbf7b788f9dc9f01cf2ce3f4aa2baf2f254c67869996675e64802377c4ce1ed845d75db0961d0c868b91aafa0e41a17ec82
|
|
7
|
+
data.tar.gz: d676492ae7ab46997529ed24850e4cdc018d504a45b544ea0fa599b61e7798ea4b71fc53afb4a95258e3f0764b8195d3db9d5c7094485b80fac57f08ff2312cf
|
data/_layouts/default.html
CHANGED
data/assets/js/main.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function createCookie(e,t,
|
|
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')
|
|
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
|
|
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(
|
|
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.
|
|
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-
|
|
12
|
+
date: 2022-10-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: jekyll
|