Skip to content

Commit 7c55fca

Browse files
committed
fix: lots of content
ported all the folders systems folder still needs fixing
1 parent 137adeb commit 7c55fca

File tree

99 files changed

+4347
-2460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+4347
-2460
lines changed

next/.site/assets/_custom.scss

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
/* You can add custom styles here. */
22

3+
// Addons
4+
35
// @import "plugins/numbered";
46
@import "plugins/scrollbars";
5-
.mermaid {
7+
8+
// SVG Diagrams
9+
10+
.diagrams {
611
margin: 20px 20px;
712
width: auto;
813
overflow: hidden;
@@ -12,20 +17,23 @@
1217
justify-content: center;
1318
align-items: center;
1419
will-change: transform;
20+
outline: none;
1521
}
16-
.mermaid:active {
22+
.diagrams:active {
1723
cursor: grabbing;
1824
}
19-
.mermaid-caption {
25+
.diagrams-caption {
2026
text-align: center;
2127
}
22-
.mermaid > svg {
28+
.diagrams > svg {
2329
transform-origin: top left;
2430
width: 100%;
2531
height: 100%;
2632
display: flex;
2733
justify-content: center;
2834
align-items: center;
35+
}
36+
.diagrams.svg > svg {
2937
background-color: white;
3038
}
3139

@@ -54,6 +62,9 @@
5462
summary {
5563
outline: none;
5664
}
65+
blockquote {
66+
overflow: auto;
67+
}
5768

5869
.markdown code, code {
5970
margin: 0 1px;
@@ -83,6 +94,21 @@ summary {
8394
width: auto;
8495
position: relative;
8596
padding: 0;
97+
height: 100vh;
98+
}
99+
.book-menu > nav::-webkit-scrollbar,
100+
.book-toc > div nav::-webkit-scrollbar{
101+
width: 8px;
102+
}
103+
104+
.book-menu > nav::-webkit-scrollbar-thumb,
105+
.book-toc > div nav::-webkit-scrollbar-thumb{
106+
background: transparent;
107+
}
108+
109+
.book-menu > nav:hover::-webkit-scrollbar-thumb,
110+
.book-toc > div nav:hover::-webkit-scrollbar-thumb{
111+
background: rgba(255,255,255,.1);
86112
}
87113

88114
@media screen and (max-width: 56rem) {

next/.site/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ enableGitInfo = true
1414
[markup.goldmark.renderer]
1515
unsafe = true
1616
[markup.tableOfContents]
17-
startLevel = 1
17+
startLevel = 2
1818
[markup.highlight]
1919
style = "dracula"
2020

next/.site/layouts/partials/docs/html-head.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
2323
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}">
2424

25-
26-
2725
{{- if .Site.Params.BookServiceWorker }}
2826
{{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }}
2927
<script defer src="{{ $swJS.RelPermalink }}" integrity="{{ $swJS.Data.Integrity }}"></script>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{{ $bookSection := default "docs" .Site.Params.BookSection }}
2+
{{ if eq $bookSection "*" }}
3+
{{ $bookSection = "/" }}{{/* Backward compatibility */}}
4+
{{ end }}
5+
6+
{{ with .Site.GetPage $bookSection }}
7+
{{ template "book-section-children" (dict "Section" . "CurrentPage" $) }}
8+
{{ end }}
9+
10+
{{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}}
11+
{{ $self := eq .CurrentPage .Section }}
12+
{{ $ancestor := .Section.IsAncestor .CurrentPage }}
13+
{{ $collapsed := .Section.Params.bookCollapseSection }}
14+
15+
{{ if or $self $ancestor (not $collapsed) }}
16+
<ul>
17+
{{ range sort (where .Section.Pages "Params.bookhidden" "ne" true) "Weight" "asc" }}
18+
{{ if .IsSection }}
19+
<li {{- if .Params.BookFlatSection }} class="book-section-flat" {{ end -}}>
20+
{{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
21+
{{ template "book-section-children" (dict "Section" . "CurrentPage" $.CurrentPage) }}
22+
</li>
23+
{{ else if and .IsPage .Content }}
24+
<li>
25+
{{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
26+
</li>
27+
{{ end }}
28+
{{ end }}
29+
</ul>
30+
{{ end }}
31+
{{ end }}
32+
33+
{{ define "book-page-link" }}{{/* (dict "Page" .Page "CurrentPage" .CurrentPage) */}}
34+
{{ if .Page.Content }}
35+
<a href="{{ .Page.RelPermalink }}" class="
36+
{{- if and .Page.Params.bookCollapseSection .Page.IsSection }}collapsed {{ end }}
37+
{{- if eq .CurrentPage .Page }}active{{ end }}">
38+
{{- partial "docs/title" .Page -}}
39+
</a>
40+
{{ else }}
41+
<a href="{{ range first 1 (sort .Page.Pages "Weight" "asc") }}{{ .RelPermalink }}{{ end }}" class="
42+
{{- if and .Page.Params.bookCollapseSection .Page.IsSection }}collapsed {{ end }}
43+
{{- if eq .CurrentPage .Page }}active{{ end }}">
44+
{{- partial "docs/title" .Page -}}
45+
</a>
46+
{{/* <span class="collapsed">{{- partial "docs/title" .Page -}}</span> */}}
47+
{{ end }}
48+
{{ end }}

next/.site/layouts/shortcodes/readfile.html renamed to next/.site/layouts/shortcodes/embed.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
{{/* Get the filepath */}}
22
{{/* Relative to content folder */}}
3-
{{ if eq (.Get "file" | printf "%.1s") "/" }}
4-
{{ $.Scratch.Set "filepath" ( strings.TrimLeft "/" ( .Get "file" ))}}
3+
{{ if eq (.Get "src" | printf "%.1s") "/" }}
4+
{{ $.Scratch.Set "filepath" ( strings.TrimLeft "/" ( .Get "src" ))}}
55
{{ else }}
66
{{/* Relative to page */}}
77
{{ $.Scratch.Set "filepath" $.Page.Dir }}
8-
{{ $.Scratch.Add "filepath" ( .Get "file" ) }}
8+
{{ $.Scratch.Add "filepath" ( .Get "src" ) }}
99
{{ end }}
1010

1111

1212
{{ if fileExists ($.Scratch.Get "filepath") }}
13-
{{ if (.Get "lang") }}
13+
{{if eq (.Get "markdown") "true" }}
14+
{{ $.Scratch.Get "filepath" | readFile | markdownify }}
15+
{{ else if (.Get "lang") }}
1416
{{ highlight ($.Scratch.Get "filepath" | readFile | safeHTML ) (.Get "lang") "" }}
1517
{{ else }}
1618
{{ $.Scratch.Get "filepath" | readFile | safeHTML }}

next/.site/layouts/shortcodes/mermaid.html

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
</script>
1111
{{ .Page.Scratch.Set "mermaid" true }}
1212
{{ end }}
13-
1413
{{ if not (.Page.Scratch.Get "panzoom") }}
15-
<!-- Include mermaid only first time -->
16-
<script src='https://unpkg.com/panzoom@9.2.4/dist/panzoom.min.js'></script>
14+
<script src="https://unpkg.com/d3-zoomable@1.1.3/dist/d3-zoomable.min.js"></script>
1715
{{ .Page.Scratch.Set "panzoom" true }}
1816
{{ end }}
1917

@@ -27,17 +25,17 @@
2725
{{ if fileExists ($.Scratch.Get "filepath") }}
2826
{{ $content := $.Scratch.Get "filepath" | readFile }}
2927
{{ $uuid := delimit (shuffle (seq 1 9)) "" }}
30-
{{ $id := (print "mermaid-" $uuid) }}
28+
{{ $id := (print "diagrams-" $uuid) }}
3129
<div>
32-
<div id="{{ $id }}" class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
30+
<div id="{{ $id }}" class="diagrams{{ with .Get "class" }} {{ . }}{{ end }}">
3331
</div>
34-
<div class="mermaid-caption">{{( .Get "title" )}}</div>
32+
<div class="diagrams-caption">{{( .Get "title" )}}</div>
3533
</div>
3634
<script>
3735
var element = document.querySelector("#{{ $id }}");
3836
var insertSvg = function(svgCode){
3937
element.innerHTML = svgCode;
40-
panzoom(element.querySelector('svg'), { bounds: true })
38+
zoomable()(element).htmlEl(element.querySelector('svg'));
4139
};
4240
mermaid.render('temp-{{ $uuid }}', {{- $content -}}, insertSvg)
4341
</script>
@@ -49,15 +47,15 @@
4947
{{ end }}
5048
{{ else }}
5149
{{ $uuid := delimit (shuffle (seq 1 9)) "" }}
52-
{{ $id := (print "mermaid-" $uuid) }}
53-
<div id="{{ $id }}" class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
50+
{{ $id := (print "diagrams-" $uuid) }}
51+
<div id="{{ $id }}" class="diagrams{{ with .Get "class" }} {{ . }}{{ end }}">
5452
</div>
5553
<script>
5654
console.log("{{ $uuid }}")
5755
var element = document.querySelector("#{{ $id }}");
5856
var insertSvg = function(svgCode){
5957
element.innerHTML = svgCode;
60-
panzoom(element.querySelector('svg'), { bounds: true })
58+
zoomable()(element).htmlEl(element.querySelector('svg'));
6159
};
6260
mermaid.render('temp-{{ $uuid }}', {{- .Inner -}}, insertSvg)
6361
</script>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{ if not (.Page.Scratch.Get "panzoom") }}
2+
<!-- Include mermaid only first time -->
3+
<!-- <script src='https://unpkg.com/panzoom@9.2.4/dist/panzoom.min.js'></script> -->
4+
<script src="https://unpkg.com/d3-zoomable@1.1.3/dist/d3-zoomable.min.js"></script>
5+
{{ .Page.Scratch.Set "panzoom" true }}
6+
{{ end }}
7+
8+
{{ if (.Get "src") }}
9+
<object data='{{- .Get "src" -}}#pagemode=thumbs&toolbar=1&statusbar=1&messages=1&navpanes=1'
10+
type='application/pdf'
11+
width='100%'
12+
height='500px'>
13+
<p>This browser does not support inline PDFs. Please download the PDF to view it: <a href="{{- .Get "src" -}}">Download {{ .Get "title" }} PDF</a></p>
14+
</object>
15+
{{ else }}
16+
<blockquote class="book-hint danger">
17+
{{- printf "File '%s' not found from Page '%s'" ($.Scratch.Get "filepath") .Page.File }}
18+
</blockquote>
19+
{{- warnf "File '%s' not found from Page '%s'" ($.Scratch.Get "filepath") .Page.File }}
20+
{{ end }}
Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{{ if not (.Page.Scratch.Get "panzoom") }}
2-
<!-- Include mermaid only first time -->
3-
<!-- <script src='https://unpkg.com/panzoom@9.2.4/dist/panzoom.min.js'></script> -->
42
<script src="https://unpkg.com/d3-zoomable@1.1.3/dist/d3-zoomable.min.js"></script>
53
{{ .Page.Scratch.Set "panzoom" true }}
64
{{ end }}
@@ -15,18 +13,16 @@
1513
{{ if fileExists ($.Scratch.Get "filepath") }}
1614
{{ $content := $.Scratch.Get "filepath" | readFile | safeHTML }}
1715
{{ $uuid := delimit (shuffle (seq 1 9)) "" }}
18-
{{ $id := (print "mermaid-" $uuid) }}
16+
{{ $id := (print "diagrams-" $uuid) }}
1917
<div>
20-
<div id="{{ $id }}" class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
18+
<div id="{{ $id }}" class="diagrams svg{{ with .Get "class" }} {{ . }}{{ end }}">
2119
{{- $content -}}
2220
</div>
23-
<div class="mermaid-caption">{{( .Get "title" )}}</div>
21+
<div class="diagrams-caption">{{( .Get "title" )}}</div>
2422
</div>
2523
<script>
2624
var element = document.querySelector("#{{ $id }}");
27-
var myZoom = zoomable();
28-
myZoom(element)
29-
.htmlEl(element.querySelector('svg'));
25+
zoomable()(element).htmlEl(element.querySelector('svg'));
3026
</script>
3127
{{ else }}
3228
<blockquote class="book-hint danger">
@@ -35,9 +31,8 @@
3531
{{- warnf "File '%s' not found from Page '%s'" ($.Scratch.Get "filepath") .Page.File }}
3632
{{ end }}
3733
{{ else }}
38-
{{ $uuid := delimit (shuffle (seq 1 9)) "" }}
39-
{{ $id := (print "mermaid-" $uuid) }}
40-
<div id="{{ $id }}" class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
34+
<div class="diagrams{{ with .Get "class" }} {{ . }}{{ end }}">
4135
{{- .Inner -}}
36+
<div class="diagrams-caption">{{( .Get "title" )}}</div>
4237
</div>
4338
{{ end }}

0 commit comments

Comments
 (0)