internal/static: Refactor building process

This commit is contained in:
Tom Wiesing 2022-10-06 17:06:53 +02:00
parent 464b1bf5dd
commit 04c90fadac
No known key found for this signature in database
33 changed files with 33 additions and 43 deletions

View file

@ -1,6 +1,5 @@
<!DOCTYPE html>
<link rel="stylesheet" href="/static/control/control.css">
<link rel="stylesheet" href="/static/autolink/autolink.css">
<link rel="stylesheet" href="/static/control/index.css">
<title>Distillery Status Page</title>
<h1 id="top">Distillery Status Page</h1>
@ -77,5 +76,4 @@
Generated at <code>{{ .Time }}</code>
</footer>
<script src="/static/autolink/autolink.js"></script>
<script src="/static/control/control.js"></script>
<script src="/static/control/index.js"></script>

View file

@ -1,6 +1,5 @@
<!DOCTYPE html>
<link rel="stylesheet" href="/static/control/control.css">
<link rel="stylesheet" href="/static/autolink/autolink.css">
<link rel="stylesheet" href="/static/control/index.css">
<title>Distillery Status Page - {{ .Info.Slug }}</title>
<h1 id="top">Distillery Status Page - {{ .Info.Slug }}</h1>
@ -70,5 +69,4 @@
Generated at <code>{{ .Time }}</code>
</footer>
<script src="/static/autolink/autolink.js"></script>
<script src="/static/control/control.js"></script>
<script src="/static/control/index.js"></script>

View file

@ -1,7 +1,6 @@
<!DOCTYPE html>
<link rel="stylesheet" href="/static/home/home.css">
<link rel="stylesheet" href="/static/autolink/autolink.css">
<link rel="stylesheet" href="/static/home/index.css">
<title>WissKI Distillery</title>
<h1>WissKI Distillery</h1>
@ -26,5 +25,4 @@
Generated at <code>{{ .Time }}</code>
</footer>
<script src="/static/autolink/autolink.js"></script>
<script src="/static/home/home.js"></script>
<script src="/static/home/index.js"></script>

View file

@ -1,2 +0,0 @@
.header-link{opacity:0;font-size:.8em;text-decoration:none;transition:opacity .2s ease-in-out .1s;position:relative;left:.5em}h2:hover .header-link,h3:hover .header-link,h4:hover .header-link,h5:hover .header-link,h6:hover .header-link{opacity:1}
/*# sourceMappingURL=autolink.css.map */

View file

@ -1 +0,0 @@
{"mappings":"ACAA,8HAcA","sources":["autolink/autolink.css","src/autolink/autolink.css"],"sourcesContent":[".header-link {\n opacity: 0;\n font-size: .8em;\n text-decoration: none;\n transition: opacity .2s ease-in-out .1s;\n position: relative;\n left: .5em;\n}\n\nh2:hover .header-link, h3:hover .header-link, h4:hover .header-link, h5:hover .header-link, h6:hover .header-link {\n opacity: 1;\n}\n\n/*# sourceMappingURL=autolink.css.map */\n",".header-link {\n position: relative;\n left: 0.5em;\n opacity: 0;\n font-size: 0.8em;\n\n transition: opacity 0.2s ease-in-out 0.1s;\n -webkit-transition: opacity 0.2s ease-in-out 0.1s;\n -moz-transition: opacity 0.2s ease-in-out 0.1s;\n -ms-transition: opacity 0.2s ease-in-out 0.1s;\n\n text-decoration: none;\n}\n\nh2:hover .header-link,\nh3:hover .header-link,\nh4:hover .header-link,\nh5:hover .header-link,\nh6:hover .header-link {\n opacity: 1;\n}"],"names":[],"version":3,"file":"autolink.css.map"}

View file

@ -1,2 +0,0 @@
(()=>{const e=e=>{const r=document.getElementsByTagName("h"+e);Array.from(r).forEach((e=>{void 0!==e.id&&""!==e.id&&e.appendChild((e=>{const r=document.createElement("a");return r.className="header-link",r.href="#"+e,r.innerHTML="#",r})(e.id))}))};Array(6).forEach(((r,a)=>e(a+1)))})();
//# sourceMappingURL=autolink.js.map

View file

@ -1 +0,0 @@
{"mappings":"MAGA,MAQMA,EAAkBC,IACpB,MAAMC,EAAUC,SAASC,qBAAqB,IAAMH,GACpDI,MAAMC,KAAKJ,GAASK,SAASC,SACA,IAAdA,EAAOC,IAAoC,KAAdD,EAAOC,IAC/CD,EAAOE,YAZK,CAACD,IACjB,MAAME,EAASR,SAASS,cAAc,KAItC,OAHAD,EAAOE,UAAY,cACnBF,EAAOG,KAAO,IAAML,EACpBE,EAAOI,UAAY,IACZJ,CAAM,EAOUK,CAAYR,EAAOC,IAAI,GAC5C,EAINJ,MAAM,GAAGE,SAAQ,CAACU,EAAGC,IAAMlB,EAAekB,EAAI,I","sources":["src/autolink/autolink.js"],"sourcesContent":["import \"./autolink.css\";\n\n/** Adapted from http://blog.parkermoore.de/2014/08/01/header-anchor-links-in-vanilla-javascript-for-github-pages-and-jekyll/ */\nconst anchorForId = (id) => {\n const anchor = document.createElement(\"a\")\n anchor.className = \"header-link\"\n anchor.href = \"#\" + id\n anchor.innerHTML = \"#\"\n return anchor\n}\n\nconst linkifyAnchors = (level) => {\n const headers = document.getElementsByTagName(\"h\" + level);\n Array.from(headers).forEach((header) => {\n if (typeof header.id === \"undefined\" || header.id === \"\") return\n header.appendChild(anchorForId(header.id))\n })\n}\n\n// linkify all the anchors from 1 ... 6\nArray(6).forEach((_, i) => linkifyAnchors(i + 1))"],"names":["$f0312a5caa2d901c$var$linkifyAnchors","level","headers","document","getElementsByTagName","Array","from","forEach","header","id","appendChild","anchor","createElement","className","href","innerHTML","$f0312a5caa2d901c$var$anchorForId","_","i"],"version":3,"file":"autolink.js.map"}

View file

@ -1 +0,0 @@
{"mappings":"ACAA,8FAOA,gKAaA,yBACI,iCAMJ,oBAIA,qBAIA,wCAKA,kCAKA,0BAIA,sEC/CA,yBAIA,yCAIA","sources":["control/control.css","src/distillery.css","src/control/control.css"],"sourcesContent":["html {\n color: #1a1a1a;\n background-color: #fdfdfd;\n font-family: Roboto;\n font-size: 20px;\n line-height: 1.5;\n}\n\nbody {\n max-width: 36em;\n -webkit-hyphens: auto;\n hyphens: auto;\n overflow-wrap: break-word;\n text-rendering: optimizelegibility;\n font-kerning: normal;\n margin: 0 auto;\n padding: 50px;\n}\n\n@media (max-width: 600px) {\n body {\n padding: 1em;\n font-size: .9em;\n }\n}\n\nh1 {\n margin-top: 1.4em;\n}\n\nh2, h3 {\n margin-top: 1em;\n}\n\ncode {\n color: #00f;\n font-family: Roboto Mono;\n}\n\np {\n text-align: justify;\n margin: 1em 0;\n}\n\na, a:visited {\n color: #1a1a1a;\n}\n\nfooter {\n text-align: center;\n border-top: 1px solid #1a1a1a;\n font-size: small;\n}\n\n.wisski {\n padding-left: 5px;\n}\n\n.wisski.running {\n background-color: #9ada07;\n}\n\n.wisski.stopped {\n background-color: #ff7a7a;\n}\n\n/*# sourceMappingURL=control.css.map */\n","html {\n line-height: 1.5;\n font-family: Roboto;\n font-size: 20px;\n color: #1a1a1a;\n background-color: #fdfdfd;\n}\nbody {\n margin: 0 auto;\n max-width: 36em;\n padding-left: 50px;\n padding-right: 50px;\n padding-top: 50px;\n padding-bottom: 50px;\n hyphens: auto;\n overflow-wrap: break-word;\n text-rendering: optimizeLegibility;\n font-kerning: normal;\n}\n\n@media (max-width: 600px) {\n body {\n font-size: 0.9em;\n padding: 1em;\n }\n}\n\nh1 {\n margin-top: 1.4em;\n}\n\nh2,h3 {\n margin-top: 1em; \n}\n\ncode {\n font-family: Roboto Mono;\n color: blue;\n}\n\np {\n margin: 1em 0;\n text-align: justify;\n}\n\na, a:visited {\n color: #1a1a1a;\n}\n\nfooter {\n border-top: 1px solid #1a1a1a;\n font-size: small;\n text-align: center;\n}\n","@import '../distillery.css';\n\n.wisski {\n padding-left: 5px;\n}\n\n.wisski.running {\n background-color: #9ADA07;\n}\n\n.wisski.stopped {\n background-color: #ff7a7a;\n}\n"],"names":[],"version":3,"file":"control.css.map"}

View file

@ -1,2 +0,0 @@
(()=>{const e={date:e=>new Date(e.innerText).toISOString(),path:e=>{const t=e.innerText.split("/");return t[t.length-1]},pathbuilders:e=>{const n=window.pathbuilders,o=document.createElement("span");let c=!1;if(Object.keys(n).forEach((e=>{c=!0;const a=e+".xml",r=n[e];o.append(t(a,e,r,"application/xml")),o.append(document.createTextNode(" "))})),!c)return"(none)";const a=document.createElement("small");return a.append(document.createTextNode("(click to download)")),o.append(a),o}},t=(e,t,n,o)=>{const c=new Blob([n],{type:o??"text/plain"}),a=document.createElement("a");return a.target="_blank",a.download=e,a.href=URL.createObjectURL(c),a.append(document.createTextNode(t)),a};Object.keys(e).forEach((t=>{const n=e[t];document.querySelectorAll("code."+t).forEach((e=>{const t=n(e);if("string"==typeof t)return e.innerHTML="",void e.appendChild(document.createTextNode(t));e.parent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.js"],"sourcesContent":["const types = {\n \"date\": (element) => {\n return (new Date(element.innerText)).toISOString()\n },\n \"path\": (element) => {\n const text = element.innerText.split(\"/\");\n return text[text.length - 1];\n },\n \"pathbuilders\": (element) => {\n const pathbuilders = window.pathbuilders; // read from context!\n const wrapper = document.createElement(\"span\");\n\n let found_one = false\n Object.keys(pathbuilders).forEach(name => {\n found_one = true\n\n const filename = name + \".xml\"\n const data = pathbuilders[name]\n const mime = \"application/xml\"\n wrapper.append(make_download_link(filename, name, data, mime))\n wrapper.append(document.createTextNode(\" \"))\n })\n\n if (!found_one) return '(none)';\n\n const small = document.createElement('small')\n small.append(document.createTextNode(\"(click to download)\"))\n wrapper.append(small)\n \n return wrapper\n }\n}\n\nconst make_download_link = (filename, title, content, type) => {\n const blob = new Blob(\n [content],\n {\n type: type ?? \"text/plain\"\n }\n );\n\n const link = document.createElement(\"a\")\n link.target = \"_blank\"\n link.download = filename\n link.href = URL.createObjectURL(blob)\n link.append(document.createTextNode(title))\n\n return link\n}\n\nObject.keys(types).forEach(key => {\n const f = types[key];\n const elements = document.querySelectorAll(\"code.\" + key)\n elements.forEach(element => {\n const newElement = f(element)\n if (typeof newElement === 'string') {\n element.innerHTML = \"\"\n element.appendChild(document.createTextNode(newElement))\n return\n }\n\n element.parentNode.replaceChild(newElement, element)\n })\n})"],"names":["$377ad6cb6486743d$var$types","date","element","Date","innerText","toISOString","path","text","split","length","pathbuilders","window","wrapper","document","createElement","found_one","Object","keys","forEach","name","filename","data","append","$377ad6cb6486743d$var$make_download_link","createTextNode","small","title","content","type","blob","Blob","link","target","download","href","URL","createObjectURL","key","f","querySelectorAll","newElement","innerHTML","appendChild","parentNode","replaceChild"],"version":3,"file":"control.js.map"}

View file

@ -1,2 +1,2 @@
html{color:#1a1a1a;background-color:#fdfdfd;font-family:Roboto;font-size:20px;line-height:1.5}body{max-width:36em;-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;text-rendering:optimizelegibility;font-kerning:normal;margin:0 auto;padding:50px}@media (max-width:600px){body{padding:1em;font-size:.9em}}h1{margin-top:1.4em}h2,h3{margin-top:1em}code{color:#00f;font-family:Roboto Mono}p{text-align:justify;margin:1em 0}a,a:visited{color:#1a1a1a}footer{text-align:center;border-top:1px solid #1a1a1a;font-size:small}
/*# sourceMappingURL=home.css.map */
html{color:#1a1a1a;background-color:#fdfdfd;font-family:Roboto;font-size:20px;line-height:1.5}body{max-width:36em;-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;text-rendering:optimizelegibility;font-kerning:normal;margin:0 auto;padding:50px}@media (max-width:600px){body{padding:1em;font-size:.9em}}h1{margin-top:1.4em}h2,h3{margin-top:1em}code{color:#00f;font-family:Roboto Mono}p{text-align:justify;margin:1em 0}a,a:visited{color:#1a1a1a}footer{text-align:center;border-top:1px solid #1a1a1a;font-size:small}.header-link{opacity:0;font-size:.8em;text-decoration:none;transition:opacity .2s ease-in-out .1s;position:relative;left:.5em}h2:hover .header-link,h3:hover .header-link,h4:hover .header-link,h5:hover .header-link,h6:hover .header-link{opacity:1}.wisski{padding-left:5px}.wisski.running{background-color:#9ada07}.wisski.stopped{background-color:#ff7a7a}
/*# sourceMappingURL=index.css.map */

View file

@ -0,0 +1 @@
{"mappings":"ACAA,8FAOA,gKAaA,yBACI,iCAMJ,oBAIA,qBAIA,wCAKA,kCAKA,0BAIA,sECjDA,8HAcA,wHEZA,yBAIA,yCAIA","sources":["control/index.css","src/base/base.css","src/autolink/autolink.css","src/global.css","src/control/index.css"],"sourcesContent":["html {\n color: #1a1a1a;\n background-color: #fdfdfd;\n font-family: Roboto;\n font-size: 20px;\n line-height: 1.5;\n}\n\nbody {\n max-width: 36em;\n -webkit-hyphens: auto;\n hyphens: auto;\n overflow-wrap: break-word;\n text-rendering: optimizelegibility;\n font-kerning: normal;\n margin: 0 auto;\n padding: 50px;\n}\n\n@media (max-width: 600px) {\n body {\n padding: 1em;\n font-size: .9em;\n }\n}\n\nh1 {\n margin-top: 1.4em;\n}\n\nh2, h3 {\n margin-top: 1em;\n}\n\ncode {\n color: #00f;\n font-family: Roboto Mono;\n}\n\np {\n text-align: justify;\n margin: 1em 0;\n}\n\na, a:visited {\n color: #1a1a1a;\n}\n\nfooter {\n text-align: center;\n border-top: 1px solid #1a1a1a;\n font-size: small;\n}\n\n.header-link {\n opacity: 0;\n font-size: .8em;\n text-decoration: none;\n transition: opacity .2s ease-in-out .1s;\n position: relative;\n left: .5em;\n}\n\nh2:hover .header-link, h3:hover .header-link, h4:hover .header-link, h5:hover .header-link, h6:hover .header-link {\n opacity: 1;\n}\n\n\n\n.wisski {\n padding-left: 5px;\n}\n\n.wisski.running {\n background-color: #9ada07;\n}\n\n.wisski.stopped {\n background-color: #ff7a7a;\n}\n\n/*# sourceMappingURL=index.css.map */\n","html {\n line-height: 1.5;\n font-family: Roboto;\n font-size: 20px;\n color: #1a1a1a;\n background-color: #fdfdfd;\n}\nbody {\n margin: 0 auto;\n max-width: 36em;\n padding-left: 50px;\n padding-right: 50px;\n padding-top: 50px;\n padding-bottom: 50px;\n hyphens: auto;\n overflow-wrap: break-word;\n text-rendering: optimizeLegibility;\n font-kerning: normal;\n}\n\n@media (max-width: 600px) {\n body {\n font-size: 0.9em;\n padding: 1em;\n }\n}\n\nh1 {\n margin-top: 1.4em;\n}\n\nh2,h3 {\n margin-top: 1em; \n}\n\ncode {\n font-family: Roboto Mono;\n color: blue;\n}\n\np {\n margin: 1em 0;\n text-align: justify;\n}\n\na, a:visited {\n color: #1a1a1a;\n}\n\nfooter {\n border-top: 1px solid #1a1a1a;\n font-size: small;\n text-align: center;\n}\n",".header-link {\n position: relative;\n left: 0.5em;\n opacity: 0;\n font-size: 0.8em;\n\n transition: opacity 0.2s ease-in-out 0.1s;\n -webkit-transition: opacity 0.2s ease-in-out 0.1s;\n -moz-transition: opacity 0.2s ease-in-out 0.1s;\n -ms-transition: opacity 0.2s ease-in-out 0.1s;\n\n text-decoration: none;\n}\n\nh2:hover .header-link,\nh3:hover .header-link,\nh4:hover .header-link,\nh5:hover .header-link,\nh6:hover .header-link {\n opacity: 1;\n}","@import './base/base.css';\n@import './autolink/autolink.css';","@import '../global.css';\n\n.wisski {\n padding-left: 5px;\n}\n\n.wisski.running {\n background-color: #9ADA07;\n}\n\n.wisski.stopped {\n background-color: #ff7a7a;\n}\n"],"names":[],"version":3,"file":"index.css.map"}

View file

@ -0,0 +1,2 @@
(()=>{const e=e=>{const t=document.getElementsByTagName("h"+e);Array.from(t).forEach((e=>{void 0!==e.id&&""!==e.id&&e.appendChild((e=>{const t=document.createElement("a");return t.className="header-link",t.href="#"+e,t.innerHTML="#",t})(e.id))}))};new Array(6).fill(0).forEach(((t,n)=>e(n+1)));const t={date:e=>new Date(e.innerText).toISOString(),path:e=>{const t=e.innerText.split("/");return t[t.length-1]},pathbuilders:e=>{const t=window.pathbuilders,o=document.createElement("span");let r=!1;if(Object.keys(t).forEach((e=>{r=!0;const a=e+".xml",c=t[e];o.append(n(a,e,c,"application/xml")),o.append(document.createTextNode(" "))})),!r)return"(none)";const a=document.createElement("small");return a.append(document.createTextNode("(click to download)")),o.append(a),o}},n=(e,t,n,o)=>{const r=new Blob([n],{type:o??"text/plain"}),a=document.createElement("a");return a.target="_blank",a.download=e,a.href=URL.createObjectURL(r),a.append(document.createTextNode(t)),a};Object.keys(t).forEach((e=>{const n=t[e];document.querySelectorAll("code."+e).forEach((e=>{const t=n(e);if("string"==typeof t)return e.innerHTML="",void e.appendChild(document.createTextNode(t));e.parentNode.replaceChild(t,e)}))}))})();
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"mappings":"MACA,MAQMA,EAAkBC,IACpB,MAAMC,EAAUC,SAASC,qBAAqB,IAAMH,GACpDI,MAAMC,KAAKJ,GAASK,SAASC,SACA,IAAdA,EAAOC,IAAoC,KAAdD,EAAOC,IAC/CD,EAAOE,YAZK,CAACD,IACjB,MAAME,EAASR,SAASS,cAAc,KAItC,OAHAD,EAAOE,UAAY,cACnBF,EAAOG,KAAO,I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AQZ,YAAYP,SAASsC,eAAee,IAIhDlC,EAAQmC,WAAWC,aAAaF,EAAYlC,EAAQ,GACtD,G","sources":["src/autolink/autolink.js","src/control/index.js"],"sourcesContent":["/** Adapted from http://blog.parkermoore.de/2014/08/01/header-anchor-links-in-vanilla-javascript-for-github-pages-and-jekyll/ */\nconst anchorForId = (id) => {\n const anchor = document.createElement(\"a\")\n anchor.className = \"header-link\"\n anchor.href = \"#\" + id\n anchor.innerHTML = \"#\"\n return anchor\n}\n\nconst linkifyAnchors = (level) => {\n const headers = document.getElementsByTagName(\"h\" + level);\n Array.from(headers).forEach((header) => {\n if (typeof header.id === \"undefined\" || header.id === \"\") return\n header.appendChild(anchorForId(header.id))\n })\n}\n\n// linkify all the anchors from 1 ... 6\n(new Array(6)).fill(0).forEach((_, i) => linkifyAnchors(i + 1))","import '../global.js';\nimport './index.css';\n\nconst types = {\n \"date\": (element) => {\n return (new Date(element.innerText)).toISOString()\n },\n \"path\": (element) => {\n const text = element.innerText.split(\"/\");\n return text[text.length - 1];\n },\n \"pathbuilders\": (element) => {\n const pathbuilders = window.pathbuilders; // read from context!\n const wrapper = document.createElement(\"span\");\n\n let found_one = false\n Object.keys(pathbuilders).forEach(name => {\n found_one = true\n\n const filename = name + \".xml\"\n const data = pathbuilders[name]\n const mime = \"application/xml\"\n wrapper.append(make_download_link(filename, name, data, mime))\n wrapper.append(document.createTextNode(\" \"))\n })\n\n if (!found_one) return '(none)';\n\n const small = document.createElement('small')\n small.append(document.createTextNode(\"(click to download)\"))\n wrapper.append(small)\n \n return wrapper\n }\n}\n\nconst make_download_link = (filename, title, content, type) => {\n const blob = new Blob(\n [content],\n {\n type: type ?? \"text/plain\"\n }\n );\n\n const link = document.createElement(\"a\")\n link.target = \"_blank\"\n link.download = filename\n link.href = URL.createObjectURL(blob)\n link.append(document.createTextNode(title))\n\n return link\n}\n\nObject.keys(types).forEach(key => {\n const f = types[key];\n const elements = document.querySelectorAll(\"code.\" + key)\n elements.forEach(element => {\n const newElement = f(element)\n if (typeof newElement === 'string') {\n element.innerHTML = \"\"\n element.appendChild(document.createTextNode(newElement))\n return\n }\n\n element.parentNode.replaceChild(newElement, element)\n })\n})"],"names":["$f0312a5caa2d901c$var$linkifyAnchors","level","headers","document","getElementsByTagName","Array","from","forEach","header","id","appendChild","anchor","createElement","className","href","innerHTML","$f0312a5caa2d901c$var$anchorForId","fill","_","i","$87b42c725c6052c6$var$types","date","element","Date","innerText","toISOString","path","text","split","length","pathbuilders","window","wrapper","found_one","Object","keys","name","filename","data","append","$87b42c725c6052c6$var$make_download_link","createTextNode","small","title","content","type","blob","Blob","link","target","download","URL","createObjectURL","key","f","querySelectorAll","newElement","parentNode","replaceChild"],"version":3,"file":"index.js.map"}

View file

@ -1 +0,0 @@
{"mappings":"ACAA,8FAOA,gKAaA,yBACI,iCAMJ,oBAIA,qBAIA,wCAKA,kCAKA,0BAIA","sources":["home/home.css","src/distillery.css","src/home/home.css"],"sourcesContent":["html {\n color: #1a1a1a;\n background-color: #fdfdfd;\n font-family: Roboto;\n font-size: 20px;\n line-height: 1.5;\n}\n\nbody {\n max-width: 36em;\n -webkit-hyphens: auto;\n hyphens: auto;\n overflow-wrap: break-word;\n text-rendering: optimizelegibility;\n font-kerning: normal;\n margin: 0 auto;\n padding: 50px;\n}\n\n@media (max-width: 600px) {\n body {\n padding: 1em;\n font-size: .9em;\n }\n}\n\nh1 {\n margin-top: 1.4em;\n}\n\nh2, h3 {\n margin-top: 1em;\n}\n\ncode {\n color: #00f;\n font-family: Roboto Mono;\n}\n\np {\n text-align: justify;\n margin: 1em 0;\n}\n\na, a:visited {\n color: #1a1a1a;\n}\n\nfooter {\n text-align: center;\n border-top: 1px solid #1a1a1a;\n font-size: small;\n}\n\n\n\n/*# sourceMappingURL=home.css.map */\n","html {\n line-height: 1.5;\n font-family: Roboto;\n font-size: 20px;\n color: #1a1a1a;\n background-color: #fdfdfd;\n}\nbody {\n margin: 0 auto;\n max-width: 36em;\n padding-left: 50px;\n padding-right: 50px;\n padding-top: 50px;\n padding-bottom: 50px;\n hyphens: auto;\n overflow-wrap: break-word;\n text-rendering: optimizeLegibility;\n font-kerning: normal;\n}\n\n@media (max-width: 600px) {\n body {\n font-size: 0.9em;\n padding: 1em;\n }\n}\n\nh1 {\n margin-top: 1.4em;\n}\n\nh2,h3 {\n margin-top: 1em; \n}\n\ncode {\n font-family: Roboto Mono;\n color: blue;\n}\n\np {\n margin: 1em 0;\n text-align: justify;\n}\n\na, a:visited {\n color: #1a1a1a;\n}\n\nfooter {\n border-top: 1px solid #1a1a1a;\n font-size: small;\n text-align: center;\n}\n","@import '../distillery.css';"],"names":[],"version":3,"file":"home.css.map"}

View file

@ -1,2 +0,0 @@
//# sourceMappingURL=home.js.map

View file

@ -1 +0,0 @@
{"mappings":"","sources":[],"sourcesContent":[],"names":[],"version":3,"file":"home.js.map"}

View file

@ -1,2 +1,2 @@
html{color:#1a1a1a;background-color:#fdfdfd;font-family:Roboto;font-size:20px;line-height:1.5}body{max-width:36em;-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;text-rendering:optimizelegibility;font-kerning:normal;margin:0 auto;padding:50px}@media (max-width:600px){body{padding:1em;font-size:.9em}}h1{margin-top:1.4em}h2,h3{margin-top:1em}code{color:#00f;font-family:Roboto Mono}p{text-align:justify;margin:1em 0}a,a:visited{color:#1a1a1a}footer{text-align:center;border-top:1px solid #1a1a1a;font-size:small}.wisski{padding-left:5px}.wisski.running{background-color:#9ada07}.wisski.stopped{background-color:#ff7a7a}
/*# sourceMappingURL=control.css.map */
html{color:#1a1a1a;background-color:#fdfdfd;font-family:Roboto;font-size:20px;line-height:1.5}body{max-width:36em;-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;text-rendering:optimizelegibility;font-kerning:normal;margin:0 auto;padding:50px}@media (max-width:600px){body{padding:1em;font-size:.9em}}h1{margin-top:1.4em}h2,h3{margin-top:1em}code{color:#00f;font-family:Roboto Mono}p{text-align:justify;margin:1em 0}a,a:visited{color:#1a1a1a}footer{text-align:center;border-top:1px solid #1a1a1a;font-size:small}.header-link{opacity:0;font-size:.8em;text-decoration:none;transition:opacity .2s ease-in-out .1s;position:relative;left:.5em}h2:hover .header-link,h3:hover .header-link,h4:hover .header-link,h5:hover .header-link,h6:hover .header-link{opacity:1}
/*# sourceMappingURL=index.css.map */

View file

@ -0,0 +1 @@
{"mappings":"ACAA,8FAOA,gKAaA,yBACI,iCAMJ,oBAIA,qBAIA,wCAKA,kCAKA,0BAIA,sECjDA,8HAcA","sources":["home/index.css","src/base/base.css","src/autolink/autolink.css","src/global.css","src/home/index.css"],"sourcesContent":["html {\n color: #1a1a1a;\n background-color: #fdfdfd;\n font-family: Roboto;\n font-size: 20px;\n line-height: 1.5;\n}\n\nbody {\n max-width: 36em;\n -webkit-hyphens: auto;\n hyphens: auto;\n overflow-wrap: break-word;\n text-rendering: optimizelegibility;\n font-kerning: normal;\n margin: 0 auto;\n padding: 50px;\n}\n\n@media (max-width: 600px) {\n body {\n padding: 1em;\n font-size: .9em;\n }\n}\n\nh1 {\n margin-top: 1.4em;\n}\n\nh2, h3 {\n margin-top: 1em;\n}\n\ncode {\n color: #00f;\n font-family: Roboto Mono;\n}\n\np {\n text-align: justify;\n margin: 1em 0;\n}\n\na, a:visited {\n color: #1a1a1a;\n}\n\nfooter {\n text-align: center;\n border-top: 1px solid #1a1a1a;\n font-size: small;\n}\n\n.header-link {\n opacity: 0;\n font-size: .8em;\n text-decoration: none;\n transition: opacity .2s ease-in-out .1s;\n position: relative;\n left: .5em;\n}\n\nh2:hover .header-link, h3:hover .header-link, h4:hover .header-link, h5:hover .header-link, h6:hover .header-link {\n opacity: 1;\n}\n\n\n\n\n\n/*# sourceMappingURL=index.css.map */\n","html {\n line-height: 1.5;\n font-family: Roboto;\n font-size: 20px;\n color: #1a1a1a;\n background-color: #fdfdfd;\n}\nbody {\n margin: 0 auto;\n max-width: 36em;\n padding-left: 50px;\n padding-right: 50px;\n padding-top: 50px;\n padding-bottom: 50px;\n hyphens: auto;\n overflow-wrap: break-word;\n text-rendering: optimizeLegibility;\n font-kerning: normal;\n}\n\n@media (max-width: 600px) {\n body {\n font-size: 0.9em;\n padding: 1em;\n }\n}\n\nh1 {\n margin-top: 1.4em;\n}\n\nh2,h3 {\n margin-top: 1em; \n}\n\ncode {\n font-family: Roboto Mono;\n color: blue;\n}\n\np {\n margin: 1em 0;\n text-align: justify;\n}\n\na, a:visited {\n color: #1a1a1a;\n}\n\nfooter {\n border-top: 1px solid #1a1a1a;\n font-size: small;\n text-align: center;\n}\n",".header-link {\n position: relative;\n left: 0.5em;\n opacity: 0;\n font-size: 0.8em;\n\n transition: opacity 0.2s ease-in-out 0.1s;\n -webkit-transition: opacity 0.2s ease-in-out 0.1s;\n -moz-transition: opacity 0.2s ease-in-out 0.1s;\n -ms-transition: opacity 0.2s ease-in-out 0.1s;\n\n text-decoration: none;\n}\n\nh2:hover .header-link,\nh3:hover .header-link,\nh4:hover .header-link,\nh5:hover .header-link,\nh6:hover .header-link {\n opacity: 1;\n}","@import './base/base.css';\n@import './autolink/autolink.css';","@import '../global.css';\n"],"names":[],"version":3,"file":"index.css.map"}

View file

@ -0,0 +1,2 @@
(()=>{const e=e=>{const n=document.getElementsByTagName("h"+e);Array.from(n).forEach((e=>{void 0!==e.id&&""!==e.id&&e.appendChild((e=>{const n=document.createElement("a");return n.className="header-link",n.href="#"+e,n.innerHTML="#",n})(e.id))}))};new Array(6).fill(0).forEach(((n,r)=>e(r+1)))})();
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"mappings":"MACA,MAQMA,EAAkBC,IACpB,MAAMC,EAAUC,SAASC,qBAAqB,IAAMH,GACpDI,MAAMC,KAAKJ,GAASK,SAASC,SACA,IAAdA,EAAOC,IAAoC,KAAdD,EAAOC,IAC/CD,EAAOE,YAZK,CAACD,IACjB,MAAME,EAASR,SAASS,cAAc,KAItC,OAHAD,EAAOE,UAAY,cACnBF,EAAOG,KAAO,IAAML,EACpBE,EAAOI,UAAY,IACZJ,CAAM,EAOUK,CAAYR,EAAOC,IAAI,GAC5C,EAIL,IAAIJ,MAAM,GAAIY,KAAK,GAAGV,SAAQ,CAACW,EAAGC,IAAMnB,EAAemB,EAAI,I","sources":["src/autolink/autolink.js"],"sourcesContent":["/** Adapted from http://blog.parkermoore.de/2014/08/01/header-anchor-links-in-vanilla-javascript-for-github-pages-and-jekyll/ */\nconst anchorForId = (id) => {\n const anchor = document.createElement(\"a\")\n anchor.className = \"header-link\"\n anchor.href = \"#\" + id\n anchor.innerHTML = \"#\"\n return anchor\n}\n\nconst linkifyAnchors = (level) => {\n const headers = document.getElementsByTagName(\"h\" + level);\n Array.from(headers).forEach((header) => {\n if (typeof header.id === \"undefined\" || header.id === \"\") return\n header.appendChild(anchorForId(header.id))\n })\n}\n\n// linkify all the anchors from 1 ... 6\n(new Array(6)).fill(0).forEach((_, i) => linkifyAnchors(i + 1))"],"names":["$f0312a5caa2d901c$var$linkifyAnchors","level","headers","document","getElementsByTagName","Array","from","forEach","header","id","appendChild","anchor","createElement","className","href","innerHTML","$f0312a5caa2d901c$var$anchorForId","fill","_","i"],"version":3,"file":"index.js.map"}

View file

@ -13,13 +13,8 @@
"targets": {
"default": {
"source": [
"src/control/control.js",
"src/control/control.css",
"src/home/home.js",
"src/home/home.css",
"src/autolink/autolink.js"
"src/control/index.js",
"src/home/index.js"
]
}
}

View file

@ -1,5 +1,3 @@
import "./autolink.css";
/** Adapted from http://blog.parkermoore.de/2014/08/01/header-anchor-links-in-vanilla-javascript-for-github-pages-and-jekyll/ */
const anchorForId = (id) => {
const anchor = document.createElement("a")
@ -18,4 +16,4 @@ const linkifyAnchors = (level) => {
}
// linkify all the anchors from 1 ... 6
Array(6).forEach((_, i) => linkifyAnchors(i + 1))
(new Array(6)).fill(0).forEach((_, i) => linkifyAnchors(i + 1))

View file

@ -0,0 +1 @@
/* nothing here */

View file

@ -1,4 +1,4 @@
@import '../distillery.css';
@import '../global.css';
.wisski {
padding-left: 5px;

View file

@ -1,3 +1,6 @@
import '../global.js';
import './index.css';
const types = {
"date": (element) => {
return (new Date(element.innerText)).toISOString()

View file

@ -0,0 +1,2 @@
@import './base/base.css';
@import './autolink/autolink.css';

View file

@ -0,0 +1,2 @@
import './base/base.js';
import './autolink/autolink.js';

View file

@ -1 +0,0 @@
@import '../distillery.css';

View file

@ -1 +0,0 @@
/* nothing for now */

View file

@ -0,0 +1 @@
@import '../global.css';

View file

@ -0,0 +1,2 @@
import '../global.js';
import './index.css';