-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addon Docs: Incorporate with addons page
- Loading branch information
Showing
8 changed files
with
187 additions
and
8 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
1 change: 0 additions & 1 deletion
1
content/docs/addons/middle-click-popup.md → content/addons/middle-click-popup.md
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
1 change: 0 additions & 1 deletion
1
content/docs/addons/scratch-messaging.md → content/addons/scratch-messaging.md
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 was deleted.
Oops, something went wrong.
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 @@ | ||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}" class="anchor" aria-label="Anchor"></a></h{{ .Level }}> |
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,108 @@ | ||
{{ block "html" . -}} | ||
|
||
<!DOCTYPE html> | ||
|
||
<html lang="{{ .Site.Language.Lang }}"> | ||
|
||
<head> | ||
|
||
{{ partial "head" . }} | ||
{{ partial "scss" "assets/css/docs.scss" }} | ||
{{ if isset $.Params "embed_js" }}{{ range $.Params.embed_js }} | ||
<script defer src="{{ . }}"></script> | ||
{{ end }}{{ end }} | ||
{{ if isset $.Params "embed_css" }}{{ range $.Params.embed_css }} | ||
<link rel="stylesheet" href="{{ . }}" crossorigin /> | ||
{{ end }}{{ end }} | ||
<script src="https://cdn.jsdelivr.net/npm/simple-scrollspy@2.2.0/demo/dist/simple-scrollspy.min.js" defer></script> | ||
<script defer src="/assets/js/docs.js"></script> | ||
{{ block "head-additional" . }}{{ end }} | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
{{ block "body" . }}{{ end }} | ||
|
||
</body> | ||
|
||
</html> | ||
|
||
{{- end }} | ||
|
||
{{ define "body" }} | ||
|
||
{{ partial "nav" . }} | ||
|
||
{{ partial "docs/sidebar-toggle" . }} | ||
|
||
<main> | ||
{{ block "main" . }}{{ end }} | ||
</main> | ||
|
||
{{ partialCached "footer" . .Site.Language.Lang }} | ||
|
||
{{ end }} | ||
|
||
{{ define "main" }} | ||
|
||
<div class="container-fluid"> | ||
|
||
<div id="docs-container"> | ||
|
||
<aside class="collapse d-lg-block" id="docs-nav-wrapper"> | ||
<!-- d-none --> | ||
<!-- px-2 py-4 --> | ||
{{ partial "docs/sidebar" . }} | ||
</aside> | ||
|
||
{{ if ( and (ne .TableOfContents "<nav id=\"TableOfContents\"></nav>") (ne .TableOfContents "") ) -}} | ||
<aside class="text-muted mb-3 mb-xl-0 p-3 p-xl-0" id="docs-toc"> | ||
<!-- d-none --> | ||
<!-- px-2 py-4 --> | ||
<a class="text-muted collapse-button mx-xl-2 collapsed" data-toggle="collapse" href="#docs-toc-inner" role="button" aria-expanded="true"> | ||
<div>{{ T "Docs.TOC" }}</div> | ||
{{- template "svg" -}} | ||
</a> | ||
<div class="collapse d-xl-block" id="docs-toc-inner"> | ||
<hr class="my-1 mx-2" /> | ||
{{ .TableOfContents }} | ||
</div> | ||
|
||
</aside> | ||
{{- end }} | ||
|
||
<div id="docs-header" class="md-content mb-3"> | ||
{{ block "header" . }}{{ end }} | ||
</div> | ||
|
||
<article id="docs-content" class="md-content mb-3"> | ||
{{ block "content" . }}{{ end }} | ||
</article> | ||
|
||
<div id="docs-footer" class="md-content"> | ||
{{ partial "docs/footer" . }} | ||
{{ if ( not $.Params.no_comments ) -}} | ||
<div id="comments" class="mt-4">{{ partial "comments" }}</div> | ||
{{- end }} | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
{{ end }} | ||
|
||
{{ define "header" }} | ||
|
||
<h1>{{ .Title }}</h1> | ||
|
||
{{ end }} | ||
|
||
{{ define "content" }} | ||
|
||
{{ .Content }} | ||
|
||
{{ end }} | ||
|
||
{{- define "svg" -}}<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16"><g fill="#626262"><path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8L4.646 2.354a.5.5 0 0 1 0-.708z"/></g></svg>{{- 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,56 @@ | ||
{{ define "head" }}{{ end }} | ||
|
||
{{ define "body" }} | ||
|
||
{{ partial "nav" . }} | ||
|
||
<main> | ||
<h1>Addons</h1> | ||
|
||
<div class="container-fluid"> | ||
|
||
<div id="docs-container"> | ||
|
||
<aside class="collapse d-lg-block" id="docs-nav-wrapper"> | ||
<!-- d-none --> | ||
<!-- px-2 py-4 --> | ||
{{ partial "docs/sidebar" . }} | ||
</aside> | ||
|
||
{{ if ( and (ne .TableOfContents "<nav id=\"TableOfContents\"></nav>") (ne .TableOfContents "") ) -}} | ||
<aside class="text-muted mb-3 mb-xl-0 p-3 p-xl-0" id="docs-toc"> | ||
<!-- d-none --> | ||
<!-- px-2 py-4 --> | ||
<a class="text-muted collapse-button mx-xl-2 collapsed" data-toggle="collapse" href="#docs-toc-inner" role="button" aria-expanded="true"> | ||
<div>{{ T "Docs.TOC" }}</div> | ||
{{- template "svg" -}} | ||
</a> | ||
<div class="collapse d-xl-block" id="docs-toc-inner"> | ||
<hr class="my-1 mx-2" /> | ||
{{ .TableOfContents }} | ||
</div> | ||
|
||
</aside> | ||
{{- end }} | ||
|
||
<article id="docs-content" class="md-content mb-3"> | ||
{{ block "content" . }}{{ end }} | ||
</article> | ||
|
||
<div id="docs-footer" class="md-content"> | ||
{{ partial "docs/footer" . }} | ||
{{ if ( not $.Params.no_comments ) -}} | ||
<div id="comments" class="mt-4">{{ partial "comments" }}</div> | ||
{{- end }} | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
{{ block "content" . }}{{ end }} | ||
</main> | ||
|
||
{{ partialCached "footer" . .Site.Language.Lang }} | ||
|
||
{{ 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,22 @@ | ||
{{ define "header" }} | ||
{{ $data := ( index ( where ( index $.Site.Data.addons $.Page.Language.Lang ) "id" .Params.id ) 0 ) }} | ||
|
||
<h1>{{ $data.name }}</h1> | ||
|
||
{{ end }} | ||
|
||
{{ define "content" }} | ||
|
||
{{ $data := ( index ( where ( index $.Site.Data.addons $.Page.Language.Lang ) "id" .Params.id ) 0 ) }} | ||
|
||
{{ partial "docs/addons-infobox" $data }} | ||
|
||
{{ .Content }} | ||
|
||
{{ end }} | ||
|
||
{{ define "head-additional" }} | ||
|
||
{{ partial "scss" "assets/css/markdown.scss" }} | ||
|
||
{{ end }} |