mirror of
https://github.com/docker/docs.git
synced 2026-06-19 07:35:16 +00:00
4e1cedac16
Remove redundant header from API reference pages
123 lines
3.3 KiB
HTML
123 lines
3.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
{{ $specURL := urls.Parse (printf "/%s%s.yaml" .File.Dir .File.ContentBaseName) }}
|
|
<title>{{ printf "%s | %s" .Title site.Title }}</title>
|
|
<!-- needed for adaptive design -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="description" content="{{ .Description }}" />
|
|
<meta charset="utf-8" />
|
|
<link rel="canonical" href="{{ .Permalink }}" />
|
|
<link
|
|
rel="alternate"
|
|
href="{{ partial "utils/markdown-url.html" . }}"
|
|
type="text/markdown"
|
|
title="{{ .Title }} (Markdown)"
|
|
/>
|
|
<!-- favicon -->
|
|
<link rel="icon" href="/assets/images/favicon-32x32.png" sizes="32x32" />
|
|
<link
|
|
rel="icon"
|
|
href="/assets/images/favicon-192x192.png"
|
|
sizes="192x192"
|
|
/>
|
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
<link rel="shortcut icon" href="/favicon.ico" />
|
|
<!--
|
|
Provide a link to the swagger / OpenAPI spec itself. We're currently using
|
|
Swagger (OpenAPI v2) for some, so use a more generic "application/yaml" type.
|
|
|
|
Once all our specs are updated to OpenAPI v3, we can change this to "application/vnd.oai.openapi"
|
|
-->
|
|
<link
|
|
rel="alternate"
|
|
href="{{ $specURL.String | absURL }}"
|
|
type="application/yaml"
|
|
title="{{ .Title }} (Swagger/OpenAPI)"
|
|
/>
|
|
{{ partial "schema.html" . }}
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
color: #1f2933;
|
|
font-family:
|
|
Roboto Flex,
|
|
Roboto,
|
|
sans-serif;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.menu-content > div:first-child {
|
|
background-color: #086dd7;
|
|
padding: 16px;
|
|
}
|
|
|
|
.auth-tag,
|
|
.pat,
|
|
.oat {
|
|
border-radius: 4px;
|
|
color: #fff;
|
|
padding: 5px;
|
|
}
|
|
|
|
.pat {
|
|
background-color: rgb(149, 80, 124);
|
|
}
|
|
|
|
.pat::after {
|
|
content: "personal access token";
|
|
}
|
|
|
|
.oat::after {
|
|
content: "org access token";
|
|
}
|
|
|
|
.oat {
|
|
background-color: rgb(24, 111, 175);
|
|
}
|
|
|
|
.auth-tag:not(:last-child) {
|
|
margin-right: 5px;
|
|
}
|
|
|
|
.redoc-container {
|
|
min-height: calc(100vh - 220px);
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<main>
|
|
<article class="redoc-container">
|
|
<noscript>
|
|
<p style="padding: 32px 24px; max-width: 72ch">
|
|
This reference uses JavaScript for the interactive explorer. View
|
|
the
|
|
<a href="{{ partial "utils/markdown-url.html" . }}">Markdown page</a>
|
|
or
|
|
<a href="{{ $specURL.String | absURL }}"
|
|
>download the OpenAPI specification</a
|
|
>
|
|
if JavaScript is unavailable.
|
|
</p>
|
|
</noscript>
|
|
{{ if or (strings.HasPrefix .RelPermalink "/reference/api/hub/") (strings.HasPrefix .RelPermalink "/reference/api/registry/") }}
|
|
<redoc
|
|
spec-url="{{ $specURL.String }}"
|
|
suppress-warnings="true"
|
|
lazy-rendering
|
|
></redoc>
|
|
{{ else }}
|
|
<redoc
|
|
spec-url="{{ $specURL.String }}"
|
|
hide-hostname="true"
|
|
suppress-warnings="true"
|
|
lazy-rendering
|
|
></redoc>
|
|
{{ end }}
|
|
</article>
|
|
</main>
|
|
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
|
|
</body>
|
|
</html>
|