compost-jekyll-theme 0.1.15 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -0
- data/_data/manifest.json +6 -6
- data/_data/schema.yml +18 -0
- data/_includes/author_block.html +16 -14
- data/_includes/header_toggler.html +2 -2
- data/_layouts/default_with_menu.html +1 -1
- data/_layouts/home.html +1 -1
- data/_sass/toggler.scss +2 -0
- data/assets/js/{pack.3PREOLVY.js → pack.27TCBNGN.js} +2 -2
- data/assets/js/{pack.3PREOLVY.js.map → pack.27TCBNGN.js.map} +2 -2
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eafaeb61761f1647898feca81b5969c958cc099bd3df0ac137763a7c8635c6ff
|
4
|
+
data.tar.gz: e0c589d91c54e3aca8479b9df45bc6f24df15baf13714abd24683ceb60d36efd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1609dd3ab9ca4febfd747258e88d5b9395b2fe018b9be5d42b5f37d96e1d997aae737f70c28f2575ba82808c1056114ccf206889e6c503ece676281fc4e17c07
|
7
|
+
data.tar.gz: 2178a8a64cd0f383ac98c32cf9fd64dc410b0996506361e611f13eb699972659eb984af6c34c9e9f9df50907f68b66396e71d40daa0ce4c68a1654175056bcaf
|
data/README.md
CHANGED
@@ -53,6 +53,17 @@ When your theme is released, only the files in `_layouts`, `_includes`,
|
|
53
53
|
directory to your theme-gem, please edit the regexp in
|
54
54
|
`compost-jekyll-theme.gemspec` accordingly.
|
55
55
|
|
56
|
+
If you do not see the images when you compile the site you may need to
|
57
|
+
install `git-lfs` on your [distribution](https://github.com/git-lfs/git-lfs).
|
58
|
+
|
59
|
+
After that run it in the repository
|
60
|
+
|
61
|
+
```
|
62
|
+
git lfs install
|
63
|
+
git lfs fetch
|
64
|
+
git lfs checkout
|
65
|
+
```
|
66
|
+
|
56
67
|
## License
|
57
68
|
|
58
69
|
Copyright 2022 Cooperativa de Trabajo Sutty Ltda.
|
data/_data/manifest.json
CHANGED
@@ -981,7 +981,7 @@
|
|
981
981
|
]
|
982
982
|
},
|
983
983
|
"_packs/entry.js": {
|
984
|
-
"bytes":
|
984
|
+
"bytes": 1536,
|
985
985
|
"imports": [
|
986
986
|
{
|
987
987
|
"path": "node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/index.js",
|
@@ -1023,13 +1023,13 @@
|
|
1023
1023
|
}
|
1024
1024
|
},
|
1025
1025
|
"outputs": {
|
1026
|
-
"assets/js/pack.
|
1026
|
+
"assets/js/pack.27TCBNGN.js.map": {
|
1027
1027
|
"imports": [],
|
1028
1028
|
"exports": [],
|
1029
1029
|
"inputs": {},
|
1030
|
-
"bytes":
|
1030
|
+
"bytes": 601462
|
1031
1031
|
},
|
1032
|
-
"assets/js/pack.
|
1032
|
+
"assets/js/pack.27TCBNGN.js": {
|
1033
1033
|
"imports": [],
|
1034
1034
|
"exports": [],
|
1035
1035
|
"entryPoint": "_packs/entry.js",
|
@@ -1197,7 +1197,7 @@
|
|
1197
1197
|
"bytesInOutput": 4705
|
1198
1198
|
},
|
1199
1199
|
"_packs/entry.js": {
|
1200
|
-
"bytesInOutput":
|
1200
|
+
"bytesInOutput": 735
|
1201
1201
|
},
|
1202
1202
|
"node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/finally.js": {
|
1203
1203
|
"bytesInOutput": 200
|
@@ -1308,7 +1308,7 @@
|
|
1308
1308
|
"bytesInOutput": 1256
|
1309
1309
|
}
|
1310
1310
|
},
|
1311
|
-
"bytes":
|
1311
|
+
"bytes": 844683
|
1312
1312
|
}
|
1313
1313
|
}
|
1314
1314
|
}
|
data/_data/schema.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
organization:
|
3
|
+
theme:
|
4
|
+
- "about"
|
5
|
+
- "menu"
|
6
|
+
front_cover: []
|
7
|
+
post:
|
8
|
+
- "author"
|
9
|
+
back_cover: []
|
10
|
+
support:
|
11
|
+
- "button_copy"
|
12
|
+
- "button"
|
13
|
+
- "goal"
|
14
|
+
- "supporter"
|
15
|
+
footer:
|
16
|
+
- "privacy_policy"
|
17
|
+
- "code_of_conduct"
|
18
|
+
- "license"
|
data/_includes/author_block.html
CHANGED
@@ -8,18 +8,20 @@ Author block
|
|
8
8
|
|
9
9
|
{% assign links = include.links %}
|
10
10
|
|
11
|
-
|
12
|
-
<div class="
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
{% unless links == empty %}
|
17
|
-
<div class="background-lighter-blue text-monospace text-left p-3 mt-2 mb-2 rounded">
|
18
|
-
{% for link in links %}
|
19
|
-
<li class="list-unstyled">
|
20
|
-
<a class="black hover-white" href="{{- link -}}" target="_blank" rel="noopener">{{ link }}</a>
|
21
|
-
</li>
|
22
|
-
{% endfor %}
|
11
|
+
{% unless links == empty %}
|
12
|
+
<div class="">
|
13
|
+
<div class="py-3">
|
14
|
+
{% include headings/h3.html text=include.title class="black source-serif font-weight-bold" %}
|
23
15
|
</div>
|
24
|
-
|
25
|
-
|
16
|
+
|
17
|
+
{% unless links == empty %}
|
18
|
+
<div class="background-lighter-blue text-monospace text-left p-3 mt-2 mb-2 rounded">
|
19
|
+
{% for link in links %}
|
20
|
+
<li class="list-unstyled">
|
21
|
+
<a class="black hover-white" href="{{- link -}}" target="_blank" rel="noopener">{{ link }}</a>
|
22
|
+
</li>
|
23
|
+
{% endfor %}
|
24
|
+
</div>
|
25
|
+
{% endunless %}
|
26
|
+
</div>
|
27
|
+
{% endunless %}
|
@@ -20,7 +20,7 @@ Cabecera y menú con toggler
|
|
20
20
|
{%- assign footer = site.posts | find: "layout", "footer" -%}
|
21
21
|
|
22
22
|
<div data-controller="body-scroll" class="position-relative p-3 {{ include.background_class }}">
|
23
|
-
<div class="d-flex justify-content-between align-items-center container
|
23
|
+
<div class="d-flex justify-content-between align-items-center container mx-auto">
|
24
24
|
{%- capture menu_svg -%}
|
25
25
|
{% include menu_close.html class="w-36px w-md-54px" container_class="stroke-white" %}
|
26
26
|
{%- endcapture -%}
|
@@ -28,7 +28,7 @@ Cabecera y menú con toggler
|
|
28
28
|
{% include toggler/toggler_label.html id=menu_id class="m-0" content=menu_svg %}
|
29
29
|
|
30
30
|
{% capture toggled_content %}
|
31
|
-
<div class="background-image-menu-open background-size-100 w-100 p-
|
31
|
+
<div class="background-image-menu-open background-size-100 w-100 p-3 pb-12 border-bottom-dashed border-black">
|
32
32
|
<div class="d-flex justify-content-between align-items-center container mx-auto">
|
33
33
|
{%- capture menu_svg -%}
|
34
34
|
{% include menu_open.html class="w-36px w-md-54px" container_class="fill-black" %}
|
@@ -16,7 +16,7 @@ layout: "default"
|
|
16
16
|
btn_close_src="public/mushroom_close.gif"
|
17
17
|
btn_href=support.url
|
18
18
|
btn_alt=site.i18n.support_alt
|
19
|
-
background_class="
|
19
|
+
background_class="pb-100 background-image-menu-close background-position-center-bottom w-100 background-size-auto-100" %}
|
20
20
|
|
21
21
|
{{ content }}
|
22
22
|
|
data/_layouts/home.html
CHANGED
data/_sass/toggler.scss
CHANGED
@@ -36,5 +36,5 @@
|
|
36
36
|
|
37
37
|
%o
|
38
38
|
|
39
|
-
%o`,r,e,t),(i=window.onerror)===null||i===void 0||i.call(window,r,"",0,0,e)}logFormattedMessage(e,r,t={}){t=Object.assign({application:this},t),this.logger.groupCollapsed(`${e} #${r}`),this.logger.log("details:",Object.assign({},t)),this.logger.groupEnd()}};function bm(){return new Promise(o=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>o()):o()})}function fm(o){return dr(o,"classes").reduce((r,t)=>Object.assign(r,Lm(t)),{})}function Lm(o){return{[`${o}Class`]:{get(){let{classes:e}=this;if(e.has(o))return e.get(o);{let r=e.getAttributeName(o);throw new Error(`Missing attribute "${r}"`)}}},[`${o}Classes`]:{get(){return this.classes.getAll(o)}},[`has${nr(o)}Class`]:{get(){return this.classes.has(o)}}}}function Gm(o){return dr(o,"outlets").reduce((r,t)=>Object.assign(r,Em(t)),{})}function Em(o){let e=lt(o);return{[`${e}Outlet`]:{get(){let r=this.outlets.find(o);if(r){let t=this.application.getControllerForElementAndIdentifier(r,o);if(t)return t;throw new Error(`Missing "data-controller=${o}" attribute on outlet element for "${this.identifier}" controller`)}throw new Error(`Missing outlet element "${o}" for "${this.identifier}" controller`)}},[`${e}Outlets`]:{get(){let r=this.outlets.findAll(o);return r.length>0?r.map(t=>{let i=this.application.getControllerForElementAndIdentifier(t,o);if(i)return i;console.warn(`The provided outlet element is missing the outlet controller "${o}" for "${this.identifier}"`,t)}).filter(t=>t):[]}},[`${e}OutletElement`]:{get(){let r=this.outlets.find(o);if(r)return r;throw new Error(`Missing outlet element "${o}" for "${this.identifier}" controller`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(o)}},[`has${nr(e)}Outlet`]:{get(){return this.outlets.has(o)}}}}function ym(o){return dr(o,"targets").reduce((r,t)=>Object.assign(r,Bm(t)),{})}function Bm(o){return{[`${o}Target`]:{get(){let e=this.targets.find(o);if(e)return e;throw new Error(`Missing target element "${o}" for "${this.identifier}" controller`)}},[`${o}Targets`]:{get(){return this.targets.findAll(o)}},[`has${nr(o)}Target`]:{get(){return this.targets.has(o)}}}}function Cm(o){let e=cm(o,"values"),r={valueDescriptorMap:{get(){return e.reduce((t,i)=>{let l=ua(i,this.identifier),a=this.data.getAttributeNameForKey(l.key);return Object.assign(t,{[a]:l})},{})}}};return e.reduce((t,i)=>Object.assign(t,Nm(i)),r)}function Nm(o,e){let r=ua(o,e),{key:t,name:i,reader:l,writer:a}=r;return{[i]:{get(){let n=this.data.get(t);return n!==null?l(n):r.defaultValue},set(n){n===void 0?this.data.delete(t):this.data.set(t,a(n))}},[`has${nr(i)}`]:{get(){return this.data.has(t)||r.hasCustomDefaultValue}}}}function ua([o,e],r){return Fm({controller:r,token:o,typeDefinition:e})}function ft(o){switch(o){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function ar(o){switch(typeof o){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(o))return"array";if(Object.prototype.toString.call(o)==="[object Object]")return"object"}function Om(o){let e=ft(o.typeObject.type);if(!e)return;let r=ar(o.typeObject.default);if(e!==r){let t=o.controller?`${o.controller}.${o.token}`:o.token;throw new Error(`The specified default value for the Stimulus Value "${t}" must match the defined type "${e}". The provided default value of "${o.typeObject.default}" is of type "${r}".`)}return e}function wm(o){let e=Om({controller:o.controller,token:o.token,typeObject:o.typeDefinition}),r=ar(o.typeDefinition),t=ft(o.typeDefinition),i=e||r||t;if(i)return i;let l=o.controller?`${o.controller}.${o.typeDefinition}`:o.token;throw new Error(`Unknown value type "${l}" for "${o.token}" value`)}function Im(o){let e=ft(o);if(e)return Dm[e];let r=o.default;return r!==void 0?r:o}function Fm(o){let e=`${ga(o.token)}-value`,r=wm(o);return{type:r,key:e,name:bt(e),get defaultValue(){return Im(o.typeDefinition)},get hasCustomDefaultValue(){return ar(o.typeDefinition)!==void 0},reader:Rm[r],writer:sa[r]||sa.default}}var Dm={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Rm={array(o){let e=JSON.parse(o);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${o}" of type "${ar(e)}"`);return e},boolean(o){return!(o=="0"||String(o).toLowerCase()=="false")},number(o){return Number(o)},object(o){let e=JSON.parse(o);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${o}" of type "${ar(e)}"`);return e},string(o){return o}},sa={default:Xm,array:ma,object:ma};function ma(o){return JSON.stringify(o)}function Xm(o){return`${o}`}var C=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,r){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:r=this.element,detail:t={},prefix:i=this.identifier,bubbles:l=!0,cancelable:a=!0}={}){let n=i?`${i}:${e}`:e,d=new CustomEvent(n,{detail:t,bubbles:l,cancelable:a});return r.dispatchEvent(d),d}};C.blessings=[fm,ym,Cm,Gm];C.targets=[];C.outlets=[];C.values={};var Ur=class extends C{toggle(o){o.target.checked?(document.body.style.overflowY="hidden",this.element.style.overflowY="scroll",this.element.style.minHeight="100vh"):(document.body.style.overflowY="scroll",this.element.style.overflowY="",this.element.style.minHeight="")}};var sr=class extends C{connect(){this.element.style.zIndex=1e4,this.clientNameTarget.innerText=window.device.client.name,this.clientVersionTarget.innerText=window.device.client.version,this.osNameTarget.innerText=window.device.os.name,this.osVersionTarget.innerText=window.device.os.version,this.deviceTypeTarget.innerText=window.device.device.type,this.viewportWidthTarget.innerText=window.innerWidth,this.viewportHeightTarget.innerText=window.innerHeight,this.devicePixelRatioTarget.innerText=window.devicePixelRatio}resized(o){this.viewportWidthTarget.innerText=window.innerWidth,this.viewportHeightTarget.innerText=window.innerHeight}outline(o){let e=document.head.querySelector("style#outline");e?e.remove():(e=document.createElement("style"),e.id="outline",e.append("* { outline: 1px solid pink }"),document.head.appendChild(e))}toggleHelp(o){this.helpTarget.hidden=!this.helpTarget.hidden}};D(sr,"targets",["clientName","clientVersion","osName","osVersion","viewportWidth","viewportHeight","devicePixelRatio","deviceType","help"]);var be=class extends C{async copy(o){if(!("clipboard"in navigator))return;try{await navigator.clipboard.writeText(this.textValue.trim())}catch(r){console.error("Couldn't copy",r);return}let e=this.hasTextTarget?"textTarget":"element";this[e].innerText=this.confirmationValue,this.hasIconTarget&&this.iconTarget.classList.add("d-none"),this.hasConfirmationIconTarget&&this.confirmationIconTarget.classList.remove("d-none")}};D(be,"targets",["text","icon","confirmationIcon"]),D(be,"values",{text:String,confirmation:String});var me=class extends C{connect(){this.originalFootnotes=[],this.createFootnotes()}resize(o=void 0){if(this.sidenotesArePossible===void 0)return;this.offsetTopValue=0;let e=this.sidenotesArePossible,r=this.areSidenotesPossible;if(e&&r)for(let t of this.footnoteTargets)this.positionSidenote(t);else{let t=Array.from(this.footnoteTargets);for(let i in this.footnoteTargets)t[i].outerHTML=this.originalFootnotes[i];this.originalFootnotes=[],this.createFootnotes()}}createFootnotes(){let o=this.element.querySelectorAll("a[id^=fn]"),e=this.element.querySelectorAll("li[id^=fn]");this.sidenotesArePossible=this.areSidenotesPossible;for(let r in Array.from(o)){let t=o[r],i=e[r],l=i.querySelector("a[role=doc-backlink]");this.originalFootnotes.push(i.outerHTML),t.dataset.footnote=i.id,t.dataset.turbo="false",t.dataset.footnotesTarget="reference",l&&(l.dataset.turbo="false"),i.dataset.reference=t.id,setTimeout(()=>i.dataset.footnotesTarget="footnote",1+r)}}footnoteTargetConnected(o){let e=this.referenceTargets.find(r=>r.id===o.dataset.reference);if(o.style.listStylePosition="inside",this.sidenotesArePossible)this.positionSidenote(o,e);else{o.dataset.action="blur->footnotes#hide",o.classList.add(...this.footnoteToggledClasses),o.classList.add(...this.footnoteClasses),o.style.bottom=0,o.style.left=0,o.style.zIndex=1,o.dataset.height=o.offsetHeight,o.style.height=0,o.classList.add("collapsing"),o.classList.remove(...this.footnoteToggledClasses);let r=o.querySelector("a[role=doc-backlink]");r&&(r.style.display="none"),e.dataset.action="footnotes#show",e.dataset.footnotesReferenceParam=e.id,e.dataset.footnotesFootnoteParam=o.id}}get areSidenotesPossible(){let o=document.body.offsetWidth,e=this.containerWidthValue+this.paddingLeftValue+this.sidenoteWidthValue*2;return o>e}positionSidenote(o,e=void 0){e||(e=this.referenceTargets.find(l=>l.id===o.dataset.reference));let r=o.querySelector("a[role=doc-backlink]"),t=Math.max(e.offsetTop,this.offsetTopValue),i=this.element.offsetLeft+this.element.offsetWidth+this.paddingLeftValue;o.style.top=`${t}px`,o.style.left=`${i}px`,o.classList.add(...this.sidenoteClasses),o.dataset.action="",e.dataset.action="",r&&(r.style.display=""),this.offsetTopValue=t+o.offsetHeight+this.minSpacingValue}show(o){let e=this.footnoteTargets.find(r=>r.id===o.params.footnote);o.preventDefault(),this.hide(),e.style.height=`${e.dataset.height}px`,e.classList.add(...this.footnoteToggledClasses),e.setAttribute("role","alert"),e.setAttribute("tabindex","0"),e.focus()}hide(o=void 0){for(let e of this.footnoteTargets)e.style.height=0,e.classList.remove(...this.footnoteToggledClasses),e.setAttribute("role","")}};D(me,"targets",["footnote","reference"]),D(me,"classes",["footnote","footnoteToggled","sidenote"]),D(me,"values",{minSpacing:{type:Number,default:20},offsetTop:{type:Number,default:0},containerWidth:{type:Number,default:780},sidenoteWidth:{type:Number,default:220},paddingLeft:{type:Number,default:16}});var fe=class extends C{async connect(){if(!this.monetizationUrlValue)return;try{let i=new URL(this.monetizationUrlValue);window.location.protocol!==i.protocol&&(i.protocol=this.protocol,this.monetizationUrlValue=i.toString())}catch{console.error("Not a valid URL",this.monetizationUrlValue);return}let o=await this.fetchBalances();if(!o)return;let e=o.balance.length-o.decimal,r=`${o.balance.slice(0,e)}.${o.balance.slice(e)}`,t=document.querySelector("html").lang;for(let i of this.goalTargets){let l=parseFloat(i.getAttribute("aria-valuemax")??"0"),a=Math.min(100,r/l*100);i.style.width=`${a}%`,i.setAttribute("aria-valuenow",r)}if(this.hasBalanceTarget){let i="currency",l=o.currency,a=new Intl.NumberFormat(t,{style:i,currency:l});this.balanceTarget.innerText=a.format(r)}if(this.hasDateTarget){let i=new Date(o.timestamp),l=new Intl.DateTimeFormat(t,{dateStyle:"full"});this.dateTarget.innerText=l.format(i)}}async fetchBalances(){try{return await(await fetch(this.monetizationUrlValue)).json()}catch(o){return console.error("Couldn't fetch",this.monetizationUrlValue,o),null}}get protocol(){return window.location.protocol==="ipfs:"?"ipns:":window.location.protocol}};D(fe,"targets",["goal","balance","date"]),D(fe,"values",{monetizationUrl:String});window.deviceDetector=new Sa.default;window.device=window.deviceDetector.parse(navigator.userAgent);!window.device.bot&&window.env.JEKYLL_ENV==="production"&&(window.airbrake=new Co({projectId:window.env.AIRBRAKE_PROJECT_ID,projectKey:window.env.AIRBRAKE_PROJECT_KEY,host:"https://panel.sutty.nl"}),console.originalError=console.error,console.error=(...o)=>(window.airbrake.notify(o.join(" ")),console.originalError(...o)));Fr();window.Stimulus=Hr.start();Stimulus.debug=window.env.JEKYLL_ENV!=="production";Stimulus.register("body-scroll",Ur);Stimulus.register("device-detector",sr);Stimulus.register("button-copy",be);Stimulus.register("footnotes",me);Stimulus.register("support-us",fe);})();
|
40
|
-
//# sourceMappingURL=pack.
|
39
|
+
%o`,r,e,t),(i=window.onerror)===null||i===void 0||i.call(window,r,"",0,0,e)}logFormattedMessage(e,r,t={}){t=Object.assign({application:this},t),this.logger.groupCollapsed(`${e} #${r}`),this.logger.log("details:",Object.assign({},t)),this.logger.groupEnd()}};function bm(){return new Promise(o=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>o()):o()})}function fm(o){return dr(o,"classes").reduce((r,t)=>Object.assign(r,Lm(t)),{})}function Lm(o){return{[`${o}Class`]:{get(){let{classes:e}=this;if(e.has(o))return e.get(o);{let r=e.getAttributeName(o);throw new Error(`Missing attribute "${r}"`)}}},[`${o}Classes`]:{get(){return this.classes.getAll(o)}},[`has${nr(o)}Class`]:{get(){return this.classes.has(o)}}}}function Gm(o){return dr(o,"outlets").reduce((r,t)=>Object.assign(r,Em(t)),{})}function Em(o){let e=lt(o);return{[`${e}Outlet`]:{get(){let r=this.outlets.find(o);if(r){let t=this.application.getControllerForElementAndIdentifier(r,o);if(t)return t;throw new Error(`Missing "data-controller=${o}" attribute on outlet element for "${this.identifier}" controller`)}throw new Error(`Missing outlet element "${o}" for "${this.identifier}" controller`)}},[`${e}Outlets`]:{get(){let r=this.outlets.findAll(o);return r.length>0?r.map(t=>{let i=this.application.getControllerForElementAndIdentifier(t,o);if(i)return i;console.warn(`The provided outlet element is missing the outlet controller "${o}" for "${this.identifier}"`,t)}).filter(t=>t):[]}},[`${e}OutletElement`]:{get(){let r=this.outlets.find(o);if(r)return r;throw new Error(`Missing outlet element "${o}" for "${this.identifier}" controller`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(o)}},[`has${nr(e)}Outlet`]:{get(){return this.outlets.has(o)}}}}function ym(o){return dr(o,"targets").reduce((r,t)=>Object.assign(r,Bm(t)),{})}function Bm(o){return{[`${o}Target`]:{get(){let e=this.targets.find(o);if(e)return e;throw new Error(`Missing target element "${o}" for "${this.identifier}" controller`)}},[`${o}Targets`]:{get(){return this.targets.findAll(o)}},[`has${nr(o)}Target`]:{get(){return this.targets.has(o)}}}}function Cm(o){let e=cm(o,"values"),r={valueDescriptorMap:{get(){return e.reduce((t,i)=>{let l=ua(i,this.identifier),a=this.data.getAttributeNameForKey(l.key);return Object.assign(t,{[a]:l})},{})}}};return e.reduce((t,i)=>Object.assign(t,Nm(i)),r)}function Nm(o,e){let r=ua(o,e),{key:t,name:i,reader:l,writer:a}=r;return{[i]:{get(){let n=this.data.get(t);return n!==null?l(n):r.defaultValue},set(n){n===void 0?this.data.delete(t):this.data.set(t,a(n))}},[`has${nr(i)}`]:{get(){return this.data.has(t)||r.hasCustomDefaultValue}}}}function ua([o,e],r){return Fm({controller:r,token:o,typeDefinition:e})}function ft(o){switch(o){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function ar(o){switch(typeof o){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(o))return"array";if(Object.prototype.toString.call(o)==="[object Object]")return"object"}function Om(o){let e=ft(o.typeObject.type);if(!e)return;let r=ar(o.typeObject.default);if(e!==r){let t=o.controller?`${o.controller}.${o.token}`:o.token;throw new Error(`The specified default value for the Stimulus Value "${t}" must match the defined type "${e}". The provided default value of "${o.typeObject.default}" is of type "${r}".`)}return e}function wm(o){let e=Om({controller:o.controller,token:o.token,typeObject:o.typeDefinition}),r=ar(o.typeDefinition),t=ft(o.typeDefinition),i=e||r||t;if(i)return i;let l=o.controller?`${o.controller}.${o.typeDefinition}`:o.token;throw new Error(`Unknown value type "${l}" for "${o.token}" value`)}function Im(o){let e=ft(o);if(e)return Dm[e];let r=o.default;return r!==void 0?r:o}function Fm(o){let e=`${ga(o.token)}-value`,r=wm(o);return{type:r,key:e,name:bt(e),get defaultValue(){return Im(o.typeDefinition)},get hasCustomDefaultValue(){return ar(o.typeDefinition)!==void 0},reader:Rm[r],writer:sa[r]||sa.default}}var Dm={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Rm={array(o){let e=JSON.parse(o);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${o}" of type "${ar(e)}"`);return e},boolean(o){return!(o=="0"||String(o).toLowerCase()=="false")},number(o){return Number(o)},object(o){let e=JSON.parse(o);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${o}" of type "${ar(e)}"`);return e},string(o){return o}},sa={default:Xm,array:ma,object:ma};function ma(o){return JSON.stringify(o)}function Xm(o){return`${o}`}var C=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,r){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:r=this.element,detail:t={},prefix:i=this.identifier,bubbles:l=!0,cancelable:a=!0}={}){let n=i?`${i}:${e}`:e,d=new CustomEvent(n,{detail:t,bubbles:l,cancelable:a});return r.dispatchEvent(d),d}};C.blessings=[fm,ym,Cm,Gm];C.targets=[];C.outlets=[];C.values={};var Ur=class extends C{toggle(o){o.target.checked?(document.body.style.overflowY="hidden",this.element.style.overflowY="scroll",this.element.style.minHeight="100vh"):(document.body.style.overflowY="scroll",this.element.style.overflowY="",this.element.style.minHeight="")}};var sr=class extends C{connect(){this.element.style.zIndex=1e4,this.clientNameTarget.innerText=window.device.client.name,this.clientVersionTarget.innerText=window.device.client.version,this.osNameTarget.innerText=window.device.os.name,this.osVersionTarget.innerText=window.device.os.version,this.deviceTypeTarget.innerText=window.device.device.type,this.viewportWidthTarget.innerText=window.innerWidth,this.viewportHeightTarget.innerText=window.innerHeight,this.devicePixelRatioTarget.innerText=window.devicePixelRatio}resized(o){this.viewportWidthTarget.innerText=window.innerWidth,this.viewportHeightTarget.innerText=window.innerHeight}outline(o){let e=document.head.querySelector("style#outline");e?e.remove():(e=document.createElement("style"),e.id="outline",e.append("* { outline: 1px solid pink }"),document.head.appendChild(e))}toggleHelp(o){this.helpTarget.hidden=!this.helpTarget.hidden}};D(sr,"targets",["clientName","clientVersion","osName","osVersion","viewportWidth","viewportHeight","devicePixelRatio","deviceType","help"]);var be=class extends C{async copy(o){if(!("clipboard"in navigator))return;try{await navigator.clipboard.writeText(this.textValue.trim())}catch(r){console.error("Couldn't copy",r);return}let e=this.hasTextTarget?"textTarget":"element";this[e].innerText=this.confirmationValue,this.hasIconTarget&&this.iconTarget.classList.add("d-none"),this.hasConfirmationIconTarget&&this.confirmationIconTarget.classList.remove("d-none")}};D(be,"targets",["text","icon","confirmationIcon"]),D(be,"values",{text:String,confirmation:String});var me=class extends C{connect(){this.originalFootnotes=[],this.createFootnotes()}resize(o=void 0){if(this.sidenotesArePossible===void 0)return;this.offsetTopValue=0;let e=this.sidenotesArePossible,r=this.areSidenotesPossible;if(e&&r)for(let t of this.footnoteTargets)this.positionSidenote(t);else{let t=Array.from(this.footnoteTargets);for(let i in this.footnoteTargets)t[i].outerHTML=this.originalFootnotes[i];this.originalFootnotes=[],this.createFootnotes()}}createFootnotes(){let o=this.element.querySelectorAll("a[id^=fn]"),e=this.element.querySelectorAll("li[id^=fn]");this.sidenotesArePossible=this.areSidenotesPossible;for(let r in Array.from(o)){let t=o[r],i=e[r],l=i.querySelector("a[role=doc-backlink]");this.originalFootnotes.push(i.outerHTML),t.dataset.footnote=i.id,t.dataset.turbo="false",t.dataset.footnotesTarget="reference",l&&(l.dataset.turbo="false"),i.dataset.reference=t.id,setTimeout(()=>i.dataset.footnotesTarget="footnote",1+r)}}footnoteTargetConnected(o){let e=this.referenceTargets.find(r=>r.id===o.dataset.reference);if(o.style.listStylePosition="inside",this.sidenotesArePossible)this.positionSidenote(o,e);else{o.dataset.action="blur->footnotes#hide",o.classList.add(...this.footnoteToggledClasses),o.classList.add(...this.footnoteClasses),o.style.bottom=0,o.style.left=0,o.style.zIndex=1,o.dataset.height=o.offsetHeight,o.style.height=0,o.classList.add("collapsing"),o.classList.remove(...this.footnoteToggledClasses);let r=o.querySelector("a[role=doc-backlink]");r&&(r.style.display="none"),e.dataset.action="footnotes#show",e.dataset.footnotesReferenceParam=e.id,e.dataset.footnotesFootnoteParam=o.id}}get areSidenotesPossible(){let o=document.body.offsetWidth,e=this.containerWidthValue+this.paddingLeftValue+this.sidenoteWidthValue*2;return o>e}positionSidenote(o,e=void 0){e||(e=this.referenceTargets.find(l=>l.id===o.dataset.reference));let r=o.querySelector("a[role=doc-backlink]"),t=Math.max(e.offsetTop,this.offsetTopValue),i=this.element.offsetLeft+this.element.offsetWidth+this.paddingLeftValue;o.style.top=`${t}px`,o.style.left=`${i}px`,o.classList.add(...this.sidenoteClasses),o.dataset.action="",e.dataset.action="",r&&(r.style.display=""),this.offsetTopValue=t+o.offsetHeight+this.minSpacingValue}show(o){let e=this.footnoteTargets.find(r=>r.id===o.params.footnote);o.preventDefault(),this.hide(),e.style.height=`${e.dataset.height}px`,e.classList.add(...this.footnoteToggledClasses),e.setAttribute("role","alert"),e.setAttribute("tabindex","0"),e.focus()}hide(o=void 0){for(let e of this.footnoteTargets)e.style.height=0,e.classList.remove(...this.footnoteToggledClasses),e.setAttribute("role","")}};D(me,"targets",["footnote","reference"]),D(me,"classes",["footnote","footnoteToggled","sidenote"]),D(me,"values",{minSpacing:{type:Number,default:20},offsetTop:{type:Number,default:0},containerWidth:{type:Number,default:780},sidenoteWidth:{type:Number,default:220},paddingLeft:{type:Number,default:16}});var fe=class extends C{async connect(){if(!this.monetizationUrlValue)return;try{let i=new URL(this.monetizationUrlValue);window.location.protocol!==i.protocol&&(i.protocol=this.protocol,this.monetizationUrlValue=i.toString())}catch{console.error("Not a valid URL",this.monetizationUrlValue);return}let o=await this.fetchBalances();if(!o)return;let e=o.balance.length-o.decimal,r=`${o.balance.slice(0,e)}.${o.balance.slice(e)}`,t=document.querySelector("html").lang;for(let i of this.goalTargets){let l=parseFloat(i.getAttribute("aria-valuemax")??"0"),a=Math.min(100,r/l*100);i.style.width=`${a}%`,i.setAttribute("aria-valuenow",r)}if(this.hasBalanceTarget){let i="currency",l=o.currency,a=new Intl.NumberFormat(t,{style:i,currency:l});this.balanceTarget.innerText=a.format(r)}if(this.hasDateTarget){let i=new Date(o.timestamp),l=new Intl.DateTimeFormat(t,{dateStyle:"full"});this.dateTarget.innerText=l.format(i)}}async fetchBalances(){try{return await(await fetch(this.monetizationUrlValue)).json()}catch(o){return console.error("Couldn't fetch",this.monetizationUrlValue,o),null}}get protocol(){return window.location.protocol==="ipfs:"?"ipns:":window.location.protocol}};D(fe,"targets",["goal","balance","date"]),D(fe,"values",{monetizationUrl:String});window.deviceDetector=new Sa.default;window.device=window.deviceDetector.parse(navigator.userAgent);try{!window.device.bot&&window.env.JEKYLL_ENV==="production"&&(window.airbrake=new Co({projectId:window.env.AIRBRAKE_PROJECT_ID,projectKey:window.env.AIRBRAKE_PROJECT_KEY,host:"https://panel.sutty.nl"}),console.originalError=console.error,console.error=(...o)=>(window.airbrake.notify(o.join(" ")),console.originalError(...o)))}catch(o){console.error(o)}Fr();window.Stimulus=Hr.start();Stimulus.debug=window.env.JEKYLL_ENV!=="production";Stimulus.register("body-scroll",Ur);Stimulus.register("device-detector",sr);Stimulus.register("button-copy",be);Stimulus.register("footnotes",me);Stimulus.register("support-us",fe);})();
|
40
|
+
//# sourceMappingURL=pack.27TCBNGN.js.map
|