From e7244b6bfebf0a9662d83c5ef135f2a99c287c3d Mon Sep 17 00:00:00 2001 From: Vegard Hagen Date: Sun, 26 Nov 2023 12:35:52 +0100 Subject: [PATCH 01/16] chore: Adding blog.stonegarden.dev as user of Blowfish theme --- exampleSite/content/users/users.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/exampleSite/content/users/users.json b/exampleSite/content/users/users.json index 9961711e..3a2edb87 100644 --- a/exampleSite/content/users/users.json +++ b/exampleSite/content/users/users.json @@ -482,5 +482,13 @@ "tags": [ "Personal Site" ] + }, + { + "title": "blog.stonegarden.dev", + "url": "https://blog.stonegarden.dev/", + "tags": [ + "Personal Site" + ] } + ] From a31607509ef41a3a5288af5a19cc883b794b4ea0 Mon Sep 17 00:00:00 2001 From: Ruby <3r4o02hucyw7o9fekpx8gla2@pollination.email> Date: Tue, 28 Nov 2023 06:25:25 +0100 Subject: [PATCH 02/16] Only request zoom library if it is not disabled. There is already a if condition in `footer.html` that only runs the JS from the zoom library if it is enabled per-site. This commit takes the same if condition and applies it in `head.html` as well to save a unnecessary web request to `zoom.min.js` if that is the case. --- layouts/partials/head.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 67ab1713..f59e9dc8 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -73,7 +73,9 @@ integrity="{{ $bundleJS.Data.Integrity }}" data-copy="{{ i18n " code.copy" }}" data-copied="{{ i18n " code.copied" }}"> {{ end }} + {{ if not .Site.Params.disableImageZoom | default true }} + {{ end }} {{/* Icons */}} {{ if templates.Exists "partials/favicons.html" }} {{ partialCached "favicons.html" .Site }} From b271b3b107a2df1f05b4e5912a8c300e02ee960a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 05:45:10 +0000 Subject: [PATCH 03/16] =?UTF-8?q?=F0=9F=93=8C=20Bump=20typeit=20from=208.7?= =?UTF-8?q?.1=20to=208.8.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [typeit](https://github.com/alexmacarthur/typeit) from 8.7.1 to 8.8.0. - [Release notes](https://github.com/alexmacarthur/typeit/releases) - [Commits](https://github.com/alexmacarthur/typeit/compare/v8.7.1...typeit@8.8.0) --- updated-dependencies: - dependency-name: typeit dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 19 ++++++++++++++----- package.json | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 919780b9..dce0e3b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "rimraf": "^5.0.5", "tailwindcss": "^3.3.5", "tw-elements": "1.0.0", - "typeit": "^8.7.1", + "typeit": "^8.8.0", "vendor-copy": "^3.0.1" } }, @@ -289,6 +289,12 @@ "undici-types": "~5.26.4" } }, + "node_modules/@types/web-animations-js": { + "version": "2.2.16", + "resolved": "https://registry.npmjs.org/@types/web-animations-js/-/web-animations-js-2.2.16.tgz", + "integrity": "sha512-ATELeWMFwj8eQiH0KmvsCl1V2lu/qx/CjOBmv4ADSZS5u8r4reMyjCXtxG7khqyiwH3IOMNdrON/Ugn94OUcRA==", + "dev": true + }, "node_modules/@types/yauzl": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", @@ -2920,11 +2926,14 @@ } }, "node_modules/typeit": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/typeit/-/typeit-8.7.1.tgz", - "integrity": "sha512-Bx/O4NMz10NWh9FWYtVwV4XwGHF9UDJfpCZPJRtw2/oUcahFAStU8J0t19aroPfTV6s1UlS5ICoqilOqmEnh2Q==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/typeit/-/typeit-8.8.0.tgz", + "integrity": "sha512-GQp6OW7vxro1HN3F7UPL0C2KzkGs8bFtUgmJSeK+xNhdofI40mkWxrBT2AXQwtS5Txkg7ttwplxvWCQxnUXyrw==", "dev": true, - "hasInstallScript": true + "hasInstallScript": true, + "dependencies": { + "@types/web-animations-js": "^2.2.16" + } }, "node_modules/ulid": { "version": "2.3.0", diff --git a/package.json b/package.json index d4bdb33e..bc33e77a 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "rimraf": "^5.0.5", "tailwindcss": "^3.3.5", "tw-elements": "1.0.0", - "typeit": "^8.7.1", + "typeit": "^8.8.0", "vendor-copy": "^3.0.1" }, "vendorCopy": [], From 9c89cadd3a889349c153323379cc4914eba2f14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 11:23:14 +0000 Subject: [PATCH 04/16] add user --- exampleSite/content/users/users.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/exampleSite/content/users/users.json b/exampleSite/content/users/users.json index 3a2edb87..8a582096 100644 --- a/exampleSite/content/users/users.json +++ b/exampleSite/content/users/users.json @@ -489,6 +489,13 @@ "tags": [ "Personal Site" ] + }, + { + "title": "renaud.warnotte.be", + "url": "https://renaud.warnotte.be", + "tags": [ + "Personal site", + "Theme author" + ] } - ] From bc3c87ff81e5b9888a049213bec3c7ad822099a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 11:27:30 +0000 Subject: [PATCH 05/16] updated githubactions --- .github/workflows/firebase-preview.yml | 3 +++ .github/workflows/firebase-production.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/firebase-preview.yml b/.github/workflows/firebase-preview.yml index 7b93c9c0..caa90cf2 100644 --- a/.github/workflows/firebase-preview.yml +++ b/.github/workflows/firebase-preview.yml @@ -8,6 +8,9 @@ jobs: - name: Hugo setup uses: peaceiris/actions-hugo@v2.6.0 + with: + hugo-version: 0.120.4 + extended: true env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' diff --git a/.github/workflows/firebase-production.yml b/.github/workflows/firebase-production.yml index 168369ec..7f276ca0 100644 --- a/.github/workflows/firebase-production.yml +++ b/.github/workflows/firebase-production.yml @@ -10,6 +10,9 @@ jobs: - name: Hugo setup uses: peaceiris/actions-hugo@v2.6.0 + with: + hugo-version: 0.120.4 + extended: true env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' From 13ebdb4af0bbb53fa0e2fc22e20bb6047c3b8f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 11:30:24 +0000 Subject: [PATCH 06/16] updated githubactions --- .github/workflows/firebase-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firebase-preview.yml b/.github/workflows/firebase-preview.yml index caa90cf2..ca8d2365 100644 --- a/.github/workflows/firebase-preview.yml +++ b/.github/workflows/firebase-preview.yml @@ -9,7 +9,7 @@ jobs: - name: Hugo setup uses: peaceiris/actions-hugo@v2.6.0 with: - hugo-version: 0.120.4 + hugo-version: 0.115.4 extended: true env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' From 98da3368d62be84dd6e218413335276d78a4159e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 11:32:09 +0000 Subject: [PATCH 07/16] add user --- exampleSite/content/users/users.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/exampleSite/content/users/users.json b/exampleSite/content/users/users.json index 8a582096..0a03290a 100644 --- a/exampleSite/content/users/users.json +++ b/exampleSite/content/users/users.json @@ -497,5 +497,13 @@ "Personal site", "Theme author" ] + }, + { + "title": "BoringTech.net", + "url": "https://boringtech.net/", + "tags": [ + "Personal Site", + "Blog" + ] } ] From 15027bf8966d3afb043708356d993ac035f59994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 11:59:54 +0000 Subject: [PATCH 08/16] :bug: Missing overflow-hidden in simple article link --- assets/lib/typeit/typeit.umd.js | 2 +- layouts/partials/article-link/simple.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/lib/typeit/typeit.umd.js b/assets/lib/typeit/typeit.umd.js index b94b0a6f..afd060fd 100644 --- a/assets/lib/typeit/typeit.umd.js +++ b/assets/lib/typeit/typeit.umd.js @@ -1,2 +1,2 @@ // TypeIt by Alex MacArthur - https://typeitjs.com -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TypeIt=t()}(this,(function(){"use strict";const e=e=>Array.isArray(e),t=t=>e(t)?t:[t];const n=e=>Array.from(e),r=e=>document.createTextNode(e);let i=e=>([...e.childNodes].forEach((e=>{if(e.nodeValue)return[...e.nodeValue].forEach((t=>{e.parentNode.insertBefore(r(t),e)})),void e.remove();i(e)})),e);const a=e=>{let t=document.implementation.createHTMLDocument();return t.body.innerHTML=e,i(t.body)},o="data-typeit-id",s="ti-cursor",l={started:!1,completed:!1,frozen:!1,destroyed:!1},u={breakLines:!0,cursor:{autoPause:!0,autoPauseDelay:500,animation:{frames:[0,0,1].map((e=>({opacity:e}))),options:{iterations:1/0,easing:"steps(2, start)",fill:"forwards"}}},cursorChar:"|",cursorSpeed:1e3,deleteSpeed:null,html:!0,lifeLike:!0,loop:!1,loopDelay:750,nextStringDelay:750,speed:100,startDelay:250,startDelete:!1,strings:[],waitUntilVisible:!1,beforeString:()=>{},afterString:()=>{},beforeStep:()=>{},afterStep:()=>{},afterComplete:()=>{}},c=`[${o}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`;function d(e,t=!1,n=!1){let r,i=e.querySelector(`.${s}`),a=document.createTreeWalker(e,NodeFilter.SHOW_ALL,{acceptNode:e=>{if(i&&n){if(e.classList?.contains(s))return NodeFilter.FILTER_ACCEPT;if(i.contains(e))return NodeFilter.FILTER_REJECT}return e.classList?.contains(s)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),o=[];for(;r=a.nextNode();)r.originalParent||(r.originalParent=r.parentNode),o.push(r);return t?o.reverse():o}function f(e,t=!0){return t?d(a(e)):n(e).map(r)}const h=e=>document.createElement(e),y=(e,t="")=>{let n=h("style");n.id=t,n.appendChild(r(e)),document.head.appendChild(n)},p=t=>(e(t)||(t=[t/2,t/2]),t),m=(e,t)=>Math.abs(Math.random()*(e+t-(e-t))+(e-t));let g=e=>e/2;const b=e=>"value"in e;let w=e=>"function"==typeof e?e():e;const T=e=>Number.isInteger(e);let v=(e,t=document,n=!1)=>t["querySelector"+(n?"All":"")](e);const E=(e,t)=>Object.assign({},e,t);let P={"font-family":"","font-weight":"","font-size":"","font-style":"","line-height":"",color:"",transform:"translateX(-.125em)"};const S=(e,t)=>new Array(t).fill(e),N=({queueItems:e,selector:t,cursorPosition:n,to:r})=>{if(T(t))return-1*t;let i=new RegExp("END","i").test(r),a=t?[...e].reverse().findIndex((({char:e})=>{let n=e.parentElement,r=n.matches(t);return!(!i||!r)||r&&n.firstChild.isSameNode(e)})):-1;return a<0&&(a=i?0:e.length-1),a-n+(i?0:1)};let L=e=>new Promise((t=>{requestAnimationFrame((async()=>{t(await e())}))})),C=e=>e?.getAnimations().find((t=>t.id===e.dataset.tiAnimationId)),D=({cursor:e,frames:t,options:n})=>{let r=e.animate(t,n);return r.pause(),r.id=e.dataset.tiAnimationId,L((()=>{L((()=>{r.play()}))})),r},I=e=>e.func?.call(null),M=async({index:e,queueItems:t,wait:n,cursor:r,cursorOptions:i})=>{let a=t[e][1],o=[],s=e,l=a,u=()=>l&&!l.delay,c=a.shouldPauseCursor()&&i.autoPause;for(;u();)o.push(l),u()&&s++,l=t[s]?t[s][1]:null;if(o.length)return await L((async()=>{for(let e of o)await I(e)})),s-1;let d,f=C(r);return f&&(d={...f.effect.getComputedTiming(),delay:c?i.autoPauseDelay:0}),await n((async()=>{f&&c&&f.cancel(),await L((()=>{I(a)}))}),a.delay),await(({cursor:e,options:t,cursorOptions:n})=>{if(!e||!n)return;let r,i=C(e);i&&(t.delay=i.effect.getComputedTiming().delay,r=i.currentTime,i.cancel());let a=D({cursor:e,frames:n.animation.frames,options:t});return r&&(a.currentTime=r),a})({cursor:r,options:d,cursorOptions:i}),e};return function(e,r={}){let L=async(e,t,n=!1)=>{K.frozen&&await new Promise((e=>{this.unfreeze=()=>{K.frozen=!1,e()}})),n||await Y.beforeStep(this),await((e,t,n)=>new Promise((r=>{n.push(setTimeout((async()=>{await e(),r()}),t||0))})))(e,t,W),n||await Y.afterStep(this)},C=(e,t)=>M({index:e,queueItems:t,wait:L,cursor:ne,cursorOptions:Y.cursor}),I=e=>((e,t)=>{if(!e)return;let n=e.parentNode;(n.childNodes.length>1||n.isSameNode(t)?e:n).remove()})(e,J),x=()=>b(J),A=(e=0)=>function(e){let{speed:t,deleteSpeed:n,lifeLike:r}=e;return n=null!==n?n:t/3,r?[m(t,g(t)),m(n,g(n))]:[t,n]}(Y)[e],$=()=>(e=>b(e)?n(e.value):d(e,!0).filter((e=>!(e.childNodes.length>0))))(J),H=(e,t)=>(ee.add(e),((e={})=>{let t=e.delay;t&&ee.add({delay:t})})(t),this),O=()=>G??X,F=(e={})=>[{func:()=>j(e)},{func:()=>j(Y)}],k=e=>{let t=Y.nextStringDelay;ee.add([{delay:t[0]},...e,{delay:t[1]}])},R=async()=>{if(!x()&&ne&&J.appendChild(ne),te){((e,t)=>{let n=`[${o}='${e}'] .${s}`,r=getComputedStyle(t),i=Object.entries(P).reduce(((e,[t,n])=>`${e} ${t}: var(--ti-cursor-${t}, ${n||r[t]});`),"");y(`${n} { display: inline-block; width: 0; ${i} }`,e)})(Z,J),ne.dataset.tiAnimationId=Z;let{animation:e}=Y.cursor,{frames:t,options:n}=e;D({frames:t,cursor:ne,options:{duration:Y.cursorSpeed,...n}})}},q=()=>{let e=Y.strings.filter((e=>!!e));e.forEach(((t,n)=>{if(this.type(t),n+1===e.length)return;let r=Y.breakLines?[{func:()=>_(h("BR")),typeable:!0}]:S({func:Q,delay:A(1)},ee.getTypeable().length);k(r)}))},z=async(e=!0)=>{K.started=!0;let t=t=>{ee.done(t,!e)};try{let n=[...ee.getQueue()];for(let e=0;ee+t)).forEach((e=>{let[r]=n[e];t(r)})),e=r}t(r)}}if(!e)return this;if(K.completed=!0,await Y.afterComplete(this),!Y.loop)throw"";let r=Y.loopDelay;L((async()=>{await(async e=>{let t=O();t&&await B({value:t});let n=$().map((e=>[Symbol(),{func:Q,delay:A(1),deletable:!0,shouldPauseCursor:()=>!0}]));for(let r=0;r{var t,n,r;t=e,n=X,r=$(),X=Math.min(Math.max(n+t,0),r.length),((e,t,n)=>{let r=t[n-1],i=v(`.${s}`,e);(e=r?.parentNode||e).insertBefore(i,r||null)})(J,$(),X)},_=e=>((e,t)=>{if(b(e))return void(e.value=`${e.value}${t.textContent}`);t.innerHTML="";let n=(r=t.originalParent,/body/i.test(r?.tagName)?e:t.originalParent||e);var r;n.insertBefore(t,v("."+s,n)||null)})(J,e),j=async e=>Y=E(Y,e),V=async()=>{x()?J.value="":$().forEach(I)},Q=()=>{let e=$();e.length&&(x()?J.value=J.value.slice(0,-1):I(e[X]))};this.break=function(e){return H({func:()=>_(h("BR")),typeable:!0},e)},this.delete=function(e=null,t={}){e=w(e);let n=F(t),r=e,{instant:i,to:a}=t,o=ee.getTypeable(),s=null===r?o.length:T(r)?r:N({queueItems:o,selector:r,cursorPosition:O(),to:a});return H([n[0],...S({func:Q,delay:i?0:A(1),deletable:!0},s),n[1]],t)},this.empty=function(e={}){return H({func:V},e)},this.exec=function(e,t={}){let n=F(t);return H([n[0],{func:()=>e(this)},n[1]],t)},this.move=function(e,t={}){e=w(e);let n=F(t),{instant:r,to:i}=t,a=N({queueItems:ee.getTypeable(),selector:null===e?"":e,to:i,cursorPosition:O()}),o=a<0?-1:1;return G=O()+a,H([n[0],...S({func:()=>B(o),delay:r?0:A(),cursorable:!0},Math.abs(a)),n[1]],t)},this.options=function(e,t={}){return e=w(e),j(e),H({},t)},this.pause=function(e,t={}){return H({delay:w(e)},t)},this.type=function(e,t={}){e=w(e);let{instant:n}=t,r=F(t),i=f(e,Y.html).map((e=>{return{func:()=>_(e),char:e,delay:n||(t=e,/<(.+)>(.*?)<\/(.+)>/.test(t.outerHTML))?0:A(),typeable:e.nodeType===Node.TEXT_NODE};var t})),a=[r[0],{func:async()=>await Y.beforeString(e,this)},...i,{func:async()=>await Y.afterString(e,this)},r[1]];return H(a,t)},this.is=function(e){return K[e]},this.destroy=function(e=!0){W.forEach(clearTimeout),W=[],w(e)&&ne&&I(ne),K.destroyed=!0},this.freeze=function(){K.frozen=!0},this.unfreeze=()=>{},this.reset=function(e){!this.is("destroyed")&&this.destroy(),e?(ee.wipe(),e(this)):ee.reset(),X=0;for(let t in K)K[t]=!1;return J[x()?"value":"innerHTML"]="",this},this.go=function(){return K.started?this:(R(),Y.waitUntilVisible?(((e,t)=>{new IntersectionObserver(((n,r)=>{n.forEach((n=>{n.isIntersecting&&(t(),r.unobserve(e))}))}),{threshold:1}).observe(e)})(J,z.bind(this)),this):(z(),this))},this.flush=function(e=(()=>{})){return R(),z(!1).then(e),this},this.getQueue=()=>ee,this.getOptions=()=>Y,this.updateOptions=e=>j(e),this.getElement=()=>J;let J="string"==typeof(U=e)?v(U):U;var U;let W=[],X=0,G=null,K=E({},l);r.cursor=(e=>{if("object"==typeof e){let t={},{frames:n,options:r}=u.cursor.animation;return t.animation=e.animation||{},t.animation.frames=e.animation?.frames||n,t.animation.options=E(r,e.animation?.options||{}),t.autoPause=e.autoPause??u.cursor.autoPause,t.autoPauseDelay=e.autoPauseDelay||u.cursor.autoPauseDelay,t}return!0===e?u.cursor:e})(r.cursor??u.cursor);let Y=E(u,r);Y=E(Y,{html:!x()&&Y.html,nextStringDelay:p(Y.nextStringDelay),loopDelay:p(Y.loopDelay)});let Z=Math.random().toString().substring(2,9),ee=function(e){let n=function(e){return t(e).forEach((e=>a.set(Symbol(e.char?.innerText),r({...e})))),this},r=e=>(e.shouldPauseCursor=function(){return Boolean(this.typeable||this.cursorable||this.deletable)},e),i=()=>Array.from(a.values()),a=new Map;return n(e),{add:n,set:function(e,t){let n=[...a.keys()];a.set(n[e],r(t))},wipe:function(){a=new Map,n(e)},reset:function(){a.forEach((e=>delete e.done))},destroy:e=>a.delete(e),done:(e,t=!1)=>t?a.delete(e):a.get(e).done=!0,getItems:(e=!1)=>e?i():i().filter((e=>!e.done)),getQueue:()=>a,getTypeable:()=>i().filter((e=>e.typeable))}}([{delay:Y.startDelay}]);J.dataset.typeitId=Z,y(c);let te=!!Y.cursor&&!x(),ne=(()=>{if(x())return;let e=h("span");return e.className=s,te?(e.innerHTML=a(Y.cursorChar).innerHTML,e):(e.style.visibility="hidden",e)})();Y.strings=(e=>{let t=J.innerHTML;return t?(J.innerHTML="",Y.startDelete?(J.innerHTML=t,i(J),k(S({func:Q,delay:A(1),deletable:!0},$().length)),e):t.replace(//g,"").trim().split(//).concat(e)):e})(t(Y.strings)),Y.strings.length&&q()}})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TypeIt=t()}(this,(function(){"use strict";const e=e=>Array.isArray(e),t=t=>e(t)?t:[t];const s="data-typeit-id",i="ti-cursor",r={started:!1,completed:!1,frozen:!1,destroyed:!1},n={breakLines:!0,cursor:{autoPause:!0,autoPauseDelay:500,animation:{frames:[0,0,1].map((e=>({opacity:e}))),options:{iterations:1/0,easing:"steps(2, start)",fill:"forwards"}}},cursorChar:"|",cursorSpeed:1e3,deleteSpeed:null,html:!0,lifeLike:!0,loop:!1,loopDelay:750,nextStringDelay:750,speed:100,startDelay:250,startDelete:!1,strings:[],waitUntilVisible:!1,beforeString:()=>{},afterString:()=>{},beforeStep:()=>{},afterStep:()=>{},afterComplete:()=>{}},o=`[${s}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`,a=e=>document.createElement(e),u=e=>document.createTextNode(e),l=(e,t="")=>{let s=a("style");s.id=t,s.appendChild(u(e)),document.head.appendChild(s)},h=t=>(e(t)||(t=[t/2,t/2]),t),d=(e,t)=>Math.abs(Math.random()*(e+t-(e-t))+(e-t));let p=e=>e/2;const c=e=>Array.from(e);let m=e=>([...e.childNodes].forEach((e=>{if(e.nodeValue)return[...e.nodeValue].forEach((t=>{e.parentNode.insertBefore(u(t),e)})),void e.remove();m(e)})),e);const f=e=>{let t=document.implementation.createHTMLDocument();return t.body.innerHTML=e,m(t.body)};function y(e,t=!1,s=!1){let r,n=e.querySelector(`.${i}`),o=document.createTreeWalker(e,NodeFilter.SHOW_ALL,{acceptNode:e=>{if(n&&s){if(e.classList?.contains(i))return NodeFilter.FILTER_ACCEPT;if(n.contains(e))return NodeFilter.FILTER_REJECT}return e.classList?.contains(i)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),a=[];for(;r=o.nextNode();)r.originalParent||(r.originalParent=r.parentNode),a.push(r);return t?a.reverse():a}function g(e,t=!0){return t?y(f(e)):c(e).map(u)}const b=e=>Number.isInteger(e),P=({queueItems:e,selector:t,cursorPosition:s,to:i})=>{if(b(t))return-1*t;let r=new RegExp("END","i").test(i),n=t?[...e].reverse().findIndex((({char:e})=>{let s=e.parentElement,i=s.matches(t);return!(!r||!i)||i&&s.firstChild.isSameNode(e)})):-1;return n<0&&(n=r?0:e.length-1),n-s+(r?0:1)},C=(e,t)=>new Array(t).fill(e);let v=e=>new Promise((t=>{requestAnimationFrame((async()=>{t(await e())}))})),T=e=>e?.getAnimations().find((t=>t.id===e.dataset.tiAnimationId)),w=({cursor:e,frames:t,options:s})=>{let i=e.animate(t,s);return i.pause(),i.id=e.dataset.tiAnimationId,v((()=>{v((()=>{i.play()}))})),i},I=e=>e.func?.call(null),q=async({index:e,queueItems:t,wait:s,cursor:i,cursorOptions:r})=>{let n=t[e][1],o=[],a=e,u=n,l=()=>u&&!u.delay,h=n.shouldPauseCursor()&&r.autoPause;for(;l();)o.push(u),l()&&a++,u=t[a]?t[a][1]:null;if(o.length)return await v((async()=>{for(let e of o)await I(e)})),a-1;let d,p=T(i);return p&&(d={...p.effect.getComputedTiming(),delay:h?r.autoPauseDelay:0}),await s((async()=>{p&&h&&p.cancel(),await v((()=>{I(n)}))}),n.delay),await(({cursor:e,options:t,cursorOptions:s})=>{if(!e||!s)return;let i,r=T(e);r&&(t.delay=r.effect.getComputedTiming().delay,i=r.currentTime,r.cancel());let n=w({cursor:e,frames:s.animation.frames,options:t});return i&&(n.currentTime=i),n})({cursor:i,options:d,cursorOptions:r}),e};const S=e=>"value"in e;let N=e=>"function"==typeof e?e():e,A=(e,t=document,s=!1)=>t["querySelector"+(s?"All":"")](e);const E=(e,t)=>Object.assign({},e,t);let L={"font-family":"","font-weight":"","font-size":"","font-style":"","line-height":"",color:"",transform:"translateX(-.125em)"};return class{element;timeouts;cursorPosition;predictedCursorPosition;statuses={started:!1,completed:!1,frozen:!1,destroyed:!1};opts;id;queue;cursor;unfreeze=()=>{};constructor(e,s={}){var i;this.opts=E(n,s),this.element="string"==typeof(i=e)?A(i):i,this.timeouts=[],this.cursorPosition=0,this.unfreeze=()=>{},this.predictedCursorPosition=null,this.statuses=E({},r),this.id=Math.random().toString().substring(2,9),this.queue=function(e){let s=function(e){return t(e).forEach((e=>n.set(Symbol(e.char?.innerText),i({...e})))),this},i=e=>(e.shouldPauseCursor=function(){return Boolean(this.typeable||this.cursorable||this.deletable)},e),r=()=>Array.from(n.values()),n=new Map;return s(e),{add:s,set:function(e,t){let s=[...n.keys()];n.set(s[e],i(t))},wipe:function(){n=new Map,s(e)},done:(e,t=!1)=>t?n.delete(e):n.get(e).done=!0,reset:function(){n.forEach((e=>delete e.done))},destroy:e=>n.delete(e),getItems:(e=!1)=>e?r():r().filter((e=>!e.done)),getQueue:()=>n,getTypeable:()=>r().filter((e=>e.typeable))}}([{delay:this.opts.startDelay}]),this.#e(s),this.cursor=this.#t(),this.element.dataset.typeitId=this.id,l(o),this.opts.strings.length&&this.#s()}go(){return this.statuses.started?this:(this.#i(),this.opts.waitUntilVisible?(e=this.element,t=this.#r.bind(this),new IntersectionObserver(((s,i)=>{s.forEach((s=>{s.isIntersecting&&(t(),i.unobserve(e))}))}),{threshold:1}).observe(e),this):(this.#r(),this));var e,t}destroy(e=!0){this.timeouts=(this.timeouts.forEach(clearTimeout),[]),N(e)&&this.cursor&&this.#n(this.cursor),this.statuses.destroyed=!0}reset(e){!this.is("destroyed")&&this.destroy(),e?(this.queue.wipe(),e(this)):this.queue.reset(),this.cursorPosition=0;for(let t in this.statuses)this.statuses[t]=!1;return this.element[this.#o()?"value":"innerHTML"]="",this}is=function(e){return this.statuses[e]};type(e,t={}){e=N(e);let{instant:s}=t,i=this.#a(t),r=g(e,this.opts.html).map((e=>{return{func:()=>this.#u(e),char:e,delay:s||(t=e,/<(.+)>(.*?)<\/(.+)>/.test(t.outerHTML))?0:this.#l(),typeable:e.nodeType===Node.TEXT_NODE};var t})),n=[i[0],{func:async()=>await this.opts.beforeString(e,this)},...r,{func:async()=>await this.opts.afterString(e,this)},i[1]];return this.#h(n,t)}break(e={}){return this.#h({func:()=>this.#u(a("BR")),typeable:!0},e)}move(e,t={}){e=N(e);let s=this.#a(t),{instant:i,to:r}=t,n=P({queueItems:this.queue.getTypeable(),selector:null===e?"":e,to:r,cursorPosition:this.#d}),o=n<0?-1:1;return this.predictedCursorPosition=this.#d+n,this.#h([s[0],...C({func:()=>this.#p(o),delay:i?0:this.#l(),cursorable:!0},Math.abs(n)),s[1]],t)}exec(e,t={}){let s=this.#a(t);return this.#h([s[0],{func:()=>e(this)},s[1]],t)}options(e,t={}){return e=N(e),this.#c(e),this.#h({},t)}pause(e,t={}){return this.#h({delay:N(e)},t)}delete(e=null,t={}){e=N(e);let s=this.#a(t),i=e,{instant:r,to:n}=t,o=this.queue.getTypeable(),a=(()=>null===i?o.length:b(i)?i:P({queueItems:o,selector:i,cursorPosition:this.#d,to:n}))();return this.#h([s[0],...C({func:this.#m.bind(this),delay:r?0:this.#l(1),deletable:!0},a),s[1]],t)}freeze(){this.statuses.frozen=!0}flush(e=(()=>{})){return this.#i(),this.#r(!1).then(e),this}getQueue(){return this.queue}getOptions(){return this.opts}updateOptions(e){return this.#c(e)}getElement(){return this.element}empty(e={}){return this.#h({func:this.#f.bind(this)},e)}async#f(){this.#o()?this.element.value="":this.#y.forEach(this.#n.bind(this))}async#r(e=!0){this.statuses.started=!0;let t=t=>{this.queue.done(t,!e)};try{let s=[...this.queue.getQueue()];for(let e=0;ee+t)).forEach((e=>{let[i]=s[e];t(i)})),e=i}t(i)}}if(!e)return this;if(this.statuses.completed=!0,await this.opts.afterComplete(this),!this.opts.loop)throw"";let i=this.opts.loopDelay;this.#b((async()=>{await this.#P(i[0]),this.#r()}),i[1])}catch(s){}return this}async#p(e){var t,s,r;this.cursorPosition=(t=e,s=this.cursorPosition,r=this.#y,Math.min(Math.max(s+t,0),r.length)),((e,t,s)=>{let r=t[s-1],n=A(`.${i}`,e);(e=r?.parentNode||e).insertBefore(n,r||null)})(this.element,this.#y,this.cursorPosition)}async#P(e){let t=this.#d;t&&await this.#p({value:t});let s=this.#y.map((e=>[Symbol(),{func:this.#m.bind(this),delay:this.#l(1),deletable:!0,shouldPauseCursor:()=>!0}]));for(let i=0;i{this.unfreeze=()=>{this.statuses.frozen=!1,e()}})),s||await this.opts.beforeStep(this),await((e,t,s)=>new Promise((i=>{s.push(setTimeout((async()=>{await e(),i()}),t||0))})))(e,t,this.timeouts),s||await this.opts.afterStep(this)}async#i(){if(!this.#o()&&this.cursor&&this.element.appendChild(this.cursor),this.#C){((e,t)=>{let r=`[${s}='${e}'] .${i}`,n=getComputedStyle(t),o=Object.entries(L).reduce(((e,[t,s])=>`${e} ${t}: var(--ti-cursor-${t}, ${s||n[t]});`),"");l(`${r} { display: inline-block; width: 0; ${o} }`,e)})(this.id,this.element),this.cursor.dataset.tiAnimationId=this.id;let{animation:e}=this.opts.cursor,{frames:t,options:r}=e;w({frames:t,cursor:this.cursor,options:{duration:this.opts.cursorSpeed,...r}})}}#o(){return S(this.element)}#h(e,t){return this.queue.add(e),this.#v(t),this}#v(e={}){let t=e.delay;t&&this.queue.add({delay:t})}#a(e={}){return[{func:()=>this.#c(e)},{func:()=>this.#c(this.opts)}]}async#c(e){this.opts=E(this.opts,e)}#s(){let e=this.opts.strings.filter((e=>!!e));e.forEach(((t,s)=>{if(this.type(t),s+1===e.length)return;let i=this.opts.breakLines?[{func:()=>this.#u(a("BR")),typeable:!0}]:C({func:this.#m.bind(this),delay:this.#l(1)},this.queue.getTypeable().length);this.#T(i)}))}#e=e=>{e.cursor=(e=>{if("object"==typeof e){let t={},{frames:s,options:i}=n.cursor.animation;return t.animation=e.animation||{},t.animation.frames=e.animation?.frames||s,t.animation.options=E(i,e.animation?.options||{}),t.autoPause=e.autoPause??n.cursor.autoPause,t.autoPauseDelay=e.autoPauseDelay||n.cursor.autoPauseDelay,t}return!0===e?n.cursor:e})(e.cursor??n.cursor),this.opts.strings=this.#w(t(this.opts.strings)),this.opts=E(this.opts,{html:!this.#I&&this.opts.html,nextStringDelay:h(this.opts.nextStringDelay),loopDelay:h(this.opts.loopDelay)})};#w(e){let t=this.element.innerHTML;return t?(this.element.innerHTML="",this.opts.startDelete?(this.element.innerHTML=t,m(this.element),this.#T(C({func:this.#m.bind(this),delay:this.#l(1),deletable:!0},this.#y.length)),e):(s=t,s.replace(//g,"").trim().split(//)).concat(e)):e;var s}#t(){if(this.#I)return null;let e=a("span");return e.className=i,this.#C?(e.innerHTML=f(this.opts.cursorChar).innerHTML,e):(e.style.visibility="hidden",e)}#T(e){let t=this.opts.nextStringDelay;this.queue.add([{delay:t[0]},...e,{delay:t[1]}])}#u(e){((e,t)=>{if(S(e))return void(e.value=`${e.value}${t.textContent}`);t.innerHTML="";let s=(r=t.originalParent,/body/i.test(r?.tagName)?e:t.originalParent||e);var r;s.insertBefore(t,A("."+i,s)||null)})(this.element,e)}#m(){this.#y.length&&(this.#I?this.element.value=this.element.value.slice(0,-1):this.#n(this.#y[this.cursorPosition]))}#n(e){((e,t)=>{if(!e)return;let s=e.parentNode;(s.childNodes.length>1||s.isSameNode(t)?e:s).remove()})(e,this.element)}#l(e=0){return function(e){let{speed:t,deleteSpeed:s,lifeLike:i}=e;return s=null!==s?s:t/3,i?[d(t,p(t)),d(s,p(s))]:[t,s]}(this.opts)[e]}get#d(){return this.predictedCursorPosition??this.cursorPosition}get#I(){return S(this.element)}get#C(){return!!this.opts.cursor&&!this.#I}get#y(){return e=this.element,S(e)?c(e.value):y(e,!0).filter((e=>!(e.childNodes.length>0)));var e}}})); diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html index 48718a66..75b5bfde 100644 --- a/layouts/partials/article-link/simple.html +++ b/layouts/partials/article-link/simple.html @@ -2,7 +2,7 @@ {{ $articleClasses := "flex flex-wrap article" }} {{ if .Site.Params.list.showCards }} -{{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md backdrop-blur") " " }} +{{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md backdrop-blur overflow-hidden") " " }} {{ else }} {{ $articleClasses = delimit (slice $articleClasses "") " " }} {{ end }} From 4c9e372ef7f34120e844a8037f1c6d4a06d473b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 12:15:20 +0000 Subject: [PATCH 09/16] Heading first-child styling not working --- layouts/_default/_markup/render-heading.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html index cb1514e6..f76eb43c 100644 --- a/layouts/_default/_markup/render-heading.html +++ b/layouts/_default/_markup/render-heading.html @@ -1,8 +1,10 @@ -
{{ .Text | safeHTML }} - {{ if.Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }} + {{ if.Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }} + # + style="text-decoration-line: none !important;" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}"># + {{ end }} From 60bdf84f37c5c9c8b50e8dda245d3218e818e57c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 12:50:30 +0000 Subject: [PATCH 10/16] Don't center-align code within blocks --- assets/css/compiled/main.css | 4 ++++ assets/css/main.css | 4 ++++ exampleSite/content/_index.md | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index baebb65c..e05cb96f 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -4914,6 +4914,10 @@ body:has(#menu-controller:checked) { /* Custom */ +pre { + text-align: left; +} + .thumbnail { min-width: 300px; height: 180px; diff --git a/assets/css/main.css b/assets/css/main.css index bc69caeb..fbb6ce8e 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -339,6 +339,10 @@ body:has(#menu-controller:checked) { /* Custom */ +pre { + text-align: left; +} + .thumbnail { min-width: 300px; height: 180px; diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 312cf241..eeb5c04f 100755 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -5,6 +5,10 @@ description: "This is a demo of the Blowfish theme for Hugo." This is a demo site built entirely using Blowfish. It also contains a complete set of [theme documentation]({{< ref "docs" >}}). Blowfish is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts. +``` +var blowfish = require('blowfish'); +``` +
{{< icon "triangle-exclamation" >}} From 24cd703277248e359874c41b8cd93fb3084cabe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 13:15:45 +0000 Subject: [PATCH 11/16] Missing pointer-cursor for tag-badge in article view --- exampleSite/content/_index.md | 4 ---- layouts/partials/article-meta/basic.html | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index eeb5c04f..312cf241 100755 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -5,10 +5,6 @@ description: "This is a demo of the Blowfish theme for Hugo." This is a demo site built entirely using Blowfish. It also contains a complete set of [theme documentation]({{< ref "docs" >}}). Blowfish is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts. -``` -var blowfish = require('blowfish'); -``` -
{{< icon "triangle-exclamation" >}} diff --git a/layouts/partials/article-meta/basic.html b/layouts/partials/article-meta/basic.html index dcb87597..8608663f 100644 --- a/layouts/partials/article-meta/basic.html +++ b/layouts/partials/article-meta/basic.html @@ -47,7 +47,7 @@ {{ end }} -
+
{{/* Output partials */}} {{ with ($meta.Get "partials") }} {{ delimit . "·" | safeHTML }} @@ -60,7 +60,7 @@
{{ if .Params.showAuthorsBadges | default (.Site.Params.article.showAuthorsBadges | default false) }} -
+
{{ range $taxonomy, $terms := .Site.Taxonomies }} {{ if (eq $taxonomy "authors")}} {{ if (gt (len ($context.GetTerms $taxonomy)) 0) }} @@ -75,7 +75,7 @@ {{/* Output taxonomies */}} {{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }} -
+
{{ range $taxonomy, $terms := .Site.Taxonomies }} {{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series"))}} {{ if (gt (len ($context.GetTerms $taxonomy)) 0) }} From 242c43ed78263d598eacc847bc7f968a7a4e04c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 13:20:24 +0000 Subject: [PATCH 12/16] Empty hamburger visible --- layouts/partials/header/basic.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index 720964c2..a9b1e991 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -88,6 +88,7 @@
From 33b3302a6199f81ac5fb97b7085d8ed4322504e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 13:28:24 +0000 Subject: [PATCH 13/16] Add option to hide text in header --- config/_default/params.toml | 3 ++- exampleSite/config/_default/params.toml | 1 + exampleSite/content/docs/configuration/index.md | 1 + layouts/partials/header/basic.html | 3 ++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/_default/params.toml b/config/_default/params.toml index 7ac39c58..7ddfd3b5 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -15,7 +15,8 @@ enableCodeCopy = false # mainSections = ["section1", "section2"] # robots = "" -disableImageOptimization = true +disableImageOptimization = false +disableTextInHeader = false # defaultBackgroundImage = "IMAGE.jpg" # used as default for background images # defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index ff6665f5..ccdbb1c4 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -16,6 +16,7 @@ mainSections = ["docs"] # robots = "" disableImageOptimization = false +disableTextInHeader = false defaultBackgroundImage = "/img/ocean.jpg" defaultFeaturedImage = "/img/ocean.jpg" diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 5d570ccc..87b1e790 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -167,6 +167,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `robots` | _Not set_ | String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values. | | `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | | `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. | +| `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. | | `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | | `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overriden by a local `featured` image. | | `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main manu when selected | diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index a9b1e991..6446136a 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -17,10 +17,11 @@