diff options
Diffstat (limited to 'site/layouts/_default')
-rw-r--r-- | site/layouts/_default/docs.html | 34 | ||||
-rw-r--r-- | site/layouts/_default/examples.html | 52 | ||||
-rw-r--r-- | site/layouts/_default/home.html | 19 | ||||
-rw-r--r-- | site/layouts/_default/single.html | 29 |
4 files changed, 134 insertions, 0 deletions
diff --git a/site/layouts/_default/docs.html b/site/layouts/_default/docs.html new file mode 100644 index 0000000000..7ef4925e1f --- /dev/null +++ b/site/layouts/_default/docs.html @@ -0,0 +1,34 @@ +<!doctype html> +<html lang="en"> + <head> + {{ partial "header" . }} + </head> + <body> + {{ partial "skippy" . }} + + {{ partial "docs-navbar" . }} + + <div class="container-fluid"> + <div class="row flex-xl-nowrap"> + <div class="col-12 col-md-3 col-xl-2 bd-sidebar"> + {{ partial "docs-sidebar" . }} + </div> + + {{ if (eq .Page.Params.toc true) }} + <nav class="d-none d-xl-block col-xl-2 bd-toc" aria-label="Secondary navigation"> + {{ .TableOfContents }} + </nav> + {{ end }} + + <main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 bd-content" role="main"> + <h1 class="bd-title" id="content">{{ .Title | markdownify }}</h1> + <p class="bd-lead">{{ .Page.Params.Description | markdownify }}</p> + {{ partial "ads" . }} + {{ .Content }} + </main> + </div> + </div> + + {{ partial "scripts" . }} + </body> +</html> diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html new file mode 100644 index 0000000000..a62abad007 --- /dev/null +++ b/site/layouts/_default/examples.html @@ -0,0 +1,52 @@ +<!doctype html> +<html lang="en"{{ with .Page.Params.html_class }} class="{{ . }}"{{ end }}> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="description" content=""> + <meta name="author" content="{{ .Site.Params.authors }}"> + <meta name="generator" content="Hugo {{ .Hugo.Version }}"> + <title>{{ .Page.Title | markdownify }} ยท {{ .Site.Title | markdownify }}</title> + + <link rel="canonical" href="{{ .Permalink }}"> + + {{ partial "stylesheet" . }} + + <style> + .bd-placeholder-img { + font-size: 1.125rem; + text-anchor: middle; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + + @media (min-width: 768px) { + .bd-placeholder-img-lg { + font-size: 3.5rem; + } + } + </style> + + {{ range .Page.Params.extra_css }} + {{ "<!-- Custom styles for this template -->" | safeHTML }} + <link href="{{ . }}" rel="stylesheet"> + {{- end }} + </head> + <body{{ with .Page.Params.body_class }} class="{{ . }}"{{ end }}> + {{ .Content }} + + {{ if ne .Page.Params.include_js false }} + {{ if eq (getenv "HUGO_ENV") "production" }} + <script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ .Site.Params.cdn.js_bundle_hash }}" crossorigin="anonymous"></script> + {{ else }} + <script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script> + {{ end }} + + {{ range .Page.Params.extra_js }} + <script src="{{ . }}"></script> + {{- end }} + {{ end }} + </body> +</html> diff --git a/site/layouts/_default/home.html b/site/layouts/_default/home.html new file mode 100644 index 0000000000..c03de11abb --- /dev/null +++ b/site/layouts/_default/home.html @@ -0,0 +1,19 @@ +<!doctype html> +<html lang="en"> + <head> + {{ partial "header" . }} + </head> + <body> + {{ partial "skippy" . }} + + {{ partial "docs-navbar" . }} + + {{ partial "home/masthead" . }} + {{ partial "home/masthead-followup" . }} + + {{ .Content }} + + {{ partial "footer" . }} + {{ partial "scripts" . }} + </body> +</html> diff --git a/site/layouts/_default/single.html b/site/layouts/_default/single.html new file mode 100644 index 0000000000..8f84570bc2 --- /dev/null +++ b/site/layouts/_default/single.html @@ -0,0 +1,29 @@ +<!doctype html> +<html lang="en"> + <head> + {{ partial "header" . }} + </head> + <body> + {{ partial "skippy" . }} + + {{ partial "docs-navbar" . }} + + <header class="d-flex flex-column flex-md-row align-items-md-center p-5 bg-light"> + <div class="pt-md-3 pb-md-4"> + <h1 class="bd-title mt-0">{{ .Title | markdownify }}</h1> + <p class="bd-lead">{{ .Page.Params.Description | markdownify }}</p> + {{ if eq .Title "Examples" }} + <a href="{{ .Site.Params.download.source }}" class="btn btn-lg btn-bd-primary" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download');">Download source code</a> + {{ end }} + </div> + {{ partial "ads" . }} + </header> + + <main class="bd-content p-5" id="content" role="main"> + {{ .Content }} + </main> + + {{ partial "footer" . }} + {{ partial "scripts" . }} + </body> +</html> |