-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c55fca
commit 2e3fbd7
Showing
108 changed files
with
793 additions
and
951 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{{- if .Page.Site.Params.BookPortableLinks -}} | ||
{{- template "portable-link" . -}} | ||
{{- else -}} | ||
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a> | ||
{{- end -}} | ||
|
||
{{- define "portable-link" -}} | ||
{{- $destination := .Destination }} | ||
{{- $title := .Title -}} | ||
{{- $isRemote := or (in .Destination ":") (strings.HasPrefix .Destination "//") }} | ||
{{- if not $isRemote }} | ||
{{- $url := urls.Parse .Destination }} | ||
{{- $path := strings.TrimSuffix "/_index.md" $url.Path }} | ||
{{- $path = strings.TrimSuffix "/_index" $path }} | ||
{{- $path = strings.TrimSuffix ".md" $path }} | ||
{{- $page := .Page.Site.GetPage $path }} | ||
{{- if $page }} | ||
{{- $destination = $page.RelPermalink }} | ||
{{- if .Title -}} | ||
{{- $title = .Title -}} | ||
{{- else -}} | ||
{{- $title = $page.Title -}} | ||
{{- end -}} | ||
{{- if $url.Fragment }} | ||
{{- $destination = print $destination "#" $url.Fragment }} | ||
{{- end }} | ||
{{- else if fileExists (print .Page.File.Dir .Destination) }} | ||
<!-- Nothing --> | ||
{{- else -}} | ||
{{- warnf "Page '%s' not found in '%s'" .Destination .Page.File }} | ||
{{- end }} | ||
{{- end }} | ||
<a href="{{ $destination | safeURL }}"{{ with $title}} title="{{ . }}"{{ end }} {{ if $isRemote }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a> | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<i class="gg-incorrect"></i> Incorrect | ||
<i class="gg-wip"></i> WIP | ||
<i class="gg-incomplete"></i> Incomplete | ||
<i class="gg-stable"></i> Stable | ||
<i class="gg-permanent"></i> Permanent | ||
|
||
{{ range .Site.Pages }} | ||
{{ if in (slice ($.Get "name")) .Title}} | ||
{{ $.Scratch.Set "counter" 0 }} | ||
{{ $.Scratch.Set "counter-audit" 0 }} | ||
{{ range .Data.Pages }} | ||
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }} | ||
{{ if .Params.dashboardAudit }} | ||
{{ $.Scratch.Set "counter-audit" (add ($.Scratch.Get "counter-audit") .Params.dashboardAudit) }} | ||
{{ end }} | ||
{{ end }} | ||
<details {{ if eq ($.Get "open") "true" }}open{{ end }}> | ||
<summary>{{ .Title}} <i title="{{ humanize .Params.dashboardState }}" class="gg-{{ .Params.dashboardState }}"></i> <code>Last update: {{ dateFormat "02 Jan 06 15:04 UTC" .Lastmod.UTC }}</code></summary> | ||
|
||
<div class="markdown-inner"> | ||
<b>Audit:</b> <i class="gg-{{ if eq ($.Scratch.Get "counter-audit") ($.Scratch.Get "counter")}}stable{{else}}wip{{end}}"></i> {{$.Scratch.Get "counter-audit"}} / {{$.Scratch.Get "counter"}}<br> | ||
<b>Interface:</b> <i class="gg-incomplete"></i><br> | ||
<b>Tests:</b> <i class="gg-wip"></i><br> | ||
</div> | ||
{{ range .Data.Pages }} | ||
<div class="book-expand"> | ||
<label> | ||
<div class="book-expand-head flex justify-between"> | ||
<span>{{ .Title }} <i title="{{ humanize .Params.dashboardState }}" class="gg-{{ if .Params.dashboardState }}{{.Params.dashboardState}}{{else}}wip{{end}}"></i> <code>Last update: {{ dateFormat "02 Jan 06 15:04 UTC" .Lastmod.UTC }}</code></span> | ||
<span> ↕ </span> | ||
</div> | ||
<input type="checkbox" class="hidden" /> | ||
<div class="book-expand-content markdown-inner"> | ||
<b>Audit:</b> <i class="gg-{{ if eq .Params.dashboardAudit 1}}permanent{{else}}wip{{end}}"></i><br> | ||
<b>Interface:</b> <i class="gg-{{ if .Params.dashboardInterface }}{{ .Params.dashboardInterface }}{{else}}wip{{end}}"></i><br> | ||
<b>Tests:</b> <i class="gg-wip"></i><br> | ||
</div> | ||
</label> | ||
</div> | ||
{{ end }} | ||
</details><br> | ||
|
||
|
||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{{ if not (.Page.Scratch.Get "panzoom") }} | ||
<script src="https://unpkg.com/[email protected]/dist/d3-zoomable.min.js"></script> | ||
{{ .Page.Scratch.Set "panzoom" true }} | ||
{{ end }} | ||
|
||
{{ if (.Get "src") }} | ||
{{ if eq (.Get "src" | printf "%.4s") "http" }} | ||
<figure> | ||
<img src="{{ .Get "src" }}" /> | ||
<figcaption> | ||
{{(.Get "title")}} | ||
</figcaption> | ||
</figure> | ||
{{ else }} | ||
{{ $.Scratch.Set "filepath" .Page.File.Dir }} | ||
{{ $.Scratch.Add "filepath" ( .Get "src" ) }} | ||
{{ if fileExists ($.Scratch.Get "filepath") }} | ||
{{ $uuid := delimit (shuffle (seq 1 9)) "" }} | ||
{{ $id := (print "figure-" $uuid) }} | ||
<figure > | ||
{{ $src := .Page.Resources.GetMatch ( .Get "src" ) }} | ||
{{ with $src }} | ||
<div id="{{ $id }}" class="figure"> | ||
<img src="{{ .RelPermalink }}" height="{{ .Height }}" width="{{ .Width }}" loading="lazy" alt="{{ $.Get "title" }}"/> | ||
</div> | ||
{{ end }} | ||
<figcaption> | ||
{{ .Get "title" }} | ||
</figcaption> | ||
</figure> | ||
{{ if (.Get "zoom")}} | ||
<script> | ||
var element = document.querySelector("#{{ $id }}"); | ||
zoomable()(element).htmlEl(element.querySelector('img')); | ||
</script> | ||
{{ end }} | ||
{{ else }} | ||
<blockquote class="book-hint danger"> | ||
{{- printf "File '%s' not found from Page '%s'" ($.Scratch.Get "filepath") .Page.File }} | ||
</blockquote> | ||
{{- warnf "File '%s' not found from Page '%s'" ($.Scratch.Get "filepath") .Page.File }} | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- $ref := relref . (.Get 0) -}} | ||
{{- $page := .Site.GetPage (.Get 0) -}} | ||
<a href="{{- $ref -}}" title="{{- $page.Title -}}">{{- $page.Title -}}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.