mirror of https://github.com/docker/docs.git
chore: remove unused templates
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
81643b7962
commit
0905e312e3
|
@ -1,108 +0,0 @@
|
|||
{{ define "left" }}
|
||||
{{ partial "sidebar.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ partial "breadcrumbs-legacy.html" . }}
|
||||
<article class="prose max-w-none dark:prose-invert">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ $openapi := index site.Data.api .Params.apidata }}
|
||||
{{ printf "## %s version %s" $openapi.info.title $openapi.info.version | .RenderString }}
|
||||
{{ .RenderString $openapi.info.description }}
|
||||
{{ range $path, $pathKeys := $openapi.paths }}
|
||||
{{ range $key, $properties := $pathKeys }}
|
||||
{{ if in "get put patch post delete" $key }}
|
||||
{{ if isset $properties "operationId" }}
|
||||
{{ printf "### %s {#%s}" $properties.summary $properties.operationId | $.RenderString }}
|
||||
{{ else }}
|
||||
{{ printf "### %s {#%s}" $properties.summary (urlize $properties.summary) | $.RenderString }}
|
||||
{{ end }}
|
||||
{{ $badgeColors := (dict
|
||||
"get" "bg-blue-light-500 dark:bg-blue-dark-300"
|
||||
"head" "bg-gray-light-500 dark:bg-gray-dark-300"
|
||||
"put" "bg-green-light-500 dark:bg-green-dark-300"
|
||||
"post" "bg-violet-light-500 dark:bg-violet-dark-300"
|
||||
"delete" "bg-red-light-500 dark:bg-red-dark-300"
|
||||
"patch" "bg-amber-light-500 dark:bg-amber-dark-500"
|
||||
)
|
||||
}}
|
||||
<span
|
||||
class="p-2 text-white {{ index $badgeColors $key }} rounded uppercase"
|
||||
>{{ $key }}</span
|
||||
> <code>{{ $path }}</code>
|
||||
{{ $curlExample := printf
|
||||
`curl -X %s \
|
||||
"%sapi%s"` ($key | upper) (index $openapi.servers 0).url $path
|
||||
}}
|
||||
{{ highlight $curlExample "console" }}
|
||||
{{ $properties.description | $.RenderString (dict "display" "block") }}
|
||||
{{ with $properties.parameters }}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ T "apiPropParam" }}</th>
|
||||
<th>{{ T "apiPropType" }}</th>
|
||||
<th>{{ T "apiPropValue" }}</th>
|
||||
<th>{{ T "apiPropReq" }}</th>
|
||||
<th>{{ T "apiPropDesc" }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{ range . }}
|
||||
{{ $paramData := . }}
|
||||
{{ if (index . "$ref") }}
|
||||
{{ $refName := index (last 1 (split (index . "$ref") "/")) 0 }}
|
||||
{{ $paramData = index $openapi.components.parameters $refName }}
|
||||
{{ end }}
|
||||
<tr>
|
||||
<td>{{ $paramData.name }}</td>
|
||||
<td>{{ $paramData.in }}</td>
|
||||
<td>
|
||||
{{ if isset $paramData.schema "$ref" }}
|
||||
{{ $refName := index (last 1 (split (index $paramData.schema "$ref") "/")) 0 }}
|
||||
{{ range (index $openapi.components.schemas $refName).enum }}
|
||||
<code>{{ . }}</code>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $paramData.schema.type }}
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>{{ $paramData.required }}</td>
|
||||
<td>{{ $paramData.description | $.RenderString }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
{{ end }}
|
||||
{{ range $responseCode, $responseDetails := $properties.responses }}
|
||||
{{ if isset $responseDetails "content" }}
|
||||
{{ range $exampleName, $example := (index $responseDetails.content "application/json").examples }}
|
||||
{{ if isset $example "schema" }}
|
||||
{{ $refPath := index (index $example "schema") "$ref" }}
|
||||
{{ range $index, $component := (split $refPath "/") }}
|
||||
{{ if (index $openapi.components.examples $component) }}
|
||||
<div>
|
||||
<span
|
||||
>{{ T "apiExampleResponseCode" }}:
|
||||
{{ $responseCode }}</span
|
||||
>
|
||||
<pre><code>{{ (index $openapi.components.examples $component).value | jsonify (dict "indent" " ") }}</code></pre>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ T "apiExampleResponse" }}:
|
||||
<pre><code>
|
||||
{{- $example.value | jsonify (dict "indent" " ") }}
|
||||
</code></pre>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ define "right" }}
|
||||
{{ partial "api-aside.html" . }}
|
||||
{{ end }}
|
|
@ -11,7 +11,7 @@
|
|||
{{ end }}
|
||||
{{ .Scratch.Set "headings" slice }}
|
||||
{{ .Scratch.Set "subheadings" slice }}
|
||||
{{ partial "breadcrumbs-legacy.html" . }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
<article class="prose max-w-none dark:prose-invert">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ $data.short | .RenderString (dict "display" "block") }}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ partial "breadcrumbs-legacy.html" . }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
<article class="prose max-w-none dark:prose-invert">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<table>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ partial "breadcrumbs-legacy.html" . }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
<article class="prose max-w-none dark:prose-invert">
|
||||
{{ with .Title }}
|
||||
<h1>{{ . }}</h1>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ partial "breadcrumbs-legacy.html" . }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
<article class="prose max-w-none dark:prose-invert">
|
||||
{{ with .Title }}
|
||||
<h1>{{ . }}</h1>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
{{ define "left" }}
|
||||
{{ partial "sidebar.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ partial "breadcrumbs-legacy.html" . }}
|
||||
<article class="prose max-w-none dark:prose-invert">
|
||||
<h1 class="flex items-center select-none">
|
||||
<span class="text-4xl material-symbols-rounded">tag</span>
|
||||
<span class="select-text">{{ .Title }}</span>
|
||||
</h1>
|
||||
{{ .Content }}
|
||||
{{ with (index site.Taxonomies.topics .Data.Term) }}
|
||||
<hr />
|
||||
<nav>
|
||||
<div class="text-xl">Pages about this topic:</div>
|
||||
<ul>
|
||||
{{ range . | first 5 }}
|
||||
<li>
|
||||
<a href="{{ .Page.Permalink }}"
|
||||
>{{ partial "utils/title.html" .Page }}</a
|
||||
>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"title": "{{ .Title }}",
|
||||
"lead": "{{ .Params.lead }}",
|
||||
"description": {{ .Plain | jsonify }},
|
||||
"docs": [
|
||||
{{- range $i, $e := (index site.Taxonomies.tags .Data.Term) }}
|
||||
{{ if $i }},{{ end }}
|
||||
{
|
||||
"title": "{{ .Title }}",
|
||||
"url": "{{ .Permalink}}"
|
||||
}
|
||||
{{ end }}
|
||||
]
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
<nav class="p-5 space-x-2 text-sm flex items-center">
|
||||
{{- template "crumbtrail" (dict "p1" . "p2" .) -}}
|
||||
</nav>
|
||||
|
||||
{{ define "crumbtrail" }}
|
||||
{{ if and .p1.Parent .p2.Parent }}
|
||||
{{ template "crumbtrail" (dict "p1" .p1.Parent "p2" .p2 ) }}
|
||||
{{- end -}}
|
||||
<a
|
||||
class="link"
|
||||
title="{{ partial "utils/title" .p1 }}"
|
||||
href="{{ .p1.Permalink }}"
|
||||
>{{ if .p1.IsHome }}
|
||||
<span class="material-symbols-rounded">home</span>
|
||||
{{ else }}
|
||||
{{ partial "utils/title" .p1 }}
|
||||
{{ end }}</a
|
||||
>{{- if ne .p1 .p2 }}<span>/</span>{{- end -}}
|
||||
{{- end -}}
|
|
@ -3,7 +3,7 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ partial "breadcrumbs-legacy.html" . }}
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
<article class="prose max-w-none dark:prose-invert">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<blockquote>
|
||||
|
|
Loading…
Reference in New Issue