Initial commit: added qwik-cms@v1.2.0

main
BurnyLlama 2021-08-09 17:44:53 +02:00
parent fe49325df5
commit 3ab195b47a
29 changed files with 3145 additions and 0 deletions

75
assets/css/article.css Normal file
View File

@ -0,0 +1,75 @@
article {
display: grid;
grid-template-areas: 'header' 'toc' 'content';
grid-template-columns: 100%;
grid-template-rows: repeat(3, auto);
}
article > header {
grid-area: header;
margin-bottom: 2rem;
}
article > header > i {
color: var(--accent);
display: block;
}
.toc-container {
grid-area: toc;
display: grid;
place-items: center;
width: fit-content;
margin: 0 auto;
padding: 1rem 4rem;
background-color: var(--grey3);
border-radius: .5rem;
box-shadow: 0 1rem 2rem var(--grey1);
}
.toc-container > .toc {
width: max-content;
display: grid;
}
.toc > * {
width: 100%;
display: block;
}
.toc-title {
margin-top: 0;
font-size: 1.25rem;
color: var(--primary);
}
.toc-h2 {
margin-left: .5rem;
font-size: .8rem;
}
.toc-h3 {
margin-left: 1rem;
font-size: .75rem;
}
.toc-h4 {
margin-left: 1.5rem;
font-size: .7rem;
}
.toc-h5 {
margin-left: 2rem;
font-size: .65rem;
}
.toc-h6 {
margin-left: 2.5rem;
font-size: .6rem;
}
article > .content {
grid-area: content;
}

109
assets/css/colors.css Normal file
View File

@ -0,0 +1,109 @@
:root {
/* COLORS */
--red: #EF5255;
--red1: #BF3638;
--red2: #D5484A;
--red3: #EF5255;
--red4: #FA7A7C;
--red5: #FA999A;
--orange: #EB801B;
--orange1: #AF6118;
--orange2: #DA7516;
--orange3: #EB801B;
--orange4: #F99434;
--orange5: #F9AE67;
--yellow: #F4C025;
--yellow1: #BD920F;
--yellow2: #DFAC11;
--yellow3: #F4C025;
--yellow4: #FFD147;
--yellow5: #FFE38F;
--pear: #AED651;
--pear1: #7D9A37;
--pear2: #96BB3E;
--pear3: #AED651;
--pear4: #C2E571;
--pear5: #DBF1A7;
--green: #72D661;
--green1: #53A545;
--green2: #61C350;
--green3: #72D661;
--green4: #93E684;
--green5: #BCF0B2;
--sea: #3DDF89;
--sea1: #2AA764;
--sea2: #2ACB75;
--sea3: #3DDF89;
--sea4: #5DEEA1;
--sea5: #A9F4CC;
--cyan: #4CDCDF;
--cyan1: #2CA3A5;
--cyan2: #2DCACD;
--cyan3: #4CDCDF;
--cyan4: #6BE8EB;
--cyan5: #B7EFF0;
--blue: #4C9CEF;
--blue1: #1C67B5;
--blue2: #2A83DF;
--blue3: #4C9CEF;
--blue4: #74B6FB;
--blue5: #A3CEFA;
--indigo: #4C6DEF;
--indigo1: #2143CA;
--indigo2: #3457E5;
--indigo3: #4C6DEF;
--indigo4: #748FFB;
--indigo5: #B1C0FC;
--purple: #967CF4;
--purple1: #613FD9;
--purple2: #7C5DE9;
--purple3: #967CF4;
--purple4: #BCAAFD;
--purple5: #CFC2FE;
--magenta: #E175DB;
--magenta1: #B63AB0;
--magenta2: #D152CB;
--magenta3: #E175DB;
--magenta4: #EC9AEF;
--magenta5: #EFB1F1;
--pink: #EE588F;
--pink1: #D0356D;
--pink2: #E2407C;
--pink3: #EE588F;
--pink4: #FA80AC;
--pink5: #FBA7C6;
--grey1: #00001F;
--grey2: #10102F;
--grey3: #20203F;
--grey4: #30304F;
--grey5: #40405F;
--grey6: #50506F;
--grey7: #60607F;
--grey8: #70708F;
--grey9: #80809F;
--grey10: #9090AF;
--grey11: #A0A0BF;
--grey12: #B0B0CF;
--grey13: #C0C0DF;
--grey14: #D0D0EF;
--grey15: #E0E0FF;
/* ALIASES */
--primary: var(--sea);
--accent: var(--cyan);
--accent2: var(--blue);
--surface: var(--grey2);
--text: var(--grey15);
}

66
assets/css/scaling.css Normal file
View File

@ -0,0 +1,66 @@
@media screen and (min-width: 1px) {
:root {
font-size: 12px;
}
}
@media screen and (min-width: 300px) {
:root {
font-size: 13pt;
}
}
@media screen and (min-width: 400px) {
:root {
font-size: 14pt;
}
}
@media screen and (min-width: 500px) {
:root {
font-size: 15pt;
}
}
@media screen and (min-width: 600px) {
:root {
font-size: 16pt;
}
}
@media screen and (min-width: 700px) {
:root {
font-size: 17pt;
}
}
@media screen and (min-width: 802px) {
:root {
font-size: 12pt;
}
}
@media screen and (min-width: 1000px) {
:root {
font-size: 13pt;
}
}
@media screen and (min-width: 1200px) {
:root {
font-size: 14pt;
}
}
@media screen and (min-width: 1500px) {
:root {
font-size: 15pt;
}
}
@media screen and (min-width: 1800px) {
:root {
font-size: 16pt;
}
}
@media screen and (min-width: 2500px) {
:root {
font-size: 17pt;
}
}
@media screen and (min-width: 3000px) {
:root {
font-size: 19pt;
}
}

22
assets/css/sitemap.css Normal file
View File

@ -0,0 +1,22 @@
body {
display: flex;
flex-direction: column;
}
.sitemap-container {
display: grid;
place-items: center;
width: fit-content;
margin: 2rem auto;
padding: 1rem 4rem;
background-color: var(--grey3);
border-radius: .5rem;
box-shadow: 0 1rem 2rem var(--grey1);
}
.sitemap-dir > .sitemap-dir {
margin: 0 auto;
padding: 0 0 .5rem 1rem;
}

152
assets/css/syntax.css Normal file
View File

@ -0,0 +1,152 @@
.hljs-keyword {
color: var(--purple);
}
.hljs-built_in {
color: var(--green);
}
.hljs-type {
color: var(--yellow);
}
.hljs-literal {
color: var(--orange);
}
.hljs-number {
color: var(--blue);
}
.hljs-punctuation {
color: var(--grey14);
}
.hljs-property {
color: var(--cyan);
}
.hljs-regexp {
color: var(--red);
}
.hljs-string {
color: var(--yellow);
}
.hljs-char.escape {
color: var(--cyan);
}
.hljs-subst {
color: var(--text);
}
.hljs-symbol {
color: var(--blue);
}
.hljs-variable {
color: var(--orange);
}
.hljs-variable.language {
color: var(--yellow);
}
.hljs-variable.constant {
color: var(--red);
}
.hljs-title {
color: var(--red);
}
.hljs-title.class {
color: var(--cyan);
}
.hljs-title.class.inherited {
color: var(--purple);
}
.hljs-title.function {
color: var(--blue);
}
.hljs-params {
color: var(--green);
}
.hljs-comment {
color: var(--grey9);
font-style: italic;
}
.hljs-doctag {
color: var(--yellow);
}
.hljs-meta {
color: var(--cyan);
}
.hljs-meta .hljs-keyword {
color: var(--indigo);
}
.hljs-section {
color: var(--green);
}
.hljs-tag {
color: var(--red);
}
.hljs-name {
color: var(--blue);
}
.hljs-attr {
color: var(--orange);
}
.hljs-attribute {
color: var(--green);
}
.hljs-selector-tag {
color: var(--red);
}
.hljs-selector-id {
color: var(--blue);
}
.hljs-selector-class {
color: var(--orange);
}
.hljs-selector-attr {
color: var(--purple);
}
.hljs-selector-pseudo {
color: var(--green);
}
.hljs-template-tag {
color: var(--purple);
}
.hljs-template-variable {
color: var(--cyan);
}
.hljs-addition {
color: var(--green);
}
.hljs-deletion {
color: var(--red);
}

149
assets/css/theme.css Normal file
View File

@ -0,0 +1,149 @@
* {
margin: 0;
padding: 0;
border: 0 none transparent;
box-sizing: border-box;
scroll-behavior: smooth;
font-family: 'sans-serif';
font-size: .85rem;
line-height: 1.5;
color: var(--text);
}
html {
display: grid;
place-items: center;
width: 100%;
background-color: var(--surface);
}
body {
margin: 5vh 0 10vh 0;
width: min(95vw, 75ch);
}
header {
color: var(--primary);
font-size: 3rem;
text-align: center;
}
h1, h2, h3, h4, h5, h6 {
color: var(--accent);
font-weight: normal;
margin: 1.25em 0 .25em 0;
}
h1 {
color: var(--primary);
font-size: 2rem;
}
h2 {
font-size: 1.65rem;
}
h3 {
font-size: 1.35rem;
}
h4 {
font-size: 1rem;
}
h5 {
font-size: .85rem;
}
h6 {
font-size: .75rem;
}
p {
margin: .5em 0 .25em 0;
text-align: justify;
}
a {
color: var(--accent2);
}
blockquote {
margin: 1rem;
padding: .5rem 1rem;
border-left: .2rem solid var(--primary);
background-color: var(--grey3);
}
ul, ol {
margin: 1rem 0 1rem 2rem;
}
ul ul, ul ol, ol ol, ol ul {
margin: .25rem 0 .25rem 1rem;
}
table {
display: block;
width: 100%;
overflow-x: auto;
white-space: nowrap;
border-collapse: collapse;
}
table tbody {
display: table;
width: 100%;
}
tr {
width: 200%;
background-color: var(--grey3);
}
tr:nth-child(even) {
background-color: var(--grey4);
}
th {
border-bottom: .1rem solid var(--text);
}
th, td {
text-align: left;
padding: .25rem 1rem;
}
code {
background-color: var(--grey3);
font-family: monospace;
padding: .1rem .2rem;
margin: 0 .1rem;
border-radius: .2rem;
}
pre > code {
margin: 1rem 0;
padding: 1rem;
border-radius: .5rem;
box-shadow: 0 1rem 2rem var(--grey1);
display: block;
overflow-x: auto;
white-space: nowrap;
}
code * {
font-family: monospace;
}
img {
margin: 1rem 0;
border-radius: .5rem;
box-shadow: 0 1rem 2rem var(--grey1);
}

View File

@ -0,0 +1,122 @@
<svg viewBox="0 0 550 350" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="550" height="350" fill="#20203F"/>
<path d="M133 189C113.632 193.408 92.3774 197.106 107.491 214.509C64.7437 240.186 84.0072 266.569 107.491 293L133 267.491V189Z" fill="#E2407C"/>
<path d="M54.5094 189L29 214.509C55.7586 237.182 82.1799 247.004 107.491 214.509L133 189H54.5094Z" fill="#FA80AC"/>
<path d="M29.0006 292.999H107.491V214.509H29.0006L29.0006 292.999Z" fill="#EE588F"/>
<path d="M166.091 234.697C155.233 237.168 143.318 239.241 151.79 248.998C127.826 263.392 138.625 278.183 151.79 293L166.091 278.699V234.697Z" fill="#613FD9"/>
<path d="M122.089 234.697L107.788 248.998C122.789 261.708 137.601 267.215 151.79 248.998L166.091 234.697H122.089Z" fill="#7C5DE9"/>
<path d="M107.788 293H151.79V248.997H107.788V293Z" fill="#967CF4"/>
<path d="M290.48 86H293.168V68.976C293.168 67.568 293.221 66.0853 293.328 64.528C293.435 62.9493 293.733 61.424 294.224 59.952C294.736 58.48 295.6 57.1786 296.816 56.048C298.203 54.768 299.696 54.032 301.296 53.84C302.896 53.6266 304.411 53.68 305.84 54V51.44C304.837 51.12 303.685 51.0026 302.384 51.088C301.083 51.152 299.781 51.4293 298.48 51.92C297.2 52.3893 296.091 53.0826 295.152 54C294.341 54.7466 293.616 55.696 292.976 56.848V51.44H290.48V86Z" fill="#E3E3F8"/>
<path d="M320.34 86.96C323.391 86.96 326.132 86.3306 328.564 85.072C330.996 83.8133 332.863 82.0213 334.164 79.696V86H336.66V64.368C336.66 63.216 336.596 62.032 336.468 60.816C336.34 59.6 336.127 58.5653 335.828 57.712C335.06 55.4933 333.61 53.7333 331.476 52.432C329.343 51.1306 326.676 50.48 323.476 50.48C319.828 50.48 316.81 51.312 314.42 52.976C312.052 54.64 310.484 57.072 309.716 60.272L312.66 61.04C314.047 55.792 317.61 53.168 323.348 53.168C327.274 53.168 330.036 54.128 331.636 56.048C333.236 57.968 334.015 60.8693 333.972 64.752C332.82 64.88 331.316 65.0506 329.46 65.264C327.626 65.4773 325.674 65.7333 323.604 66.032C321.535 66.3093 319.594 66.6293 317.78 66.992C316.138 67.3333 314.602 67.888 313.172 68.656C311.743 69.424 310.58 70.48 309.684 71.824C308.81 73.1466 308.372 74.8213 308.372 76.848C308.372 78.64 308.81 80.304 309.684 81.84C310.559 83.376 311.882 84.6133 313.652 85.552C315.423 86.4906 317.652 86.96 320.34 86.96ZM320.212 84.272C317.93 84.272 316.127 83.888 314.804 83.12C313.503 82.352 312.575 81.4026 312.02 80.272C311.466 79.1413 311.188 78.0213 311.188 76.912C311.188 75.3333 311.562 74.0426 312.308 73.04C313.076 72.0373 314.015 71.2586 315.124 70.704C316.234 70.1493 317.311 69.744 318.356 69.488C319.935 69.0826 321.684 68.752 323.604 68.496C325.546 68.2186 327.434 67.9946 329.268 67.824C331.103 67.632 332.671 67.4826 333.972 67.376C333.972 68.144 333.962 69.04 333.94 70.064C333.919 71.088 333.844 72.048 333.716 72.944C333.247 76.5066 331.818 79.2906 329.428 81.296C327.039 83.28 323.967 84.272 320.212 84.272Z" fill="#E3E3F8"/>
<path d="M344.98 101.36H347.668V79.216C348.841 81.584 350.441 83.472 352.468 84.88C354.516 86.2666 356.948 86.96 359.764 86.96C363.028 86.96 365.769 86.16 367.988 84.56C370.228 82.9386 371.924 80.752 373.076 78C374.228 75.2266 374.804 72.112 374.804 68.656C374.804 65.264 374.239 62.192 373.108 59.44C371.977 56.688 370.324 54.512 368.148 52.912C365.993 51.2906 363.369 50.48 360.276 50.48C357.204 50.48 354.591 51.2053 352.436 52.656C350.303 54.0853 348.649 56.0373 347.476 58.512V51.44H344.98V101.36ZM359.764 84.272C357.055 84.272 354.783 83.5893 352.948 82.224C351.135 80.8586 349.769 79.0026 348.852 76.656C347.935 74.288 347.476 71.6213 347.476 68.656C347.476 65.648 347.935 62.9813 348.852 60.656C349.791 58.3093 351.167 56.4746 352.98 55.152C354.815 53.8293 357.076 53.168 359.764 53.168C362.516 53.168 364.788 53.8506 366.58 55.216C368.372 56.56 369.705 58.4053 370.58 60.752C371.476 63.0773 371.924 65.712 371.924 68.656C371.924 71.6213 371.465 74.288 370.548 76.656C369.631 79.0026 368.265 80.8586 366.452 82.224C364.66 83.5893 362.431 84.272 359.764 84.272Z" fill="#E3E3F8"/>
<path d="M381.855 86H384.543V67.12C384.543 64.6453 384.927 62.3626 385.695 60.272C386.463 58.16 387.7 56.4746 389.407 55.216C391.114 53.936 393.375 53.296 396.191 53.296C399.775 53.296 402.559 54.4693 404.543 56.816C406.527 59.1413 407.519 62.768 407.519 67.696V86H410.207V67.184C410.207 62.064 408.97 58.032 406.495 55.088C404.02 52.144 400.586 50.672 396.191 50.672C393.759 50.672 391.498 51.1733 389.407 52.176C387.316 53.1786 385.631 54.8 384.351 57.04V39.92H381.855V86Z" fill="#E3E3F8"/>
<path d="M419.182 44.016H421.87V39.92H419.182V44.016ZM419.182 86H421.87V51.44H419.182V86Z" fill="#E3E3F8"/>
<path d="M445.368 86.96C451.704 86.96 456.333 84.144 459.256 78.512L456.632 77.36C455.587 79.6213 454.083 81.3386 452.12 82.512C450.157 83.6853 447.907 84.272 445.368 84.272C441.123 84.272 437.923 82.8533 435.768 80.016C433.613 77.1786 432.504 73.4133 432.44 68.72C432.483 65.648 432.973 62.9493 433.912 60.624C434.851 58.2773 436.269 56.4533 438.168 55.152C440.067 53.8293 442.467 53.168 445.368 53.168C447.971 53.168 450.264 53.776 452.248 54.992C454.253 56.208 455.736 57.9253 456.696 60.144L459.256 59.056C458.211 56.3893 456.429 54.2986 453.912 52.784C451.416 51.248 448.568 50.48 445.368 50.48C440.248 50.48 436.355 52.1333 433.688 55.44C431.043 58.7466 429.667 63.1733 429.56 68.72C429.624 72.3253 430.253 75.504 431.448 78.256C432.643 80.9866 434.403 83.12 436.728 84.656C439.053 86.192 441.933 86.96 445.368 86.96Z" fill="#E3E3F8"/>
<path d="M476.028 86.96C479.079 86.96 481.82 86.3306 484.252 85.072C486.684 83.8133 488.551 82.0213 489.852 79.696V86H492.348V64.368C492.348 63.216 492.284 62.032 492.156 60.816C492.028 59.6 491.815 58.5653 491.516 57.712C490.748 55.4933 489.297 53.7333 487.164 52.432C485.031 51.1306 482.364 50.48 479.164 50.48C475.516 50.48 472.497 51.312 470.108 52.976C467.74 54.64 466.172 57.072 465.404 60.272L468.348 61.04C469.735 55.792 473.297 53.168 479.036 53.168C482.961 53.168 485.724 54.128 487.324 56.048C488.924 57.968 489.703 60.8693 489.66 64.752C488.508 64.88 487.004 65.0506 485.148 65.264C483.313 65.4773 481.361 65.7333 479.292 66.032C477.223 66.3093 475.281 66.6293 473.468 66.992C471.825 67.3333 470.289 67.888 468.86 68.656C467.431 69.424 466.268 70.48 465.372 71.824C464.497 73.1466 464.06 74.8213 464.06 76.848C464.06 78.64 464.497 80.304 465.372 81.84C466.247 83.376 467.569 84.6133 469.34 85.552C471.111 86.4906 473.34 86.96 476.028 86.96ZM475.9 84.272C473.617 84.272 471.815 83.888 470.492 83.12C469.191 82.352 468.263 81.4026 467.708 80.272C467.153 79.1413 466.876 78.0213 466.876 76.912C466.876 75.3333 467.249 74.0426 467.996 73.04C468.764 72.0373 469.703 71.2586 470.812 70.704C471.921 70.1493 472.999 69.744 474.044 69.488C475.623 69.0826 477.372 68.752 479.292 68.496C481.233 68.2186 483.121 67.9946 484.956 67.824C486.791 67.632 488.359 67.4826 489.66 67.376C489.66 68.144 489.649 69.04 489.628 70.064C489.607 71.088 489.532 72.048 489.404 72.944C488.935 76.5066 487.505 79.2906 485.116 81.296C482.727 83.28 479.655 84.272 475.9 84.272Z" fill="#E3E3F8"/>
<path d="M501.307 86H503.995V38.96H501.307V86Z" fill="#E3E3F8"/>
<path d="M334.52 143H337.166V133.154H345.446L350.216 143H353.258L348.146 132.506C349.598 131.918 350.714 130.964 351.494 129.644C352.274 128.324 352.664 126.818 352.664 125.126C352.664 123.098 352.118 121.352 351.026 119.888C349.934 118.424 348.374 117.536 346.346 117.224C346.022 117.164 345.698 117.128 345.374 117.116C345.062 117.092 344.78 117.08 344.528 117.08H334.52V143ZM337.166 130.634V119.618H344.456C344.672 119.618 344.924 119.63 345.212 119.654C345.512 119.666 345.794 119.702 346.058 119.762C347.39 120.05 348.368 120.716 348.992 121.76C349.628 122.792 349.946 123.914 349.946 125.126C349.946 126.326 349.628 127.448 348.992 128.492C348.368 129.536 347.39 130.196 346.058 130.472C345.794 130.532 345.512 130.574 345.212 130.598C344.924 130.622 344.672 130.634 344.456 130.634H337.166Z" fill="#E3E3F8"/>
<path d="M365.457 143.54C367.341 143.54 369.027 143.078 370.515 142.154C372.015 141.23 373.149 139.916 373.917 138.212L371.451 137.258C370.215 139.754 368.181 141.002 365.349 141.002C363.405 141.002 361.881 140.396 360.777 139.184C359.685 137.972 359.085 136.25 358.977 134.018H374.295C374.391 130.586 373.641 127.898 372.045 125.954C370.461 123.998 368.229 123.02 365.349 123.02C363.477 123.02 361.851 123.44 360.471 124.28C359.103 125.12 358.041 126.314 357.285 127.862C356.529 129.41 356.151 131.246 356.151 133.37C356.151 135.422 356.529 137.21 357.285 138.734C358.053 140.258 359.133 141.44 360.525 142.28C361.929 143.12 363.573 143.54 365.457 143.54ZM365.421 125.45C369.081 125.45 371.115 127.568 371.523 131.804H359.031C359.235 129.752 359.883 128.18 360.975 127.088C362.067 125.996 363.549 125.45 365.421 125.45Z" fill="#E3E3F8"/>
<path d="M385.544 143.522C387.932 143.522 389.804 143 391.16 141.956C392.528 140.9 393.212 139.454 393.212 137.618C393.212 136.61 392.996 135.764 392.564 135.08C392.144 134.396 391.418 133.802 390.386 133.298C389.366 132.794 387.962 132.314 386.174 131.858C384.65 131.474 383.474 131.12 382.646 130.796C381.83 130.472 381.266 130.13 380.954 129.77C380.642 129.398 380.486 128.954 380.486 128.438C380.486 127.514 380.918 126.776 381.782 126.224C382.646 125.672 383.768 125.408 385.148 125.432C386.612 125.456 387.818 125.804 388.766 126.476C389.714 127.136 390.284 128.036 390.476 129.176L393.176 128.69C393.044 127.562 392.624 126.572 391.916 125.72C391.208 124.868 390.272 124.208 389.108 123.74C387.956 123.26 386.648 123.02 385.184 123.02C383.72 123.02 382.43 123.254 381.314 123.722C380.21 124.178 379.346 124.826 378.722 125.666C378.11 126.494 377.804 127.46 377.804 128.564C377.804 129.464 378.008 130.232 378.416 130.868C378.836 131.492 379.55 132.05 380.558 132.542C381.566 133.022 382.946 133.502 384.698 133.982C386.342 134.426 387.572 134.81 388.388 135.134C389.216 135.458 389.768 135.812 390.044 136.196C390.32 136.568 390.458 137.054 390.458 137.654C390.458 138.71 390.032 139.55 389.18 140.174C388.328 140.798 387.164 141.11 385.688 141.11C384.176 141.11 382.904 140.786 381.872 140.138C380.84 139.478 380.186 138.596 379.91 137.492L377.21 137.942C377.546 139.694 378.446 141.062 379.91 142.046C381.386 143.03 383.264 143.522 385.544 143.522Z" fill="#E3E3F8"/>
<path d="M405.322 143.54C407.242 143.54 408.886 143.108 410.254 142.244C411.634 141.38 412.69 140.18 413.422 138.644C414.166 137.096 414.538 135.302 414.538 133.262C414.538 131.258 414.172 129.488 413.44 127.952C412.72 126.404 411.67 125.198 410.29 124.334C408.922 123.458 407.266 123.02 405.322 123.02C403.426 123.02 401.788 123.452 400.408 124.316C399.04 125.168 397.984 126.362 397.24 127.898C396.496 129.434 396.124 131.222 396.124 133.262C396.124 135.266 396.484 137.042 397.204 138.59C397.936 140.138 398.986 141.35 400.354 142.226C401.734 143.102 403.39 143.54 405.322 143.54ZM405.322 141.002C403.222 141.002 401.632 140.3 400.552 138.896C399.472 137.48 398.932 135.602 398.932 133.262C398.932 130.994 399.454 129.146 400.498 127.718C401.542 126.278 403.15 125.558 405.322 125.558C407.47 125.558 409.072 126.26 410.128 127.664C411.196 129.056 411.73 130.922 411.73 133.262C411.73 135.554 411.202 137.42 410.146 138.86C409.09 140.288 407.482 141.002 405.322 141.002Z" fill="#E3E3F8"/>
<path d="M425.942 143.486C427.334 143.486 428.588 143.222 429.704 142.694C430.832 142.154 431.756 141.356 432.476 140.3V143H434.852V123.56H432.206V133.928C432.206 136.124 431.714 137.846 430.73 139.094C429.746 140.342 428.318 140.966 426.446 140.966C425.09 140.966 423.998 140.642 423.17 139.994C422.342 139.334 421.742 138.44 421.37 137.312C420.998 136.184 420.812 134.906 420.812 133.478V123.56H418.148V134.252C418.148 135.344 418.28 136.436 418.544 137.528C418.82 138.62 419.258 139.616 419.858 140.516C420.458 141.416 421.256 142.136 422.252 142.676C423.26 143.216 424.49 143.486 425.942 143.486Z" fill="#E3E3F8"/>
<path d="M439.883 143H442.529V133.298C442.529 132.134 442.661 130.976 442.925 129.824C443.201 128.66 443.825 127.694 444.797 126.926C445.505 126.35 446.273 126.02 447.101 125.936C447.941 125.84 448.721 125.876 449.441 126.044V123.56C448.589 123.344 447.623 123.338 446.543 123.542C445.463 123.734 444.539 124.166 443.771 124.838C443.195 125.27 442.691 125.87 442.259 126.638V123.56H439.883V143Z" fill="#E3E3F8"/>
<path d="M460.568 143.54C462.5 143.54 464.156 143.09 465.536 142.19C466.928 141.278 467.99 139.958 468.722 138.23L466.058 137.438C465.074 139.814 463.244 141.002 460.568 141.002C458.48 141.002 456.908 140.3 455.852 138.896C454.796 137.48 454.256 135.608 454.232 133.28C454.256 131.012 454.778 129.158 455.798 127.718C456.83 126.278 458.42 125.558 460.568 125.558C461.84 125.558 462.968 125.882 463.952 126.53C464.948 127.166 465.674 128.066 466.13 129.23L468.722 128.402C468.182 126.734 467.18 125.42 465.716 124.46C464.264 123.5 462.554 123.02 460.586 123.02C458.654 123.02 457.01 123.452 455.654 124.316C454.298 125.168 453.26 126.368 452.54 127.916C451.82 129.452 451.448 131.24 451.424 133.28C451.448 135.272 451.808 137.042 452.504 138.59C453.212 140.138 454.244 141.35 455.6 142.226C456.956 143.102 458.612 143.54 460.568 143.54Z" fill="#E3E3F8"/>
<path d="M480.137 143.54C482.021 143.54 483.707 143.078 485.195 142.154C486.695 141.23 487.829 139.916 488.597 138.212L486.131 137.258C484.895 139.754 482.861 141.002 480.029 141.002C478.085 141.002 476.561 140.396 475.457 139.184C474.365 137.972 473.765 136.25 473.657 134.018H488.975C489.071 130.586 488.321 127.898 486.725 125.954C485.141 123.998 482.909 123.02 480.029 123.02C478.157 123.02 476.531 123.44 475.151 124.28C473.783 125.12 472.721 126.314 471.965 127.862C471.209 129.41 470.831 131.246 470.831 133.37C470.831 135.422 471.209 137.21 471.965 138.734C472.733 140.258 473.813 141.44 475.205 142.28C476.609 143.12 478.253 143.54 480.137 143.54ZM480.101 125.45C483.761 125.45 485.795 127.568 486.203 131.804H473.711C473.915 129.752 474.563 128.18 475.655 127.088C476.747 125.996 478.229 125.45 480.101 125.45Z" fill="#E3E3F8"/>
<path d="M500.223 143.522C502.611 143.522 504.483 143 505.839 141.956C507.207 140.9 507.891 139.454 507.891 137.618C507.891 136.61 507.675 135.764 507.243 135.08C506.823 134.396 506.097 133.802 505.065 133.298C504.045 132.794 502.641 132.314 500.853 131.858C499.329 131.474 498.153 131.12 497.325 130.796C496.509 130.472 495.945 130.13 495.633 129.77C495.321 129.398 495.165 128.954 495.165 128.438C495.165 127.514 495.597 126.776 496.461 126.224C497.325 125.672 498.447 125.408 499.827 125.432C501.291 125.456 502.497 125.804 503.445 126.476C504.393 127.136 504.963 128.036 505.155 129.176L507.855 128.69C507.723 127.562 507.303 126.572 506.595 125.72C505.887 124.868 504.951 124.208 503.787 123.74C502.635 123.26 501.327 123.02 499.863 123.02C498.399 123.02 497.109 123.254 495.993 123.722C494.889 124.178 494.025 124.826 493.401 125.666C492.789 126.494 492.483 127.46 492.483 128.564C492.483 129.464 492.687 130.232 493.095 130.868C493.515 131.492 494.229 132.05 495.237 132.542C496.245 133.022 497.625 133.502 499.377 133.982C501.021 134.426 502.251 134.81 503.067 135.134C503.895 135.458 504.447 135.812 504.723 136.196C504.999 136.568 505.137 137.054 505.137 137.654C505.137 138.71 504.711 139.55 503.859 140.174C503.007 140.798 501.843 141.11 500.367 141.11C498.855 141.11 497.583 140.786 496.551 140.138C495.519 139.478 494.865 138.596 494.589 137.492L491.889 137.942C492.225 139.694 493.125 141.062 494.589 142.046C496.065 143.03 497.943 143.522 500.223 143.522Z" fill="#E3E3F8"/>
<rect x="170" y="122" width="72" height="72" fill="#00001F" stroke="#4C9CEF" stroke-width="2"/>
<circle cx="242" cy="122" r="3" fill="#E3E3F8" stroke="#4C9CEF" stroke-width="2"/>
<circle cx="170" cy="122" r="3" fill="#E3E3F8" stroke="#4C9CEF" stroke-width="2"/>
<circle cx="170" cy="194" r="3" fill="#E3E3F8" stroke="#4C9CEF" stroke-width="2"/>
<circle cx="242" cy="194" r="3" fill="#E3E3F8" stroke="#4C9CEF" stroke-width="2"/>
<path d="M247.5 208L242 214.5V194L256 208H247.5Z" fill="#00001F" stroke="#E3E3F8"/>
<path d="M284 54C284 61.0477 281.673 67.8982 277.381 73.4881C273.089 79.0781 267.072 83.0948 260.263 84.9147C253.455 86.7346 246.236 86.2559 239.727 83.5529C233.218 80.8499 227.784 76.0738 224.268 69.966C220.751 63.8583 219.35 56.7605 220.28 49.7746C221.211 42.7887 224.422 36.3053 229.414 31.3311C234.407 26.3568 240.902 23.1698 247.891 22.2649C254.88 21.36 261.973 22.7877 268.068 26.3265L252 54H284Z" fill="#3DDF89"/>
<path d="M30.12 319H35.72V318.412H30.708V308.92H30.12V319Z" fill="#E3E3F8"/>
<path d="M39.9496 319.21C40.6916 319.21 41.3193 319.042 41.8326 318.706C42.3506 318.37 42.7426 317.903 43.0086 317.306C43.2746 316.704 43.4076 316.004 43.4076 315.206C43.4076 314.427 43.2746 313.738 43.0086 313.141C42.7473 312.544 42.36 312.077 41.8466 311.741C41.3333 311.4 40.701 311.23 39.9496 311.23C39.217 311.23 38.5916 311.396 38.0736 311.727C37.5603 312.058 37.1683 312.523 36.8976 313.12C36.627 313.717 36.4916 314.413 36.4916 315.206C36.4916 315.99 36.6246 316.683 36.8906 317.285C37.1566 317.887 37.5463 318.358 38.0596 318.699C38.573 319.04 39.203 319.21 39.9496 319.21ZM39.9496 318.622C39.021 318.622 38.3163 318.309 37.8356 317.684C37.3596 317.059 37.1216 316.233 37.1216 315.206C37.1216 314.543 37.2243 313.958 37.4296 313.449C37.635 312.94 37.9453 312.541 38.3606 312.252C38.7806 311.963 39.3103 311.818 39.9496 311.818C40.897 311.818 41.604 312.126 42.0706 312.742C42.542 313.353 42.7776 314.175 42.7776 315.206C42.7776 316.219 42.5443 317.042 42.0776 317.677C41.611 318.307 40.9016 318.622 39.9496 318.622Z" fill="#E3E3F8"/>
<path d="M44.9507 319H45.5387V315.276C45.5387 314.968 45.5504 314.644 45.5737 314.303C45.597 313.958 45.6624 313.624 45.7697 313.302C45.8817 312.98 46.0707 312.695 46.3367 312.448C46.64 312.168 46.9667 312.007 47.3167 311.965C47.6667 311.918 47.998 311.93 48.3107 312V311.44C48.0914 311.37 47.8394 311.344 47.5547 311.363C47.27 311.377 46.9854 311.438 46.7007 311.545C46.4207 311.648 46.178 311.799 45.9727 312C45.7954 312.163 45.6367 312.371 45.4967 312.623V311.44H44.9507V319Z" fill="#E3E3F8"/>
<path d="M52.5414 319.21C53.2788 319.21 53.9298 319.035 54.4944 318.685C55.0591 318.335 55.4954 317.838 55.8034 317.194L55.3134 316.914C55.0334 317.465 54.6578 317.887 54.1864 318.181C53.7151 318.475 53.1668 318.622 52.5414 318.622C51.6688 318.622 50.9851 318.34 50.4904 317.775C50.0004 317.21 49.7414 316.415 49.7134 315.388H55.9854C55.9854 314.072 55.6821 313.05 55.0754 312.322C54.4734 311.594 53.6288 311.23 52.5414 311.23C51.4634 311.23 50.6164 311.585 50.0004 312.294C49.3891 313.003 49.0834 313.979 49.0834 315.22C49.0834 316.041 49.2234 316.751 49.5034 317.348C49.7834 317.945 50.1801 318.405 50.6934 318.727C51.2114 319.049 51.8274 319.21 52.5414 319.21ZM52.5414 311.818C53.3674 311.818 54.0184 312.075 54.4944 312.588C54.9751 313.101 55.2551 313.839 55.3344 314.8H49.7274C49.7928 313.853 50.0681 313.12 50.5534 312.602C51.0434 312.079 51.7061 311.818 52.5414 311.818Z" fill="#E3E3F8"/>
<path d="M57.3237 319H57.9117V313.974C57.9117 313.302 58.0937 312.765 58.4577 312.364C58.8217 311.963 59.2977 311.762 59.8857 311.762C60.4597 311.762 60.9264 311.953 61.2857 312.336C61.6497 312.719 61.8317 313.237 61.8317 313.89L61.8177 319H62.3917L62.4057 313.974C62.4057 313.414 62.5084 312.973 62.7137 312.651C62.9237 312.329 63.1804 312.1 63.4837 311.965C63.7917 311.83 64.0951 311.762 64.3937 311.762C64.9351 311.762 65.3901 311.944 65.7587 312.308C66.1274 312.667 66.3117 313.162 66.3117 313.792L66.2977 319H66.8857L66.8997 313.75C66.8997 312.966 66.6664 312.35 66.1997 311.902C65.7377 311.454 65.1497 311.23 64.4357 311.23C63.9271 311.23 63.4721 311.347 63.0707 311.58C62.6741 311.813 62.3731 312.138 62.1677 312.553C61.9624 312.1 61.6567 311.767 61.2507 311.552C60.8494 311.337 60.4177 311.23 59.9557 311.23C59.5077 311.23 59.1041 311.319 58.7447 311.496C58.3854 311.673 58.0937 311.916 57.8697 312.224V311.44H57.3237V319Z" fill="#E3E3F8"/>
<path d="M71.6688 309.816H72.2568V308.92H71.6688V309.816ZM71.6688 319H72.2568V311.44H71.6688V319Z" fill="#E3E3F8"/>
<path d="M74.3589 322.36H74.9469V317.516C75.2036 318.034 75.5536 318.447 75.9969 318.755C76.4449 319.058 76.9769 319.21 77.5929 319.21C78.3069 319.21 78.9066 319.035 79.3919 318.685C79.8819 318.33 80.2529 317.852 80.5049 317.25C80.7569 316.643 80.8829 315.962 80.8829 315.206C80.8829 314.464 80.7592 313.792 80.5119 313.19C80.2646 312.588 79.9029 312.112 79.4269 311.762C78.9556 311.407 78.3816 311.23 77.7049 311.23C77.0329 311.23 76.4612 311.389 75.9899 311.706C75.5232 312.019 75.1616 312.446 74.9049 312.987V311.44H74.3589V322.36ZM77.5929 318.622C77.0002 318.622 76.5032 318.473 76.1019 318.174C75.7052 317.875 75.4066 317.469 75.2059 316.956C75.0052 316.438 74.9049 315.855 74.9049 315.206C74.9049 314.548 75.0052 313.965 75.2059 313.456C75.4112 312.943 75.7122 312.541 76.1089 312.252C76.5102 311.963 77.0049 311.818 77.5929 311.818C78.1949 311.818 78.6919 311.967 79.0839 312.266C79.4759 312.56 79.7676 312.964 79.9589 313.477C80.1549 313.986 80.2529 314.562 80.2529 315.206C80.2529 315.855 80.1526 316.438 79.9519 316.956C79.7512 317.469 79.4526 317.875 79.0559 318.174C78.6639 318.473 78.1762 318.622 77.5929 318.622Z" fill="#E3E3F8"/>
<path d="M85.1833 319.196C86.0793 319.196 86.784 319.002 87.2973 318.615C87.8106 318.223 88.0673 317.684 88.0673 316.998C88.0673 316.611 87.981 316.286 87.8083 316.025C87.6403 315.764 87.344 315.535 86.9193 315.339C86.4993 315.143 85.9113 314.949 85.1553 314.758C84.558 314.609 84.0913 314.464 83.7553 314.324C83.4193 314.184 83.1836 314.03 83.0483 313.862C82.913 313.689 82.8453 313.484 82.8453 313.246C82.8453 312.817 83.0436 312.469 83.4403 312.203C83.8416 311.937 84.3573 311.809 84.9873 311.818C85.6593 311.818 86.2193 311.972 86.6673 312.28C87.12 312.583 87.3906 312.999 87.4793 313.526L88.0813 313.414C88.0393 312.985 87.8806 312.607 87.6053 312.28C87.3346 311.949 86.9753 311.692 86.5273 311.51C86.084 311.323 85.5846 311.23 85.0293 311.23C84.4786 311.23 83.9933 311.316 83.5733 311.489C83.1533 311.662 82.8243 311.902 82.5863 312.21C82.3483 312.518 82.2293 312.873 82.2293 313.274C82.2293 313.61 82.3086 313.895 82.4673 314.128C82.6306 314.357 82.9106 314.564 83.3073 314.751C83.7086 314.933 84.2686 315.122 84.9873 315.318C85.6733 315.505 86.1913 315.67 86.5413 315.815C86.896 315.96 87.134 316.121 87.2553 316.298C87.3766 316.471 87.4373 316.695 87.4373 316.97C87.4373 317.474 87.2343 317.873 86.8283 318.167C86.427 318.461 85.8833 318.608 85.1973 318.608C84.5253 318.608 83.956 318.468 83.4893 318.188C83.0273 317.908 82.7333 317.535 82.6073 317.068L82.0053 317.18C82.1406 317.81 82.4906 318.305 83.0553 318.664C83.62 319.019 84.3293 319.196 85.1833 319.196Z" fill="#E3E3F8"/>
<path d="M92.5427 319.168C93.0747 319.168 93.5694 319.058 94.0267 318.839C94.484 318.62 94.8527 318.265 95.1327 317.775V319H95.6787V311.44H95.0907V315.57C95.0907 316.111 95.0067 316.613 94.8387 317.075C94.6707 317.532 94.4 317.901 94.0267 318.181C93.6534 318.456 93.1587 318.594 92.5427 318.594C91.7587 318.594 91.1497 318.34 90.7157 317.831C90.2817 317.318 90.0647 316.522 90.0647 315.444V311.44H89.4767V315.556C89.4767 316.676 89.7474 317.558 90.2887 318.202C90.8347 318.846 91.5861 319.168 92.5427 319.168Z" fill="#E3E3F8"/>
<path d="M97.6421 319H98.2301V313.974C98.2301 313.302 98.4121 312.765 98.7761 312.364C99.1401 311.963 99.6161 311.762 100.204 311.762C100.778 311.762 101.245 311.953 101.604 312.336C101.968 312.719 102.15 313.237 102.15 313.89L102.136 319H102.71L102.724 313.974C102.724 313.414 102.827 312.973 103.032 312.651C103.242 312.329 103.499 312.1 103.802 311.965C104.11 311.83 104.413 311.762 104.712 311.762C105.253 311.762 105.708 311.944 106.077 312.308C106.446 312.667 106.63 313.162 106.63 313.792L106.616 319H107.204L107.218 313.75C107.218 312.966 106.985 312.35 106.518 311.902C106.056 311.454 105.468 311.23 104.754 311.23C104.245 311.23 103.79 311.347 103.389 311.58C102.992 311.813 102.691 312.138 102.486 312.553C102.281 312.1 101.975 311.767 101.569 311.552C101.168 311.337 100.736 311.23 100.274 311.23C99.8261 311.23 99.4224 311.319 99.0631 311.496C98.7038 311.673 98.4121 311.916 98.1881 312.224V311.44H97.6421V319Z" fill="#E3E3F8"/>
<path d="M114.717 319.21C115.352 319.21 115.896 319.049 116.348 318.727C116.801 318.405 117.153 317.973 117.405 317.432V319H117.951V308.92H117.363V312.903C117.102 312.385 116.74 311.977 116.278 311.678C115.816 311.379 115.259 311.23 114.605 311.23C113.929 311.23 113.352 311.407 112.876 311.762C112.405 312.112 112.046 312.588 111.798 313.19C111.551 313.792 111.427 314.464 111.427 315.206C111.427 315.962 111.553 316.643 111.805 317.25C112.057 317.852 112.426 318.33 112.911 318.685C113.401 319.035 114.003 319.21 114.717 319.21ZM114.717 318.622C114.134 318.622 113.644 318.473 113.247 318.174C112.855 317.875 112.559 317.469 112.358 316.956C112.158 316.438 112.057 315.855 112.057 315.206C112.057 314.562 112.153 313.986 112.344 313.477C112.536 312.964 112.827 312.56 113.219 312.266C113.616 311.967 114.115 311.818 114.717 311.818C115.305 311.818 115.798 311.963 116.194 312.252C116.596 312.541 116.897 312.943 117.097 313.456C117.303 313.965 117.405 314.548 117.405 315.206C117.405 315.855 117.305 316.438 117.104 316.956C116.904 317.469 116.603 317.875 116.201 318.174C115.805 318.473 115.31 318.622 114.717 318.622Z" fill="#E3E3F8"/>
<path d="M122.952 319.21C123.694 319.21 124.321 319.042 124.835 318.706C125.353 318.37 125.745 317.903 126.011 317.306C126.277 316.704 126.41 316.004 126.41 315.206C126.41 314.427 126.277 313.738 126.011 313.141C125.749 312.544 125.362 312.077 124.849 311.741C124.335 311.4 123.703 311.23 122.952 311.23C122.219 311.23 121.594 311.396 121.076 311.727C120.562 312.058 120.17 312.523 119.9 313.12C119.629 313.717 119.494 314.413 119.494 315.206C119.494 315.99 119.627 316.683 119.893 317.285C120.159 317.887 120.548 318.358 121.062 318.699C121.575 319.04 122.205 319.21 122.952 319.21ZM122.952 318.622C122.023 318.622 121.318 318.309 120.838 317.684C120.362 317.059 120.124 316.233 120.124 315.206C120.124 314.543 120.226 313.958 120.432 313.449C120.637 312.94 120.947 312.541 121.363 312.252C121.783 311.963 122.312 311.818 122.952 311.818C123.899 311.818 124.606 312.126 125.073 312.742C125.544 313.353 125.78 314.175 125.78 315.206C125.78 316.219 125.546 317.042 125.08 317.677C124.613 318.307 123.904 318.622 122.952 318.622Z" fill="#E3E3F8"/>
<path d="M128.093 319H128.681V308.71H128.093V319Z" fill="#E3E3F8"/>
<path d="M133.821 319.21C134.563 319.21 135.19 319.042 135.704 318.706C136.222 318.37 136.614 317.903 136.88 317.306C137.146 316.704 137.279 316.004 137.279 315.206C137.279 314.427 137.146 313.738 136.88 313.141C136.618 312.544 136.231 312.077 135.718 311.741C135.204 311.4 134.572 311.23 133.821 311.23C133.088 311.23 132.463 311.396 131.945 311.727C131.431 312.058 131.039 312.523 130.769 313.12C130.498 313.717 130.363 314.413 130.363 315.206C130.363 315.99 130.496 316.683 130.762 317.285C131.028 317.887 131.417 318.358 131.931 318.699C132.444 319.04 133.074 319.21 133.821 319.21ZM133.821 318.622C132.892 318.622 132.187 318.309 131.707 317.684C131.231 317.059 130.993 316.233 130.993 315.206C130.993 314.543 131.095 313.958 131.301 313.449C131.506 312.94 131.816 312.541 132.232 312.252C132.652 311.963 133.181 311.818 133.821 311.818C134.768 311.818 135.475 312.126 135.942 312.742C136.413 313.353 136.649 314.175 136.649 315.206C136.649 316.219 136.415 317.042 135.949 317.677C135.482 318.307 134.773 318.622 133.821 318.622Z" fill="#E3E3F8"/>
<path d="M138.822 319H139.41V315.276C139.41 314.968 139.421 314.644 139.445 314.303C139.468 313.958 139.533 313.624 139.641 313.302C139.753 312.98 139.942 312.695 140.208 312.448C140.511 312.168 140.838 312.007 141.188 311.965C141.538 311.918 141.869 311.93 142.182 312V311.44C141.962 311.37 141.71 311.344 141.426 311.363C141.141 311.377 140.856 311.438 140.572 311.545C140.292 311.648 140.049 311.799 139.844 312C139.666 312.163 139.508 312.371 139.368 312.623V311.44H138.822V319Z" fill="#E3E3F8"/>
<path d="M149.072 319.196C149.968 319.196 150.673 319.002 151.186 318.615C151.699 318.223 151.956 317.684 151.956 316.998C151.956 316.611 151.87 316.286 151.697 316.025C151.529 315.764 151.233 315.535 150.808 315.339C150.388 315.143 149.8 314.949 149.044 314.758C148.447 314.609 147.98 314.464 147.644 314.324C147.308 314.184 147.072 314.03 146.937 313.862C146.802 313.689 146.734 313.484 146.734 313.246C146.734 312.817 146.932 312.469 147.329 312.203C147.73 311.937 148.246 311.809 148.876 311.818C149.548 311.818 150.108 311.972 150.556 312.28C151.009 312.583 151.279 312.999 151.368 313.526L151.97 313.414C151.928 312.985 151.769 312.607 151.494 312.28C151.223 311.949 150.864 311.692 150.416 311.51C149.973 311.323 149.473 311.23 148.918 311.23C148.367 311.23 147.882 311.316 147.462 311.489C147.042 311.662 146.713 311.902 146.475 312.21C146.237 312.518 146.118 312.873 146.118 313.274C146.118 313.61 146.197 313.895 146.356 314.128C146.519 314.357 146.799 314.564 147.196 314.751C147.597 314.933 148.157 315.122 148.876 315.318C149.562 315.505 150.08 315.67 150.43 315.815C150.785 315.96 151.023 316.121 151.144 316.298C151.265 316.471 151.326 316.695 151.326 316.97C151.326 317.474 151.123 317.873 150.717 318.167C150.316 318.461 149.772 318.608 149.086 318.608C148.414 318.608 147.845 318.468 147.378 318.188C146.916 317.908 146.622 317.535 146.496 317.068L145.894 317.18C146.029 317.81 146.379 318.305 146.944 318.664C147.509 319.019 148.218 319.196 149.072 319.196Z" fill="#E3E3F8"/>
<rect x="154" y="303" width="1" height="21" fill="#4CDCDF"/>
<rect x="270" y="319" width="26" height="24" transform="rotate(-90 270 319)" fill="#BF3638"/>
<rect x="345" y="319" width="26" height="29" transform="rotate(-90 345 319)" fill="#53A545"/>
<rect x="427" y="319" width="26" height="25" transform="rotate(-90 427 319)" fill="#2143CA"/>
<rect x="305" y="319" width="26" height="29" transform="rotate(-90 305 319)" fill="#BD920F"/>
<rect x="388" y="319" width="26" height="26" transform="rotate(-90 388 319)" fill="#2CA3A5"/>
<rect x="467" y="319" width="26" height="26" transform="rotate(-90 467 319)" fill="#B63AB0"/>
<rect x="290" y="319" width="26" height="20" transform="rotate(-90 290 319)" fill="#AF6118"/>
<rect x="370" y="319" width="26" height="20" transform="rotate(-90 370 319)" fill="#2AA764"/>
<rect x="450" y="319" width="26" height="20" transform="rotate(-90 450 319)" fill="#613FD9"/>
<rect x="330" y="319" width="26" height="20" transform="rotate(-90 330 319)" fill="#7D9A37"/>
<rect x="410" y="319" width="26" height="20" transform="rotate(-90 410 319)" fill="#1C67B5"/>
<rect x="490" y="319" width="26" height="20" transform="rotate(-90 490 319)" fill="#D0356D"/>
<rect x="270" y="246" width="27" height="22" transform="rotate(-90 270 246)" fill="#FA999A"/>
<rect x="342" y="246" width="27" height="38" transform="rotate(-90 342 246)" fill="#BCF0B2"/>
<rect x="424" y="246" width="27" height="34" transform="rotate(-90 424 246)" fill="#B1C0FC"/>
<rect x="305" y="246" width="27" height="32" transform="rotate(-90 305 246)" fill="#FFE38F"/>
<rect x="380" y="246" width="27" height="40" transform="rotate(-90 380 246)" fill="#B7EFF0"/>
<rect x="461" y="246" width="27" height="37" transform="rotate(-90 461 246)" fill="#EFB1F1"/>
<rect x="290" y="246" width="27" height="20" transform="rotate(-90 290 246)" fill="#F9AE67"/>
<rect x="370" y="246" width="27" height="20" transform="rotate(-90 370 246)" fill="#A9F4CC"/>
<rect x="450" y="246" width="27" height="20" transform="rotate(-90 450 246)" fill="#CFC2FE"/>
<rect x="330" y="246" width="27" height="20" transform="rotate(-90 330 246)" fill="#BCF0B2"/>
<rect x="410" y="246" width="27" height="20" transform="rotate(-90 410 246)" fill="#A3CEFA"/>
<rect x="490" y="246" width="27" height="20" transform="rotate(-90 490 246)" fill="#FBA7C6"/>
<rect x="270" y="286" width="37" height="24" transform="rotate(-90 270 286)" fill="#EF5255"/>
<rect x="345" y="286" width="37" height="29" transform="rotate(-90 345 286)" fill="#72D661"/>
<rect x="427" y="286" width="37" height="25" transform="rotate(-90 427 286)" fill="#4C6DEF"/>
<rect x="305" y="286" width="37" height="29" transform="rotate(-90 305 286)" fill="#F4C025"/>
<rect x="388" y="286" width="37" height="26" transform="rotate(-90 388 286)" fill="#4CDCDF"/>
<rect x="467" y="286" width="37" height="26" transform="rotate(-90 467 286)" fill="#E175DB"/>
<rect x="290" y="286" width="37" height="20" transform="rotate(-90 290 286)" fill="#EB801B"/>
<rect x="370" y="286" width="37" height="20" transform="rotate(-90 370 286)" fill="#3DDF89"/>
<rect x="450" y="286" width="37" height="20" transform="rotate(-90 450 286)" fill="#967CF4"/>
<rect x="330" y="286" width="37" height="20" transform="rotate(-90 330 286)" fill="#AED651"/>
<rect x="410" y="286" width="37" height="20" transform="rotate(-90 410 286)" fill="#4C9CEF"/>
<rect x="490" y="286" width="37" height="20" transform="rotate(-90 490 286)" fill="#EE588F"/>
<rect x="270" y="299" width="20" height="24" transform="rotate(-90 270 299)" fill="#D5484A"/>
<rect x="345" y="299" width="20" height="29" transform="rotate(-90 345 299)" fill="#61C350"/>
<rect x="427" y="299" width="20" height="25" transform="rotate(-90 427 299)" fill="#3457E5"/>
<rect x="305" y="299" width="20" height="29" transform="rotate(-90 305 299)" fill="#DFAC11"/>
<rect x="388" y="299" width="20" height="26" transform="rotate(-90 388 299)" fill="#2DCACD"/>
<rect x="467" y="299" width="20" height="26" transform="rotate(-90 467 299)" fill="#D152CB"/>
<rect x="290" y="299" width="20" height="20" transform="rotate(-90 290 299)" fill="#DA7516"/>
<rect x="370" y="299" width="20" height="20" transform="rotate(-90 370 299)" fill="#2ACB75"/>
<rect x="450" y="299" width="20" height="20" transform="rotate(-90 450 299)" fill="#7C5DE9"/>
<rect x="330" y="299" width="20" height="20" transform="rotate(-90 330 299)" fill="#96BB3E"/>
<rect x="410" y="299" width="20" height="20" transform="rotate(-90 410 299)" fill="#2A83DF"/>
<rect x="490" y="299" width="20" height="20" transform="rotate(-90 490 299)" fill="#E2407C"/>
<rect x="270" y="259" width="20" height="24" transform="rotate(-90 270 259)" fill="#FA7A7C"/>
<rect x="345" y="259" width="20" height="29" transform="rotate(-90 345 259)" fill="#93E684"/>
<rect x="427" y="259" width="20" height="25" transform="rotate(-90 427 259)" fill="#748FFB"/>
<rect x="305" y="259" width="20" height="29" transform="rotate(-90 305 259)" fill="#FFD147"/>
<rect x="388" y="259" width="20" height="26" transform="rotate(-90 388 259)" fill="#6BE8EB"/>
<rect x="467" y="259" width="20" height="26" transform="rotate(-90 467 259)" fill="#EC9AEF"/>
<rect x="290" y="259" width="20" height="20" transform="rotate(-90 290 259)" fill="#F99434"/>
<rect x="370" y="259" width="20" height="20" transform="rotate(-90 370 259)" fill="#5DEEA1"/>
<rect x="450" y="259" width="20" height="20" transform="rotate(-90 450 259)" fill="#BCAAFC"/>
<rect x="330" y="259" width="20" height="20" transform="rotate(-90 330 259)" fill="#C2E571"/>
<rect x="410" y="259" width="20" height="20" transform="rotate(-90 410 259)" fill="#74B6FB"/>
<rect x="490" y="259" width="20" height="20" transform="rotate(-90 490 259)" fill="#FA80AC"/>
<path d="M59.6401 23.1404C68.3924 20.7952 77.6077 20.7952 86.3599 23.1404L86.3599 49L73 73.0002L58 45L59.6401 23.1404Z" fill="#EF5255"/>
<path d="M86.3601 23.1403C95.1124 25.4855 103.093 30.0931 109.5 36.5002L96.5 58L73.0002 73.0001L86.3601 23.1403Z" fill="#EB801B"/>
<path d="M109.5 36.5001C115.907 42.9072 120.515 50.8879 122.86 59.6401L101.5 75L72.9999 73L109.5 36.5001Z" fill="#F4C025"/>
<path d="M122.86 59.6401C125.205 68.3923 125.205 77.6077 122.86 86.3599L96 86.3599L73 73L122.86 59.6401Z" fill="#AED651"/>
<path d="M122.86 86.3599C120.515 95.1121 115.907 103.093 109.5 109.5L86 94.5L73 73L122.86 86.3599Z" fill="#72D661"/>
<path d="M109.5 109.5C103.093 115.907 95.1121 120.515 86.3599 122.86L73 99.5V73.0001L109.5 109.5Z" fill="#3DDF89"/>
<path d="M86.36 122.86C77.6078 125.205 68.3924 125.205 59.6402 122.86L61 95.5L73.0001 73L86.36 122.86Z" fill="#4CDCDF"/>
<path d="M59.6401 122.86C50.8879 120.515 42.9072 115.907 36.5001 109.5L49 87.5L73 73L59.6401 122.86Z" fill="#4C9CEF"/>
<path d="M36.5001 109.5C30.093 103.093 25.4853 95.1121 23.1402 86.3599L41 73L73 73L36.5001 109.5Z" fill="#4C6DEF"/>
<path d="M23.1402 86.3598C20.795 77.6075 20.795 68.3922 23.1402 59.64L44.5 57.5L73 72.9999L23.1402 86.3598Z" fill="#967CF4"/>
<path d="M23.1403 59.6401C25.4855 50.8879 30.0931 42.9072 36.5002 36.5001L59 47L73.0001 73L23.1403 59.6401Z" fill="#E175DB"/>
<path d="M36.5003 36.4999C42.9074 30.0928 50.8881 25.4852 59.6404 23.14L73.0003 72.9998L36.5003 36.4999Z" fill="#EE588F"/>
</svg>

After

Width:  |  Height:  |  Size: 36 KiB

7
config.json Normal file
View File

@ -0,0 +1,7 @@
{
"contentDir": "content",
"assetsDir": "assets",
"serverPort": "8789",
"serverName": "qwik"
}

View File

@ -0,0 +1,8 @@
{% macro import(path, lang) %}
```{{ lang }}
{% set code %}
{% include path %}
{% endset %}
{{ code | safe | replace(" ", "•") }}
```
{% endmacro %}

View File

@ -0,0 +1,6 @@
{% macro header(size, text) %}
<a name="{{ text | replace(" ", "-") }}" data-orig-text="{{ text }}" class="toc-anchor toc-anchor-{{ size }}"></a>
<{{ size }}>
{{ text }}
</{{ size }}>
{% endmacro %}

15
content/errors/404.njk Normal file
View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% include "templates/defaultTags.njk" %}
<title>{{ serverName }} - Error 404</title>
</head>
<body>
<h1>Error 404</h1>
<p>
The page you are looking for doesn't exist. <br>
Consider going to the <a href="/">main page</a>. <br>
<i>{{ serverName }}</i>
</p>
</body>
</html>

View File

@ -0,0 +1,97 @@
%%-
title: qwik cms
header: qwik cms intro
date: 8th August 2021
-%%
# Introduction
BurnyLlama started working on this project as a part of [qwik](https://qwik.space).
We tried to find a good and simple CMS solution, but we couldn't really find something that
worked for and suited us. We decided to make our own, and that's when the `qwik-cms` repo was created.
## Basic ideas
We wanted to keep it simple, yet powerful. At first we only wanted to use *include/import statements*,
but later we came to the realization that you could add other QoL things, like automatically generating
a table of contents for articles.
We also want to make development of content be as fast as possible. Especially with when it comes to
writing articles. Writing articles in markdown can feel kinda nice as it (at least imo) saves a lot
of time compared to writing out HTML.
## Underlying technologies
Thanks to all the technologies used, the CMS is really hackable and can be used in different ways
depending on your liking. There are three main ways of creating content:
1. Normal HTML
2. Nunjacks (an HTML templating language)
3. Markdown
## Views on bloat
*This all sounds kinda bloated?*
I hear you asking... and yes, I am afraid this is a bit bloated (sadly). Although I wouldn't call it
bloated if you actually use the features. The project does pull in a few dependencies, and making the
system more modular could potentially make som of those dependencies optional, but as of now we
depend on:
* Express - the server framework
* nunjucks - the templating language that does very heavy lifting in this CMS.
* nunjucks-markdown - adds support for markdown in nunjucks
* marked - the actual renderer for the markdown (used by `nunjucks-markdown`)
* highlight.js - provides syntax highlighting for codeblocks in markdown.
* jsdom - makes us able to use DOM operations server-side (used to generate the table of contents)
* chokidar - used to reload nunjucks templates if they change on the disk (without having to restart the server)
So yes, we sure do have a lot of dependencies, but they are all used, so there are no dependencies just "lying around".
# Installation
The installation process will be quite trivial if you are used to node-based projects.
## Prerequesites
We will assume that you have `node` and `npm` installed already. Otherwise make sure to install those.
## Process
The process is really simple:
```bash
git clone https://git.qwik.space/BurnyLlama/qwik-cms
cd qwik-cms
npm i
node index.js
```
`npm i` installs all needed dependencies.
# Configuration
The CMS can be configured from `config.json` and the default config looks like this:
```json
{
"contentDir": "content",
"assetsDir": "assets",
"serverPort": "8789",
"serverName": "qwik"
}
```
## Explanation
All of the options are kind of self-explanatory, but anyways:
### contentDir
Specifies which directory the content is in.
Default: `content`
### assetsDir
Specifies which directory the assets are in. These items will be statically available on (your site's)
`/assets/`. I recommend storing CSS, images, etc. here.
Default: `assets`
### serverPort
The port the server should run on.
Default: `8789`
### serverName
This can be accessed in any page/template by using `{{ serverName }}`
Default: `qwik`
# Usage

16
content/pages/sitemap.njk Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% include "templates/defaultTags.njk" %}
<link rel="stylesheet" type="text/css" href="/assets/css/sitemap.css">
<title>Site Map</title>
</head>
<body>
<header>
Sitemap - "/"
</header>
<div class="sitemap-container">
{{ siteMap() | safe }}
</div>
</body>
</html>

View File

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% include "./defaultTags.njk" %}
<link rel="stylesheet" href="/assets/css/article.css">
<link rel="stylesheet" href="/assets/css/syntax.css">
{% block head %}
<title>{{ serverName }}</title>
{% endblock %}
</head>
<body>
<article>
<header>
{% block header %}{% endblock %}
</header>
<div class="toc-container">
<div class="toc">
<p class="toc-title">Table of Contents</p>
{% for tocLink in tocLinks %}
{{ tocLink | safe }}
{% endfor %}
</div>
</div>
{% block main %}{% endblock %}
</article>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% include "./defaultTags.njk" %}
<link rel="stylesheet" href="/assets/css/article.css">
<link rel="stylesheet" href="/assets/css/syntax.css">
{% block head %}
<title>{{ serverName }}</title>
{% endblock %}
</head>
<body>
<article>
<header>
{% block header %}{% endblock %}
</header>
<div class="toc-container">
<div class="toc">
<p class="toc-title">Table of Contents</p>
{% for tocLink in tocLinks %}
{{ tocLink | safe }}
{% endfor %}
</div>
</div>
{% markdown %}
{% block main %}{% endblock %}
{% endmarkdown %}
</article>
</body>
</html>

View File

@ -0,0 +1,6 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="/assets/css/scaling.css">
<link rel="stylesheet" type="text/css" href="/assets/css/colors.css">
<link rel="stylesheet" type="text/css" href="/assets/css/theme.css">

View File

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% include "templates/defaultTags.njk" %}
<link rel="stylesheet" href="/assets/css/article.css">
<link rel="stylesheet" href="/assets/css/syntax.css">
<title>{{ externalMeta.title if externalMeta.title else serverName }}</title>
</head>
<body>
<article>
<header>
{{ externalMeta.header }}
<i>{{ externalMeta.date }}</i>
</header>
<div class="toc-container">
<div class="toc">
<p class="toc-title">Table of Contents</p>
{% for tocLink in tocLinks %}
{{ tocLink | safe }}
{% endfor %}
</div>
</div>
{% markdown %}
{{ externalMarkdown | safe }}
{% endmarkdown %}
</article>
</body>
</html>

44
index.js Normal file
View File

@ -0,0 +1,44 @@
import fs from 'fs'
import express from 'express'
import njk from 'nunjucks'
import { requestHandler } from './libs/requestHandler.js'
import { utils } from './libs/utils/utils.js'
import { nunjacksConfig } from './libs/nunjucksConfig.js'
// Load in config
const ConfigFile = fs.readFileSync('./config.json')
const Config = JSON.parse(ConfigFile)
// Create a server object
const Server = express()
// Configure the assets directory
Server.use('/assets', express.static(Config.assetsDir))
// Configure nunjacks
nunjacksConfig(njk, Server, Config)
// Generate utils
utils.generate()
// Send all requests to the requestHandler.
Server.get('*', (req, res) => requestHandler(req, res, Config))
// Start the server
Server.listen(
Config.serverPort,
() => {
console.log(`Started server on ${Config.serverPort}.`)
}
)

16
libs/codeHighlighter.js Normal file
View File

@ -0,0 +1,16 @@
import hljs from 'highlight.js'
export function highlight(code, lang) {
// Check if hljs recognises the language, else assume 'plaintext'.
const language = hljs.getLanguage(lang) ? lang : 'plaintext'
// Highlight it with the corresponding language.
return hljs.highlight(
// Switch out bullet points (•) to spaces (for proper indentation).
code.replace(/•/g, " "), { language })
// Replace newlines with <br> tags.
.value.replace(/\n/g, "<br>")
// Replace spaces with '&nbsp;' to forcefully render them.
.replace(/ /g, "&nbsp;"
)
}

20
libs/externalContext.js Normal file
View File

@ -0,0 +1,20 @@
export function parseExternalContext(externalContext) {
// If there's no external context, return nothing.
if (!externalContext)
return {}
// Remove start and end tag ↓ Only care about the first "externalConext"
externalContext = externalContext[0].replace(/%%-\n|-%%\n/g, "")
let parsedContext = {}
externalContext.split("\n").forEach(line => {
// If the line is falsey; leave.
if (!line) return
// Assign properties to parsedContext and give them their corresponding values.
line = line.split(/:/)
parsedContext[line[0]] = line[1].replace(/^\s/, "")
})
return parsedContext
}

30
libs/generateContext.js Normal file
View File

@ -0,0 +1,30 @@
import fs from 'fs'
import { JSDOM } from 'jsdom'
import { parseExternalContext } from './externalContext.js'
const ConfigFile = fs.readFileSync('./config.json')
const Config = JSON.parse(ConfigFile)
function generateToc(dom) {
// Get all ToC anchors from the DOM
const tocAnchors = dom.window.document.querySelectorAll(".toc-anchor")
// Generate links to lead to those anvhors.
let tocLinks = []
tocAnchors.forEach(anchor => tocLinks.push(`<a href="#${anchor.name}" class="${anchor.classList[1].replace("-anchor", "")}">${anchor.getAttribute('data-orig-text')}</a>`))
return tocLinks
}
export function generateContext(prerenderedNjk, externalContext = undefined) {
// Create a 'virtual DOM' for analysis.
const dom = new JSDOM(prerenderedNjk)
// Generate respective parts of the context.
return {
serverName: Config.serverName,
tocLinks: generateToc(dom),
externalMeta: externalContext ? parseExternalContext(externalContext) : undefined
}
}

22
libs/markedRenderer.js Normal file
View File

@ -0,0 +1,22 @@
import { highlight } from "./codeHighlighter.js"
export const markedRenderer = {
// Rendering of headings (add an anchor above all headings).
heading(text, level) {
return `
<a name="${text.replace(/\s/g, "-")}" data-orig-text="${text}" class="toc-anchor toc-anchor-h${level}"></a>
<h${level}>
${text}
</h${level}>
`
},
// Render code properly, and syntax highlight it.
code(code, lang, escaped) {
return `
<pre>
<code class="language-${lang}">${highlight(code, lang)}</code>
</pre>
`
}
}

31
libs/nunjucksConfig.js Normal file
View File

@ -0,0 +1,31 @@
import njkMarkdown from 'nunjucks-markdown'
import marked from 'marked'
import { markedRenderer } from './markedRenderer.js'
import { utils } from './utils/utils.js'
export function nunjacksConfig(njk, express, Config) {
// Configure the nunjucks environment (HTML templating)
const njkEnv = njk.configure(
Config.contentDir,
{
autoescape: true, // Automatically escape HTML aka a '<' will become '&lt;'
watch: true, // Automatically reload all templates if they change on disk.
trimBlocks: true, // Remove trailing newlines from tags
lstripBlocks: true, // Automatically remove leading whitespace from tags
express: express // Use the express server. (Currently obsolete, I think.)
}
)
njkEnv.addGlobal('siteMap', entrypoint => utils.values.siteMap.render(entrypoint ? entrypoint : "/"))
// Configure marked (markdown parser)
marked.use({
gfm: true, // Use GitHub formatting?
renderer: markedRenderer // Use my own custom rendering for som tags
})
// Let nunjucks use markdown.
njkMarkdown.register(njkEnv, marked)
}

21
libs/requestHandler.js Normal file
View File

@ -0,0 +1,21 @@
import fs from 'fs'
import { mdRenderer, njkRenderer } from './siteRenderer.js'
// Handle all request and try to find a corresponding file/template.
export function requestHandler(req, res, Config) {
// Check for njk files first
if (fs.existsSync(`./${Config.contentDir}/pages/${req.path}.njk`))
return res.send(njkRenderer(`./${Config.contentDir}/pages/${req.path}.njk`))
if (fs.existsSync(`./${Config.contentDir}/pages/${req.path}/index.njk`))
return res.send(njkRenderer(`./${Config.contentDir}/pages/${req.path}/index.njk`))
// Secondly search for markdown
if (fs.existsSync(`./${Config.contentDir}/pages/${req.path}.md`))
return res.send(mdRenderer(`./${Config.contentDir}/pages/${req.path}.md`))
if (fs.existsSync(`./${Config.contentDir}/pages/${req.path}/index.md`))
return res.send(mdRenderer(`./${Config.contentDir}/pages/${req.path}/index.md`))
// If no matching file is found, return a 404 error.
return res.status(404).send(njkRenderer(`./${Config.contentDir}/errors/404.njk`))
}

36
libs/siteRenderer.js Normal file
View File

@ -0,0 +1,36 @@
import fs from 'fs'
import njk from 'nunjucks'
import { generateContext } from './generateContext.js'
// Load in config
const ConfigFile = fs.readFileSync('./config.json')
const Config = JSON.parse(ConfigFile)
export function njkRenderer(path) {
// Read in the template
const njkFile = fs.readFileSync(path).toString()
// Pre-render it for analysis while rendering context
const prerenderedNjk = njk.renderString(njkFile)
// Generate proper context and make a final render of the template.
const context = generateContext(prerenderedNjk)
return njk.renderString(njkFile, context)
}
export function mdRenderer(path) {
// Load in the njk template and markdown
const njkFile = fs.readFileSync(`${Config.contentDir}/templates/external_md.njk`).toString()
const externalMarkdownFile = fs.readFileSync(path).toString()
// Separate the actual markdown from potential 'externalContext'
const externalMarkdown = externalMarkdownFile.replace(/^%%-\n[\S\s]*-%%\n/, "").replace(/```\w*[\s\S]*?```/g, match => match.replace(/ /g, "•"))
const externalContext = externalMarkdownFile.match(/^%%-\n[\S\s]*-%%\n/)
// Pre-render the template for analysis during context generation.
const prerenderedNjk = njk.renderString(njkFile, { externalMarkdown })
// Generate the context and add the externalMarkdown to the context, then render the template.
let context = generateContext(prerenderedNjk, externalContext)
context.externalMarkdown = externalMarkdown
return njk.renderString(njkFile, context)
}

70
libs/utils/siteMap.js Normal file
View File

@ -0,0 +1,70 @@
import fs from 'fs/promises'
import path from 'path'
async function handlePath(dirName, siteMap) {
// Get all directories in the 'dirName'
const dirs = await fs.readdir(dirName)
// For each file in the directory: check if it is a
// file or a folder, if a folder recursively run this
// function in that folder.
for (const dirIndex in dirs) {
const file = dirs[dirIndex]
const fullPath = path.join(dirName, file)
const fileStats = await fs.stat(fullPath)
if (fileStats.isDirectory())
siteMap[fullPath.replace(/^[\s\S]+\/pages/, "")] = {
path: fullPath,
address: fullPath.replace(/^[\s\S]+\/pages/, ""),
type: "directory",
children: await handlePath(fullPath, {})
}
else
siteMap[fullPath.replace(/^[\s\S]+\/pages/, "").replace(/\.[a-z]+$/, "")] = {
path: fullPath,
address: fullPath.replace(/^[\s\S]+\/pages/, "").replace(/\.[a-z]+$/, ""),
type: "file"
}
}
return siteMap
}
function renderSiteMap(siteMap, entrypoint) {
// Make a template for the sitemap and recursively run
// for all directories with children.
return `
<div class="sitemap-dir">
${(() => {
let result = []
for (const dirIndex in siteMap) {
const dir = siteMap[dirIndex]
if (!dir.address.startsWith(entrypoint))
continue
if (dir.type === "directory") {
result.push(`<a href="${dir.address}">${dir.address}`)
result.push(renderSiteMap(dir.children, entrypoint))
result.push(`</a>`)
} else {
result.push(`<a href="${dir.address}">${dir.address}</a>`)
}
}
return result.join("")
})()}
</div>
`
}
export async function generateSiteMap(Config) {
// Generate a site map and return it and a render-function.
const siteMap = await handlePath(`${Config.contentDir}/pages`, {})
return {
siteMap,
render: entrypoint => renderSiteMap(siteMap, entrypoint)
}
}

14
libs/utils/utils.js Normal file
View File

@ -0,0 +1,14 @@
import fs from 'fs'
import { generateSiteMap } from './siteMap.js'
const ConfigFile = fs.readFileSync('./config.json')
const Config = JSON.parse(ConfigFile)
// Generate some utilities
export let utils = {
generate: async () =>
utils.values = {
siteMap: await generateSiteMap(Config)
},
values: {}
}

1872
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

28
package.json Normal file
View File

@ -0,0 +1,28 @@
{
"name": "qwik-cms",
"version": "1.2.0",
"description": "A dead simple CMS. No bullshit.",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.qwik.space/BurnyLlama/qwik-cms"
},
"keywords": [
"cms"
],
"author": "BurnyLlama",
"license": "MIT",
"dependencies": {
"chokidar": "^3.5.2",
"express": "^4.17.1",
"highlight.js": "^11.2.0",
"jsdom": "^16.7.0",
"marked": "^2.1.3",
"nunjucks": "^3.2.3",
"nunjucks-markdown": "^2.0.1"
}
}