mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
Add baseof layout
This commit is contained in:
parent
933b6510ca
commit
4c9597ef7e
@ -1,18 +1,6 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{{ partial "header" . }}
|
||||
</head>
|
||||
<body class="d-flex flex-column min-vh-100">
|
||||
{{ partial "skippy" . }}
|
||||
|
||||
{{ partial "docs-navbar" . }}
|
||||
|
||||
<main class="my-auto p-5" id="content">
|
||||
{{ .Content }}
|
||||
</main>
|
||||
|
||||
{{ partial "footer" . }}
|
||||
{{ partial "scripts" . }}
|
||||
</body>
|
||||
</html>
|
||||
{{ define "body_override" }}<body class="d-flex flex-column min-vh-100">{{ end }}
|
||||
{{ define "main" }}
|
||||
<main class="my-auto p-5" id="content">
|
||||
{{ .Content }}
|
||||
</main>
|
||||
{{ end }}
|
||||
|
20
site/layouts/_default/baseof.html
Normal file
20
site/layouts/_default/baseof.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{{ partial "header" . }}
|
||||
</head>
|
||||
{{ block "body_override" . }}<body>{{ end }}
|
||||
{{ partial "skippy" . }}
|
||||
|
||||
{{ partial "docs-navbar" . }}
|
||||
|
||||
{{ block "main" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "footer" . }}
|
||||
{{ partial "scripts" . }}
|
||||
|
||||
{{ block "footer" . }}
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
@ -1,60 +1,49 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{{ partial "header" . }}
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "skippy" . }}
|
||||
{{ define "main" }}
|
||||
{{ partial "docs-subnav" . }}
|
||||
|
||||
{{ partial "docs-navbar" . }}
|
||||
{{ partial "docs-subnav" . }}
|
||||
<div class="container-xxl my-md-4 bd-layout">
|
||||
<aside class="bd-sidebar">
|
||||
{{ partial "docs-sidebar" . }}
|
||||
</aside>
|
||||
|
||||
<div class="container-xxl my-md-4 bd-layout">
|
||||
<aside class="bd-sidebar">
|
||||
{{ partial "docs-sidebar" . }}
|
||||
</aside>
|
||||
|
||||
<main class="bd-main order-1">
|
||||
<div class="bd-intro pl-lg-4">
|
||||
<div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
|
||||
<a class="btn btn-sm btn-bd-light mb-2 mb-md-0" href="{{ .Site.Params.repo }}/blob/main/site/content/{{ .Page.File.Path | replaceRE `\\` "/" }}" title="View and edit this file on GitHub" target="_blank" rel="noopener">View on GitHub</a>
|
||||
<h1 class="bd-title" id="content">{{ .Title | markdownify }}</h1>
|
||||
</div>
|
||||
<p class="bd-lead">{{ .Page.Params.Description | markdownify }}</p>
|
||||
{{ partial "ads" . }}
|
||||
<main class="bd-main order-1">
|
||||
<div class="bd-intro pl-lg-4">
|
||||
<div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
|
||||
<a class="btn btn-sm btn-bd-light mb-2 mb-md-0" href="{{ .Site.Params.repo }}/blob/main/site/content/{{ .Page.File.Path | replaceRE `\\` "/" }}" title="View and edit this file on GitHub" target="_blank" rel="noopener">View on GitHub</a>
|
||||
<h1 class="bd-title" id="content">{{ .Title | markdownify }}</h1>
|
||||
</div>
|
||||
<p class="bd-lead">{{ .Page.Params.Description | markdownify }}</p>
|
||||
{{ partial "ads" . }}
|
||||
</div>
|
||||
|
||||
{{ if (eq .Page.Params.toc true) }}
|
||||
<div class="bd-toc mt-4 mb-5 my-md-0 pl-xl-3 mb-lg-5 text-muted">
|
||||
<strong class="d-block h6 my-2 pb-2 border-bottom">On this page</strong>
|
||||
{{ .TableOfContents }}
|
||||
{{ if (eq .Page.Params.toc true) }}
|
||||
<div class="bd-toc mt-4 mb-5 my-md-0 pl-xl-3 mb-lg-5 text-muted">
|
||||
<strong class="d-block h6 my-2 pb-2 border-bottom">On this page</strong>
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="bd-content pl-lg-4">
|
||||
{{ if .Page.Params.sections }}
|
||||
<div class="row g-3">
|
||||
{{ range .Page.Params.sections }}
|
||||
<div class="col-md-6">
|
||||
<a class="d-block text-decoration-none" href="../{{ urlize .title }}/">
|
||||
<strong class="d-block h5 mb-0">{{ .title }}</strong>
|
||||
<span class="text-secondary">{{ .description }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="bd-content pl-lg-4">
|
||||
{{ if .Page.Params.sections }}
|
||||
<div class="row g-3">
|
||||
{{ range .Page.Params.sections }}
|
||||
<div class="col-md-6">
|
||||
<a class="d-block text-decoration-none" href="../{{ urlize .title }}/">
|
||||
<strong class="d-block h5 mb-0">{{ .title }}</strong>
|
||||
<span class="text-secondary">{{ .description }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
{{ partial "footer" . }}
|
||||
{{ partial "scripts" . }}
|
||||
|
||||
{{ range .Page.Params.extra_js -}}
|
||||
<script{{ with .async }} async{{ end }} src="{{ .src }}"></script>
|
||||
{{- end -}}
|
||||
</body>
|
||||
</html>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ define "footer" }}
|
||||
{{ range .Page.Params.extra_js -}}
|
||||
<script{{ with .async }} async{{ end }} src="{{ .src }}"></script>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
@ -1,21 +1,8 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{{ partial "header" . }}
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "skippy" . }}
|
||||
{{ define "main" }}
|
||||
<main>
|
||||
{{ partial "home/masthead" . }}
|
||||
{{ partial "home/masthead-followup" . }}
|
||||
</main>
|
||||
|
||||
{{ partial "docs-navbar" . }}
|
||||
|
||||
<main>
|
||||
{{ partial "home/masthead" . }}
|
||||
{{ partial "home/masthead-followup" . }}
|
||||
</main>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ partial "footer" . }}
|
||||
{{ partial "scripts" . }}
|
||||
</body>
|
||||
</html>
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
|
@ -1,54 +1,41 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{{ partial "header" . }}
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "skippy" . }}
|
||||
|
||||
{{ partial "docs-navbar" . }}
|
||||
|
||||
<header class="py-5 border-bottom">
|
||||
<div class="container pt-md-1 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" }}
|
||||
<div class="d-flex flex-column flex-sm-row">
|
||||
<a href="{{ .Site.Params.download.dist_examples }}" class="btn btn-lg btn-bd-primary" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download Examples');">Download examples</a>
|
||||
<a href="{{ .Site.Params.download.source }}" class="btn btn-lg btn-outline-secondary mt-3 mt-sm-0 ml-sm-3" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download');">Download source code</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "ads" . }}
|
||||
{{ define "main" }}
|
||||
<header class="py-5 border-bottom">
|
||||
<div class="container pt-md-1 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" }}
|
||||
<div class="d-flex flex-column flex-sm-row">
|
||||
<a href="{{ .Site.Params.download.dist_examples }}" class="btn btn-lg btn-bd-primary" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download Examples');">Download examples</a>
|
||||
<a href="{{ .Site.Params.download.source }}" class="btn btn-lg btn-outline-secondary mt-3 mt-sm-0 ml-sm-3" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download');">Download source code</a>
|
||||
</div>
|
||||
</header>
|
||||
{{ end }}
|
||||
{{ partial "ads" . }}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="bd-content order-1 py-5" id="content">
|
||||
<div class="container">
|
||||
{{ .Content }}
|
||||
<main class="bd-content order-1 py-5" id="content">
|
||||
<div class="container">
|
||||
{{ .Content }}
|
||||
|
||||
{{ if eq .Title "Examples" }}
|
||||
<hr class="my-5">
|
||||
<div class="container">
|
||||
<div class="text-center">
|
||||
<div class="masthead-followup-icon d-inline-block mb-2 text-white bg-danger">
|
||||
{{ partial "icons/droplet-fill.svg" (dict "width" "32" "height" "32") }}
|
||||
</div>
|
||||
<h2 class="display-6 fw-normal">Go further with Bootstrap Themes</h2>
|
||||
<p class="col-md-10 col-lg-8 mx-auto lead">
|
||||
Need something more than these examples? Take Bootstrap to the next level with premium themes from the <a href="{{ .Site.Params.themes }}">official Bootstrap Themes marketplace</a>. They’re built as their own extended frameworks, rich with new components and plugins, documentation, and powerful build tools.
|
||||
</p>
|
||||
<a href="{{ .Site.Params.themes }}" class="btn btn-lg btn-outline-primary mb-3">Browse themes</a>
|
||||
{{ if eq .Title "Examples" }}
|
||||
<hr class="my-5">
|
||||
<div class="container">
|
||||
<div class="text-center">
|
||||
<div class="masthead-followup-icon d-inline-block mb-2 text-white bg-danger">
|
||||
{{ partial "icons/droplet-fill.svg" (dict "width" "32" "height" "32") }}
|
||||
</div>
|
||||
<img class="d-block img-fluid mt-3 mx-auto" srcset="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes-collage.png,
|
||||
/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes-collage@2x.png 2x"
|
||||
<h2 class="display-6 fw-normal">Go further with Bootstrap Themes</h2>
|
||||
<p class="col-md-10 col-lg-8 mx-auto lead">
|
||||
Need something more than these examples? Take Bootstrap to the next level with premium themes from the <a href="{{ .Site.Params.themes }}">official Bootstrap Themes marketplace</a>. They’re built as their own extended frameworks, rich with new components and plugins, documentation, and powerful build tools.
|
||||
</p>
|
||||
<a href="{{ .Site.Params.themes }}" class="btn btn-lg btn-outline-primary mb-3">Browse themes</a>
|
||||
</div>
|
||||
<img class="d-block img-fluid mt-3 mx-auto" srcset="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes-collage.png,
|
||||
/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes-collage@2x.png 2x"
|
||||
src="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes-collage.png"
|
||||
alt="Bootstrap Themes" width="1150" height="320" loading="lazy">
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ partial "footer" . }}
|
||||
{{ partial "scripts" . }}
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user