Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'site/layouts')
-rw-r--r--site/layouts/_default/docs.html34
-rw-r--r--site/layouts/_default/examples.html52
-rw-r--r--site/layouts/_default/home.html19
-rw-r--r--site/layouts/_default/single.html29
-rw-r--r--site/layouts/alias.html11
-rw-r--r--site/layouts/partials/ads.html1
-rw-r--r--site/layouts/partials/analytics.html6
-rw-r--r--site/layouts/partials/callout-danger-async-methods.md5
-rw-r--r--site/layouts/partials/callout-info-mediaqueries-breakpoints.md1
-rw-r--r--site/layouts/partials/callout-info-prefersreducedmotion.md1
-rw-r--r--site/layouts/partials/callout-warning-color-assistive-technologies.md3
-rw-r--r--site/layouts/partials/docs-navbar.html71
-rw-r--r--site/layouts/partials/docs-sidebar.html43
-rw-r--r--site/layouts/partials/favicons.html9
-rw-r--r--site/layouts/partials/footer.html12
-rw-r--r--site/layouts/partials/header.html17
-rw-r--r--site/layouts/partials/home/masthead-followup.html46
-rw-r--r--site/layouts/partials/home/masthead.html30
-rw-r--r--site/layouts/partials/icons/bootstrap-stack.svg1
-rw-r--r--site/layouts/partials/icons/bootstrap.svg1
-rw-r--r--site/layouts/partials/icons/download.svg1
-rw-r--r--site/layouts/partials/icons/github.svg1
-rw-r--r--site/layouts/partials/icons/import.svg1
-rw-r--r--site/layouts/partials/icons/lightning.svg1
-rw-r--r--site/layouts/partials/icons/menu.svg1
-rw-r--r--site/layouts/partials/icons/opencollective.svg1
-rw-r--r--site/layouts/partials/icons/slack.svg1
-rw-r--r--site/layouts/partials/icons/twitter.svg1
-rw-r--r--site/layouts/partials/scripts.html19
-rw-r--r--site/layouts/partials/skippy.html3
-rw-r--r--site/layouts/partials/social.html18
-rw-r--r--site/layouts/partials/stylesheet.html16
-rw-r--r--site/layouts/robots.txt8
-rw-r--r--site/layouts/shortcodes/bugify.html40
-rw-r--r--site/layouts/shortcodes/callout.html10
-rw-r--r--site/layouts/shortcodes/example.html53
-rw-r--r--site/layouts/shortcodes/list-examples.html19
-rw-r--r--site/layouts/shortcodes/list-versions.html20
-rw-r--r--site/layouts/shortcodes/markdown.html1
-rw-r--r--site/layouts/shortcodes/partial.html1
-rw-r--r--site/layouts/shortcodes/placeholder.html30
-rw-r--r--site/layouts/shortcodes/year.html5
-rw-r--r--site/layouts/sitemap.xml9
43 files changed, 652 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>
diff --git a/site/layouts/alias.html b/site/layouts/alias.html
new file mode 100644
index 0000000000..4c4b4d87dd
--- /dev/null
+++ b/site/layouts/alias.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>{{ .Permalink }}</title>
+ <link rel="canonical" href="{{ .Permalink }}">
+ <meta name="robots" content="noindex">
+ <meta http-equiv="refresh" content="0; url={{ .Permalink }}">
+ </head>
+</html>
diff --git a/site/layouts/partials/ads.html b/site/layouts/partials/ads.html
new file mode 100644
index 0000000000..bbb9671417
--- /dev/null
+++ b/site/layouts/partials/ads.html
@@ -0,0 +1 @@
+<script async src="https://cdn.carbonads.com/carbon.js?serve=CKYIKKJL&placement=getbootstrapcom" id="_carbonads_js"></script>
diff --git a/site/layouts/partials/analytics.html b/site/layouts/partials/analytics.html
new file mode 100644
index 0000000000..eeb57f9039
--- /dev/null
+++ b/site/layouts/partials/analytics.html
@@ -0,0 +1,6 @@
+<script>
+ window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
+ ga('create', 'UA-146052-10', 'getbootstrap.com');
+ ga('send', 'pageview');
+</script>
+<script async src="https://www.google-analytics.com/analytics.js"></script>
diff --git a/site/layouts/partials/callout-danger-async-methods.md b/site/layouts/partials/callout-danger-async-methods.md
new file mode 100644
index 0000000000..4ac5b27b39
--- /dev/null
+++ b/site/layouts/partials/callout-danger-async-methods.md
@@ -0,0 +1,5 @@
+#### Asynchronous methods and transitions
+
+All API methods are **asynchronous** and start a **transition**. They return to the caller as soon as the transition is started but **before it ends**. In addition, a method call on a **transitioning component will be ignored**.
+
+[See our JavaScript documentation for more information](/docs/{{ .Site.Params.docs_version }}/getting-started/javascript/).
diff --git a/site/layouts/partials/callout-info-mediaqueries-breakpoints.md b/site/layouts/partials/callout-info-mediaqueries-breakpoints.md
new file mode 100644
index 0000000000..e3660e462a
--- /dev/null
+++ b/site/layouts/partials/callout-info-mediaqueries-breakpoints.md
@@ -0,0 +1 @@
+Note that since browsers do not currently support [range context queries](https://www.w3.org/TR/mediaqueries-4/#range-context), we work around the limitations of [`min-` and `max-` prefixes](https://www.w3.org/TR/mediaqueries-4/#mq-min-max) and viewports with fractional widths (which can occur under certain conditions on high-dpi devices, for instance) by using values with higher precision for these comparisons.
diff --git a/site/layouts/partials/callout-info-prefersreducedmotion.md b/site/layouts/partials/callout-info-prefersreducedmotion.md
new file mode 100644
index 0000000000..d258fbe482
--- /dev/null
+++ b/site/layouts/partials/callout-info-prefersreducedmotion.md
@@ -0,0 +1 @@
+The animation effect of this component is dependent on the `prefers-reduced-motion` media query. See the [reduced motion section of our accessibility documentation](/docs/{{ .Site.Params.docs_version }}/getting-started/accessibility/#reduced-motion).
diff --git a/site/layouts/partials/callout-warning-color-assistive-technologies.md b/site/layouts/partials/callout-warning-color-assistive-technologies.md
new file mode 100644
index 0000000000..f0c2e9de53
--- /dev/null
+++ b/site/layouts/partials/callout-warning-color-assistive-technologies.md
@@ -0,0 +1,3 @@
+##### Conveying meaning to assistive technologies
+
+Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the `.sr-only` class.
diff --git a/site/layouts/partials/docs-navbar.html b/site/layouts/partials/docs-navbar.html
new file mode 100644
index 0000000000..4e340ec457
--- /dev/null
+++ b/site/layouts/partials/docs-navbar.html
@@ -0,0 +1,71 @@
+<header class="navbar navbar-expand navbar-dark flex-column flex-md-row bd-navbar">
+ <a class="navbar-brand mr-0 mr-md-2" href="/" aria-label="Bootstrap">
+ {{ partial "icons/bootstrap.svg" (dict "class" "d-block" "width" "36" "height" "36") }}
+ </a>
+
+ <div class="navbar-nav-scroll">
+ <ul class="navbar-nav bd-navbar-nav flex-row">
+ <li class="nav-item">
+ <a class="nav-link{{ if .IsHome }} active{{ end }}" href="/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Bootstrap');">Home</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link{{ if eq .Page.Layout "docs" }} active{{ end }}" href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Docs');">Documentation</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link{{ if eq .Page.Title "Examples" }} active{{ end }}" href="/docs/{{ .Site.Params.docs_version }}/examples/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Examples');">Examples</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" href="{{ .Site.Params.themes }}/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Themes');" target="_blank" rel="noopener">Themes</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" href="{{ .Site.Params.expo }}/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Expo');" target="_blank" rel="noopener">Expo</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" href="{{ .Site.Params.blog }}/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Blog');" target="_blank" rel="noopener">Blog</a>
+ </li>
+ </ul>
+ </div>
+
+ <ul class="navbar-nav flex-row ml-md-auto d-none d-md-flex">
+ <li class="nav-item dropdown">
+ <a class="nav-item nav-link dropdown-toggle mr-md-2" href="#" id="bd-versions" data-toggle="dropdown" aria-expanded="false">
+ v{{ .Site.Params.docs_version }}
+ </a>
+ <div class="dropdown-menu dropdown-menu-right" aria-labelledby="bd-versions">
+ <a class="dropdown-item active" href="/docs/{{ .Site.Params.docs_version }}/">Latest (4.3.x)</a>
+ <a class="dropdown-item" href="https://getbootstrap.com/docs/4.2/">v4.2.1</a>
+ <a class="dropdown-item" href="https://getbootstrap.com/docs/4.0/">v4.0.0</a>
+ <div class="dropdown-divider"></div>
+ <a class="dropdown-item" href="https://v4-alpha.getbootstrap.com/">v4 Alpha 6</a>
+ <a class="dropdown-item" href="https://getbootstrap.com/docs/3.4/">v3.4.1</a>
+ <a class="dropdown-item" href="https://getbootstrap.com/docs/3.3/">v3.3.7</a>
+ <a class="dropdown-item" href="https://getbootstrap.com/2.3.2/">v2.3.2</a>
+ <div class="dropdown-divider"></div>
+ <a class="dropdown-item" href="/docs/versions/">All versions</a>
+ </div>
+ </li>
+
+ <li class="nav-item">
+ <a class="nav-link p-2" href="{{ .Site.Params.repo }}" target="_blank" rel="noopener" aria-label="GitHub">
+ {{ partial "icons/github.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
+ </a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link p-2" href="https://twitter.com/{{ .Site.Params.twitter }}" target="_blank" rel="noopener" aria-label="Twitter">
+ {{ partial "icons/twitter.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
+ </a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link p-2" href="{{ .Site.Params.slack }}/" target="_blank" rel="noopener" aria-label="Slack">
+ {{ partial "icons/slack.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
+ </a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link p-2" href="{{ .Site.Params.opencollective }}/" target="_blank" rel="noopener" aria-label="Open Collective">
+ {{ partial "icons/opencollective.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
+ </a>
+ </li>
+ </ul>
+
+ <a class="btn btn-bd-download d-none d-lg-inline-block mb-3 mb-md-0 ml-md-3" href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/">Download</a>
+</header>
diff --git a/site/layouts/partials/docs-sidebar.html b/site/layouts/partials/docs-sidebar.html
new file mode 100644
index 0000000000..789b678a15
--- /dev/null
+++ b/site/layouts/partials/docs-sidebar.html
@@ -0,0 +1,43 @@
+<form class="bd-search d-flex align-items-center">
+ <input type="search" class="form-control" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off" data-docs-version="{{ .Site.Params.docs_version }}">
+ <button class="btn btn-link bd-search-docs-toggle d-md-none p-0 ml-3" type="button" data-toggle="collapse" data-target="#bd-docs-nav" aria-controls="bd-docs-nav" aria-expanded="false" aria-label="Toggle docs navigation">
+ {{ partial "icons/menu.svg" (dict "width" "30" "height" "30") }}
+ </button>
+</form>
+
+<nav class="collapse bd-links" id="bd-docs-nav" aria-label="Main navigation">
+ {{- $url := split .URL "/" -}}
+ {{- $page_slug := index $url (sub (len $url) 2) -}}
+
+ {{- range $group := .Site.Data.nav -}}
+ {{- $link := $group.title -}}
+ {{- $link_slug := $link | urlize -}}
+
+ {{- if $group.pages -}}
+ {{- $link = index $group.pages 0 -}}
+ {{- $link_slug = $link.title | urlize -}}
+ {{- end -}}
+
+ {{- $group_slug := $group.title | urlize -}}
+ {{- $active_group := eq $.Page.Params.group $group_slug }}
+
+ <div class="bd-toc-item{{ if $active_group }} active{{ end }}">
+ <a class="bd-toc-link" href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ if $group.pages }}{{ $link_slug }}/{{ end }}">
+ {{- $group.title -}}
+ </a>
+
+ {{- if and $active_group $group.pages }}
+ <ul class="nav bd-sidenav">
+ {{- range $doc := $group.pages -}}
+ {{- $doc_slug := $doc.title | urlize }}
+ <li{{ if and $active_group (eq $page_slug $doc_slug) }} class="active bd-sidenav-active"{{ end }}>
+ <a href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ $doc_slug }}/">
+ {{- $doc.title -}}
+ </a>
+ </li>
+ {{- end }}
+ </ul>
+ {{- end }}
+ </div>
+ {{- end }}
+</nav>
diff --git a/site/layouts/partials/favicons.html b/site/layouts/partials/favicons.html
new file mode 100644
index 0000000000..61733e32db
--- /dev/null
+++ b/site/layouts/partials/favicons.html
@@ -0,0 +1,9 @@
+{{ "<!-- Favicons -->" | safeHTML }}
+<link rel="apple-touch-icon" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/apple-touch-icon.png" sizes="180x180">
+<link rel="icon" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
+<link rel="icon" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
+<link rel="manifest" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/manifest.json">
+<link rel="mask-icon" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/safari-pinned-tab.svg" color="#563d7c">
+<link rel="icon" href="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/favicon.ico">
+<meta name="msapplication-config" content="/docs/{{ .Site.Params.docs_version }}/assets/img/favicons/browserconfig.xml">
+<meta name="theme-color" content="#563d7c">
diff --git a/site/layouts/partials/footer.html b/site/layouts/partials/footer.html
new file mode 100644
index 0000000000..29e80d30f6
--- /dev/null
+++ b/site/layouts/partials/footer.html
@@ -0,0 +1,12 @@
+<footer class="bd-footer text-muted">
+ <div class="container-fluid p-3 p-md-5">
+ <ul class="bd-footer-links">
+ <li><a href="{{ .Site.Params.repo }}">GitHub</a></li>
+ <li><a href="https://twitter.com/{{ .Site.Params.twitter }}">Twitter</a></li>
+ <li><a href="/docs/{{ .Site.Params.docs_version }}/examples/">Examples</a></li>
+ <li><a href="/docs/{{ .Site.Params.docs_version }}/about/overview/">About</a></li>
+ </ul>
+ <p>Designed and built with all the love in the world by the <a href="/docs/{{ .Site.Params.docs_version }}/about/team/">Bootstrap team</a> with the help of <a href="{{ .Site.Params.repo }}/graphs/contributors">our contributors</a>.</p>
+ <p>Currently v{{ .Site.Params.current_version }}. Code licensed <a href="{{ .Site.Params.repo }}/blob/master/LICENSE" target="_blank" rel="license noopener">MIT</a>, docs <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank" rel="license noopener">CC BY 3.0</a>.</p>
+ </div>
+</footer>
diff --git a/site/layouts/partials/header.html b/site/layouts/partials/header.html
new file mode 100644
index 0000000000..c748fd82ee
--- /dev/null
+++ b/site/layouts/partials/header.html
@@ -0,0 +1,17 @@
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="description" content="{{ index .Page.Params "description" | default .Site.Params.description | markdownify }}">
+<meta name="author" content="{{ .Site.Params.authors }}">
+<meta name="generator" content="Hugo {{ .Hugo.Version }}">
+
+<meta name="docsearch:language" content="en">
+<meta name="docsearch:version" content="{{ .Site.Params.docs_version }}">
+
+<title>{{ if .IsHome }}{{ .Site.Title | markdownify }} · {{ .Site.Params.description | markdownify }}{{ else }}{{ .Title | markdownify }} · {{ .Site.Title | markdownify }}{{ end }}</title>
+
+<link rel="canonical" href="{{ .Permalink }}">
+
+{{ partial "stylesheet" . }}
+{{ partial "favicons" . }}
+{{ partial "social" . }}
+{{ partial "analytics" . }}
diff --git a/site/layouts/partials/home/masthead-followup.html b/site/layouts/partials/home/masthead-followup.html
new file mode 100644
index 0000000000..c852850658
--- /dev/null
+++ b/site/layouts/partials/home/masthead-followup.html
@@ -0,0 +1,46 @@
+<div class="masthead-followup row m-0 border border-white">
+ <div class="col-12 col-md-4 p-3 p-md-5 bg-light border border-white">
+ {{ "<!-- Icon by Bytesize https://github.com/danklammer/bytesize-icons -->" | safeHTML }}
+ {{ partial "icons/import.svg" (dict "class" "text-primary mb-2" "width" "32" "height" "32") }}
+ <h3>Installation</h3>
+ <p>Include Bootstrap’s source Sass and JavaScript files via npm, Composer or Meteor. Package managed installs don’t include documentation, but do include our build system and readme.</p>
+
+ {{ highlight "npm install bootstrap" "sh" "" }}
+
+ {{ highlight (printf ("gem install bootstrap -v %s") .Site.Params.current_ruby_version) "sh" "" }}
+
+ <hr class="half-rule">
+ <a class="btn btn-outline-primary" href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/">Read installation docs</a>
+ </div>
+
+ <div class="col-12 col-md-4 p-3 p-md-5 bg-light border border-white">
+ {{ "<!-- Icon by Bytesize https://github.com/danklammer/bytesize-icons -->" | safeHTML }}
+ {{ partial "icons/download.svg" (dict "class" "text-primary mb-2" "width" "32" "height" "32") }}
+ <h3>BootstrapCDN</h3>
+ <p>When you only need to include Bootstrap’s compiled CSS or JS, you can use <a href="https://www.bootstrapcdn.com/">BootstrapCDN</a>.</p>
+
+ <h5>CSS only</h5>
+ {{ highlight (printf (`<link rel="stylesheet" href="%s" integrity="%s" crossorigin="anonymous">`) .Site.Params.cdn.css .Site.Params.cdn.css_hash) "html" "" }}
+
+ <h5>JS and Popper.js</h5>
+ {{ highlight (printf (`<script src="%s" integrity="%s" crossorigin="anonymous"></script>
+<script src="%s" integrity="%s" crossorigin="anonymous"></script>
+`) .Site.Params.cdn.popper .Site.Params.cdn.popper_hash .Site.Params.cdn.js .Site.Params.cdn.js_hash) "html" "" }}
+ <hr class="half-rule">
+ <a class="btn btn-outline-primary" href="/docs/{{ .Site.Params.docs_version }}/layout/overview/">Explore the docs</a>
+ </div>
+
+ <div class="col-12 col-md-4 p-3 p-md-5 bg-light border border-white">
+ {{ "<!-- Icon by Bytesize https://github.com/danklammer/bytesize-icons -->" | safeHTML }}
+ {{ partial "icons/lightning.svg" (dict "class" "text-primary mb-2" "width" "32" "height" "32") }}
+ <h3>Official Themes</h3>
+ <p>
+ Take Bootstrap 4 to the next level with official premium themes—toolkits built on Bootstrap with new components and plugins, docs, and build tools.
+ </p>
+ <img class="img-fluid mt-3 mx-auto" srcset="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes.png,
+ /docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes@2x.png 2x"
+ src="/docs/{{ .Site.Params.docs_version }}/assets/img/bootstrap-themes.png" alt="Bootstrap Themes" width="500" height="200">
+ <hr class="half-rule">
+ <a href="{{ .Site.Params.themes }}/" class="btn btn-outline-primary">Browse themes</a>
+ </div>
+</div>
diff --git a/site/layouts/partials/home/masthead.html b/site/layouts/partials/home/masthead.html
new file mode 100644
index 0000000000..4069d6378f
--- /dev/null
+++ b/site/layouts/partials/home/masthead.html
@@ -0,0 +1,30 @@
+<main class="bd-masthead" id="content" role="main">
+ <div class="container">
+ <div class="row align-items-center">
+ <div class="col-6 mx-auto col-md-6 order-md-2">
+ {{ partial "icons/bootstrap-stack.svg" (dict "class" "img-fluid mb-3 mb-md-0" "width" "512" "height" "430") }}
+ </div>
+ <div class="col-md-6 order-md-1 text-center text-md-left pr-md-5">
+ <h1 class="mb-3 bd-text-purple-bright">Bootstrap</h1>
+ <p class="lead">
+ Build responsive, mobile-first projects on the web with the world’s most popular front-end component library.
+ </p>
+ <p class="lead mb-4">
+ Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with our Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful plugins built with VanillaJS.
+ </p>
+ <div class="row mx-n2">
+ <div class="col-md px-2">
+ <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/" class="btn btn-lg btn-bd-primary w-100 mb-3" onclick="ga('send', 'event', 'Jumbotron actions', 'Get started', 'Get started');">Get started</a>
+ </div>
+ <div class="col-md px-2">
+ <a href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/" class="btn btn-lg btn-outline-secondary w-100 mb-3" onclick="ga('send', 'event', 'Jumbotron actions', 'Download', 'Download {{ .Site.Params.current_version }}');">Download</a>
+ </div>
+ </div>
+ <p class="text-muted mb-0">
+ Currently v{{ .Site.Params.current_version }}
+ </p>
+ </div>
+ </div>
+ {{ partial "ads.html" . }}
+ </div>
+</main>
diff --git a/site/layouts/partials/icons/bootstrap-stack.svg b/site/layouts/partials/icons/bootstrap-stack.svg
new file mode 100644
index 0000000000..1e3913042e
--- /dev/null
+++ b/site/layouts/partials/icons/bootstrap-stack.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 1024 860" role="img"><title>Bootstrap</title><defs><linearGradient id="c" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#5C24AE"/><stop offset="100%" stop-color="#30135A"/></linearGradient><path id="b" d="M355.967 242.807l-322 216.395c-44.275 29.754-44.275 78.443 0 108.197l322 216.395c44.275 29.754 116.725 29.754 161 0l322-216.395c44.275-29.754 44.275-78.443 0-108.197l-322-216.395c-44.275-29.754-116.725-29.754-161 0z"/><filter id="a" width="108%" height="112%" x="-4%" y="-4.3%" filterUnits="objectBoundingBox"><feOffset dy="10" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="10"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/></filter><linearGradient id="f" x1="50%" x2="50%" y1="-17.303%" y2="100%"><stop offset="0%" stop-color="#7331D4"/><stop offset="100%" stop-color="#461B84"/></linearGradient><path id="e" d="M355.967 132.807l-322 216.395c-44.275 29.754-44.275 78.443 0 108.197l322 216.395c44.275 29.754 116.725 29.754 161 0l322-216.395c44.275-29.754 44.275-78.443 0-108.197l-322-216.395c-44.275-29.754-116.725-29.754-161 0z"/><filter id="d" width="108%" height="112%" x="-4%" y="-4.3%" filterUnits="objectBoundingBox"><feOffset dy="10" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="10"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/></filter><linearGradient id="i" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#905BDD"/><stop offset="100%" stop-color="#5521A0"/></linearGradient><path id="h" d="M355.967 22.807l-322 216.395c-44.275 29.754-44.275 78.443 0 108.197l322 216.395c44.275 29.754 116.725 29.754 161 0l322-216.395c44.275-29.754 44.275-78.443 0-108.197l-322-216.395c-44.275-29.754-116.725-29.754-161 0z"/><filter id="g" width="108%" height="112%" x="-4%" y="-4.3%" filterUnits="objectBoundingBox"><feOffset dy="10" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="10"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/></filter></defs><g fill="none"><g transform="translate(75 23)"><use fill="#000" filter="url(#a)" xlink:href="#b"/><use fill="url(#c)" xlink:href="#b"/></g><g transform="translate(75 23)"><use fill="#000" filter="url(#d)" xlink:href="#e"/><use fill="url(#f)" xlink:href="#e"/></g><g transform="translate(75 23)"><use fill="#000" filter="url(#g)" xlink:href="#h"/><use fill="url(#i)" xlink:href="#h"/></g><path fill="#FFF" d="M558.273 447.667L308.036 279.5l97.982-65.847c42.83-28.784 96.789-31.483 134.245-6.311 26.044 17.502 31.214 46.615 11.444 65.724l1.389.934c38.324-19.932 84.107-18.527 117.396 3.845 44.046 29.6 38.671 68.419-14.561 104.193l-97.658 65.629zM447.112 331.01l49.942-33.562c36.935-24.822 42.31-48.249 15.224-66.451-24.798-16.665-55.49-14.453-85.851 5.95l-59.641 40.081 80.326 53.982zm176.532 35.663c37.63-25.289 42.136-48.832 13.203-68.276-28.932-19.444-64.163-15.614-104.042 11.186l-58.789 39.508 87.92 59.084 61.708-41.502z"/></g></svg> \ No newline at end of file
diff --git a/site/layouts/partials/icons/bootstrap.svg b/site/layouts/partials/icons/bootstrap.svg
new file mode 100644
index 0000000000..0277389a6b
--- /dev/null
+++ b/site/layouts/partials/icons/bootstrap.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 612 612" role="img"><title>Bootstrap</title><path fill="currentColor" d="M510 8a94.3 94.3 0 0 1 94 94v408a94.3 94.3 0 0 1-94 94H102a94.3 94.3 0 0 1-94-94V102a94.3 94.3 0 0 1 94-94h408m0-8H102C45.9 0 0 45.9 0 102v408c0 56.1 45.9 102 102 102h408c56.1 0 102-45.9 102-102V102C612 45.9 566.1 0 510 0z"/><path fill="currentColor" d="M196.77 471.5V154.43h124.15c54.27 0 91 31.64 91 79.1 0 33-24.17 63.72-54.71 69.21v1.76c43.07 5.49 70.75 35.82 70.75 78 0 55.81-40 89-107.45 89zm39.55-180.4h63.28c46.8 0 72.29-18.68 72.29-53 0-31.42-21.53-48.78-60-48.78h-75.57zm78.22 145.46c47.68 0 72.73-19.34 72.73-56s-25.93-55.37-76.46-55.37h-74.49v111.4z"/></svg> \ No newline at end of file
diff --git a/site/layouts/partials/icons/download.svg b/site/layouts/partials/icons/download.svg
new file mode 100644
index 0000000000..05385434de
--- /dev/null
+++ b/site/layouts/partials/icons/download.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }} fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true"{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 32 32"><title>Download</title><path d="M9 22c-9 1-8-10 0-9C6 2 23 2 22 10c10-3 10 13 1 12m-12 4l5 4 5-4m-5-10v14"/></svg> \ No newline at end of file
diff --git a/site/layouts/partials/icons/github.svg b/site/layouts/partials/icons/github.svg
new file mode 100644
index 0000000000..cacd860c28
--- /dev/null
+++ b/site/layouts/partials/icons/github.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 512 499.36" role="img"><title>GitHub</title><path fill="currentColor" fill-rule="evenodd" d="M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z"/></svg> \ No newline at end of file
diff --git a/site/layouts/partials/icons/import.svg b/site/layouts/partials/icons/import.svg
new file mode 100644
index 0000000000..bc38ee57cb
--- /dev/null
+++ b/site/layouts/partials/icons/import.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }} fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true"{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 32 32"><title>Import</title><path d="M28 22v8H4v-8M16 4v20m-8-8l8 8 8-8"/></svg> \ No newline at end of file
diff --git a/site/layouts/partials/icons/lightning.svg b/site/layouts/partials/icons/lightning.svg
new file mode 100644
index 0000000000..cd9138ad83
--- /dev/null
+++ b/site/layouts/partials/icons/lightning.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }} fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true"{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 32 32"><title>Lightning</title><path d="M18 13l8-11L8 13l6 6-8 11 18-11z"/></svg> \ No newline at end of file
diff --git a/site/layouts/partials/icons/menu.svg b/site/layouts/partials/icons/menu.svg
new file mode 100644
index 0000000000..78c43d85c9
--- /dev/null
+++ b/site/layouts/partials/icons/menu.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 30 30" role="img"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"/></svg> \ No newline at end of file
diff --git a/site/layouts/partials/icons/opencollective.svg b/site/layouts/partials/icons/opencollective.svg
new file mode 100644
index 0000000000..4a477a4978
--- /dev/null
+++ b/site/layouts/partials/icons/opencollective.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }} fill="currentColor" fill-rule="evenodd"{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 40 41" role="img"><title>Open Collective</title><path fill-opacity=".4" d="M32.8 21c0 2.4-.8 4.9-2 6.9l5.1 5.1c2.5-3.4 4.1-7.6 4.1-12 0-4.6-1.6-8.8-4-12.2L30.7 14c1.2 2 2 4.3 2 7z"/><path d="M20 33.7a12.8 12.8 0 0 1 0-25.6c2.6 0 5 .7 7 2.1L32 5a20 20 0 1 0 .1 31.9l-5-5.2a13 13 0 0 1-7 2z"/></svg> \ No newline at end of file
diff --git a/site/layouts/partials/icons/slack.svg b/site/layouts/partials/icons/slack.svg
new file mode 100644
index 0000000000..67b9c7f485
--- /dev/null
+++ b/site/layouts/partials/icons/slack.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 512 512" role="img"><title>Slack</title><path fill="currentColor" d="M210.787 234.832l68.31-22.883 22.1 65.977-68.309 22.882z"/><path fill="currentColor" d="M490.54 185.6C437.7 9.59 361.6-31.34 185.6 21.46S-31.3 150.4 21.46 326.4 150.4 543.3 326.4 490.54 543.34 361.6 490.54 185.6zM401.7 299.8l-33.15 11.05 11.46 34.38c4.5 13.92-2.87 29.06-16.78 33.56-2.87.82-6.14 1.64-9 1.23a27.32 27.32 0 0 1-24.56-18l-11.46-34.38-68.36 22.92 11.46 34.38c4.5 13.92-2.87 29.06-16.78 33.56-2.87.82-6.14 1.64-9 1.23a27.32 27.32 0 0 1-24.56-18l-11.46-34.43-33.15 11.05c-2.87.82-6.14 1.64-9 1.23a27.32 27.32 0 0 1-24.56-18c-4.5-13.92 2.87-29.06 16.78-33.56l33.12-11.03-22.1-65.9-33.15 11.05c-2.87.82-6.14 1.64-9 1.23a27.32 27.32 0 0 1-24.56-18c-4.48-13.93 2.89-29.07 16.81-33.58l33.15-11.05-11.46-34.38c-4.5-13.92 2.87-29.06 16.78-33.56s29.06 2.87 33.56 16.78l11.46 34.38 68.36-22.92-11.46-34.38c-4.5-13.92 2.87-29.06 16.78-33.56s29.06 2.87 33.56 16.78l11.47 34.42 33.15-11.05c13.92-4.5 29.06 2.87 33.56 16.78s-2.87 29.06-16.78 33.56L329.7 194.6l22.1 65.9 33.15-11.05c13.92-4.5 29.06 2.87 33.56 16.78s-2.88 29.07-16.81 33.57z"/></svg> \ No newline at end of file
diff --git a/site/layouts/partials/icons/twitter.svg b/site/layouts/partials/icons/twitter.svg
new file mode 100644
index 0000000000..b102181a5f
--- /dev/null
+++ b/site/layouts/partials/icons/twitter.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 512 416.32" role="img"><title>Twitter</title><path fill="currentColor" d="M160.83 416.32c193.2 0 298.92-160.22 298.92-298.92 0-4.51 0-9-.2-13.52A214 214 0 0 0 512 49.38a212.93 212.93 0 0 1-60.44 16.6 105.7 105.7 0 0 0 46.3-58.19 209 209 0 0 1-66.79 25.37 105.09 105.09 0 0 0-181.73 71.91 116.12 116.12 0 0 0 2.66 24c-87.28-4.3-164.73-46.3-216.56-109.82A105.48 105.48 0 0 0 68 159.6a106.27 106.27 0 0 1-47.53-13.11v1.43a105.28 105.28 0 0 0 84.21 103.06 105.67 105.67 0 0 1-47.33 1.84 105.06 105.06 0 0 0 98.14 72.94A210.72 210.72 0 0 1 25 370.84a202.17 202.17 0 0 1-25-1.43 298.85 298.85 0 0 0 160.83 46.92"/></svg> \ No newline at end of file
diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html
new file mode 100644
index 0000000000..e2f9bc407e
--- /dev/null
+++ b/site/layouts/partials/scripts.html
@@ -0,0 +1,19 @@
+{{ 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 }}
+
+{{ if eq .Page.Layout "docs" -}}
+<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
+{{- end }}
+
+{{- if eq (getenv "HUGO_ENV") "production" -}}
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/docs.min.js"></script>
+{{- else -}}
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/vendor/anchor.min.js"></script>
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/vendor/clipboard.min.js"></script>
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/vendor/bs-custom-file-input.min.js"></script>
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/src/application.js"></script>
+ <script src="/docs/{{ .Site.Params.docs_version }}/assets/js/src/search.js"></script>
+{{- end -}}
diff --git a/site/layouts/partials/skippy.html b/site/layouts/partials/skippy.html
new file mode 100644
index 0000000000..ec7507d532
--- /dev/null
+++ b/site/layouts/partials/skippy.html
@@ -0,0 +1,3 @@
+<a class="skippy sr-only sr-only-focusable" href="#content">
+ <span class="skippy-text">Skip to main content</span>
+</a>
diff --git a/site/layouts/partials/social.html b/site/layouts/partials/social.html
new file mode 100644
index 0000000000..151a629945
--- /dev/null
+++ b/site/layouts/partials/social.html
@@ -0,0 +1,18 @@
+{{ "<!-- Twitter -->" | safeHTML }}
+<meta name="twitter:card" content="{{ if .IsHome }}summary_large_image{{ else }}summary{{ end }}">
+<meta name="twitter:site" content="@{{ .Site.Params.twitter }}">
+<meta name="twitter:creator" content="@{{ .Site.Params.twitter }}">
+<meta name="twitter:title" content="{{ .Title | markdownify }}">
+<meta name="twitter:description" content="{{ index .Page.Params "description" | default .Site.Params.description | markdownify }}">
+<meta name="twitter:image" content="{{ if .IsHome }}{{ .Site.BaseURL }}{{ .Site.Params.social_logo_path }}{{ else }}{{ .Site.BaseURL }}{{ .Site.Params.social_image_path }}{{ end }}">
+
+{{ "<!-- Facebook -->" | safeHTML }}
+<meta property="og:url" content="{{ .Permalink }}">
+<meta property="og:title" content="{{ .Title | markdownify }}">
+<meta property="og:description" content="{{ index .Page.Params "description" | default .Site.Params.description | markdownify }}">
+<meta property="og:type" content="website">
+<meta property="og:image" content="{{ replace .Site.BaseURL "https://" "http://" }}{{ .Site.Params.social_image_path }}">
+<meta property="og:image:secure_url" content="{{ .Site.BaseURL }}{{ .Site.Params.social_image_path }}">
+<meta property="og:image:type" content="image/png">
+<meta property="og:image:width" content="1200">
+<meta property="og:image:height" content="630">
diff --git a/site/layouts/partials/stylesheet.html b/site/layouts/partials/stylesheet.html
new file mode 100644
index 0000000000..749a3314e6
--- /dev/null
+++ b/site/layouts/partials/stylesheet.html
@@ -0,0 +1,16 @@
+{{- "<!-- Bootstrap core CSS -->" | safeHTML }}
+{{ if eq (getenv "HUGO_ENV") "production" -}}
+<link href="/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.min.css" rel="stylesheet" integrity="{{ .Site.Params.cdn.css_hash }}" crossorigin="anonymous">
+{{- else -}}
+<link href="/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.css" rel="stylesheet">
+{{- end }}
+
+{{ if (or (eq .Page.Layout "docs") (ne .Page.Layout "examples")) -}}
+{{- "<!-- Documentation extras -->" | safeHTML }}
+{{ if eq .Page.Layout "docs" -}}
+<link href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" rel="stylesheet">
+{{- end -}}
+{{- if (ne .Page.Layout "examples") }}
+<link href="/docs/{{ .Site.Params.docs_version }}/assets/css/docs.min.css" rel="stylesheet">
+{{- end -}}
+{{- end }}
diff --git a/site/layouts/robots.txt b/site/layouts/robots.txt
new file mode 100644
index 0000000000..e9d78f1aed
--- /dev/null
+++ b/site/layouts/robots.txt
@@ -0,0 +1,8 @@
+# www.robotstxt.org
+
+{{ if (eq (getenv "HUGO_ENV") "production") -}}
+# Allow crawling of all content
+{{- end }}
+User-agent: *
+Disallow:{{ if (ne (getenv "HUGO_ENV") "production") }} /{{ end }}
+Sitemap: {{ .Site.BaseURL }}/sitemap.xml
diff --git a/site/layouts/shortcodes/bugify.html b/site/layouts/shortcodes/bugify.html
new file mode 100644
index 0000000000..b064d29a5e
--- /dev/null
+++ b/site/layouts/shortcodes/bugify.html
@@ -0,0 +1,40 @@
+{{- $words := (split .Inner " ") -}}
+
+{{- range $word := $words -}}
+ {{- if (strings.Contains $word "#") -}}
+ {{- $separator := false -}}
+
+ {{- if (strings.Contains $word ",") -}}
+ {{- $separator = true -}}
+ {{- end -}}
+
+ {{- $data := split $word "#" -}}
+ {{- $bug_cat := replace (index $data 0) "\n" "" -}}
+ {{- $bug_id := replace (index $data 1) "\n" "" -}}
+ {{- $bug_id = replace $bug_id "," "" -}}
+
+ {{- if (eq $bug_cat "Bootstrap") -}}
+ <a href="https://github.com/twbs/bootstrap/issues/{{ $bug_id }}">#{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "Edge") -}}
+ <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/{{ $bug_id }}/">Edge issue #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "A11yUserVoice") -}}
+ <a href="https://microsoftaccessibility.uservoice.com/forums/307429-microsoft-accessibility-feedback/suggestions/{{ $bug_id }}">Microsoft A11y UserVoice idea #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "UserVoice") -}}
+ <a href="https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/{{ $bug_id }}">Edge UserVoice idea #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "Mozilla") -}}
+ <a href="https://bugzilla.mozilla.org/show_bug.cgi?id={{ $bug_id }}">Mozilla bug #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "Chromium") -}}
+ <a href="https://bugs.chromium.org/p/chromium/issues/detail?id={{ $bug_id }}">Chromium issue #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "WebKit") -}}
+ <a href="https://bugs.webkit.org/show_bug.cgi?id={{ $bug_id }}">WebKit bug #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "Safari") -}}
+ <a href="https://openradar.appspot.com/{{ $bug_id }}">Apple Safari Radar #{{ $bug_id }}</a>
+ {{- else if (eq $bug_cat "Normalize") -}}
+ <a href="https://github.com/necolas/normalize.css/issues/{{ $bug_id }}">Normalize #{{ $bug_id }}</a>
+ {{- end -}}
+ {{- if (eq $separator true) }}, {{ end -}}
+
+ {{- else -}}
+ {{- $word -}}
+ {{- end -}}
+{{- end -}}
diff --git a/site/layouts/shortcodes/callout.html b/site/layouts/shortcodes/callout.html
new file mode 100644
index 0000000000..007f8a8e8e
--- /dev/null
+++ b/site/layouts/shortcodes/callout.html
@@ -0,0 +1,10 @@
+{{- /*
+ Usage: `callout "type"`,
+ where type is one of info (default), danger, warning
+*/ -}}
+
+{{- $css_class := .Get 0 | default "info" -}}
+
+<div class="bd-callout bd-callout-{{ $css_class }}">
+{{ .Inner | markdownify }}
+</div>
diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html
new file mode 100644
index 0000000000..67813b70fe
--- /dev/null
+++ b/site/layouts/shortcodes/example.html
@@ -0,0 +1,53 @@
+{{- /*
+ Usage: `example [args]`
+
+ `args` are optional and can be one of the following:
+ id: the `div`'s id - default: ""
+ class: any extra class(es) to be added to the `div` - default ""
+ show_preview: if the preview should be output in the HTML - default: `true`
+ show_markup: if the markup should be output in the HTML - default: `true`
+*/ -}}
+
+{{- $show_preview := .Get "show_preview" | default true -}}
+{{- $show_markup := .Get "show_markup" | default true -}}
+{{- $input := .Inner -}}
+
+{{- if eq $show_preview true -}}
+<div{{ with .Get "id" }} id="{{ . }}"{{ end }} class="bd-example{{ with .Get "class" }} {{ . }}{{ end }}">
+ {{- $input -}}
+</div>
+{{- end -}}
+
+{{- if eq $show_markup true -}}
+ {{- $.Scratch.Set "highlight_content" $input -}}
+
+ {{- if (strings.Contains $input `<svg class="bd-placeholder-img`) -}}
+ {{- $.Scratch.Set "highlight_content" "" -}}
+ {{- $image_class := "" -}}
+
+ {{- $modified_content := replace $input `<svg class="bd-placeholder-img` `✂️<svg class="bd-placeholder-img` -}}
+ {{- $modified_content = replace $modified_content "</svg>\n" "</svg>✂️" -}}
+ {{- $modified_content = split $modified_content "✂️" -}}
+
+ {{- if (strings.Contains $input `<svg class="bd-placeholder-img `) -}}
+ {{- $image_class = replace $input "bd-placeholder-img " "bd-placeholder-img ✂️ " -}}
+ {{- $image_class = split (replace $image_class `" width="` `✂️" width="`) "✂️" -}}
+ {{- $image_class = replace (index $image_class 1) "bd-placeholder-img-lg" "" -}}
+ {{- $image_class = trim $image_class " " -}}
+ {{- end -}}
+
+ {{- range $i, $content_chunk := $modified_content -}}
+ {{- if (strings.Contains $content_chunk `<svg class="bd-placeholder-img`) -}}
+ {{- if $image_class -}}
+ {{- $.Scratch.Add "highlight_content" (printf `<img src="..." class="%s" alt="...">` $image_class) -}}
+ {{- else -}}
+ {{- $.Scratch.Add "highlight_content" `<img src="..." alt="...">` -}}
+ {{- end -}}
+ {{- else -}}
+ {{- $.Scratch.Add "highlight_content" $content_chunk -}}
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- highlight (trim ($.Scratch.Get "highlight_content") "\n") "html" "" -}}
+{{- end -}}
diff --git a/site/layouts/shortcodes/list-examples.html b/site/layouts/shortcodes/list-examples.html
new file mode 100644
index 0000000000..33b3c33c7d
--- /dev/null
+++ b/site/layouts/shortcodes/list-examples.html
@@ -0,0 +1,19 @@
+{{ range $entry := $.Site.Data.examples -}}
+ <h2>{{ $entry.category }}</h2>
+ <p>{{ $entry.description }}</p>
+
+ {{ range $i, $example := $entry.examples -}}
+ {{- $len := len $entry.examples -}}
+ {{ if (eq $i 0) }}<div class="row">{{ end }}
+ <div class="col-sm-6 col-md-4 col-xl-3 mb-3">
+ <a href="/docs/{{ $.Site.Params.docs_version }}/examples/{{ $example.name | urlize }}/">
+ <img class="img-thumbnail mb-3" srcset="/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png,
+ /docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}@2x.png 2x"
+ src="/docs/{{ $.Site.Params.docs_version }}/assets/img/examples/{{ $example.name | urlize }}.png" alt="{{ $example.name }} screenshot" width="480" height="300">
+ <h5 class="mb-1">{{ $example.name }}</h5>
+ </a>
+ <p class="text-muted">{{ $example.description }}</p>
+ </div>
+ {{ if (eq (add $i 1) $len) }}</div>{{ end }}
+ {{ end -}}
+{{ end -}}
diff --git a/site/layouts/shortcodes/list-versions.html b/site/layouts/shortcodes/list-versions.html
new file mode 100644
index 0000000000..5c7f0445a0
--- /dev/null
+++ b/site/layouts/shortcodes/list-versions.html
@@ -0,0 +1,20 @@
+<div class="row">
+ {{- range $release := (index $.Site.Data "docs-versions") }}
+ <div class="col-md">
+ <h2>{{ $release.group }}</h2>
+ <p>{{ $release.description }}</p>
+ {{- $versions := sort $release.versions "v" "desc" -}}
+ {{- range $i, $version := $versions }}
+ {{- $len := len $versions -}}
+ {{ if (eq $i 0) }}<div class="list-group">{{ end }}
+ <a class="list-group-item list-group-item-action py-2 text-primary{{ if (eq $version.v $.Site.Params.docs_version) }} d-flex justify-content-between align-items-center{{ end }}" href="{{ $release.baseurl }}/{{ $version.v }}/">
+ {{ $version.v }}
+ {{ if (eq $version.v $.Site.Params.docs_version) -}}
+ <span class="badge badge-primary">Latest</span>
+ {{- end }}
+ </a>
+ {{ if (eq (add $i 1) $len) }}</div>{{ end }}
+ {{ end -}}
+ </div>
+ {{ end -}}
+</div>
diff --git a/site/layouts/shortcodes/markdown.html b/site/layouts/shortcodes/markdown.html
new file mode 100644
index 0000000000..82107bcef9
--- /dev/null
+++ b/site/layouts/shortcodes/markdown.html
@@ -0,0 +1 @@
+{{- .Inner | markdownify -}}
diff --git a/site/layouts/shortcodes/partial.html b/site/layouts/shortcodes/partial.html
new file mode 100644
index 0000000000..c9d3496de7
--- /dev/null
+++ b/site/layouts/shortcodes/partial.html
@@ -0,0 +1 @@
+{{ partial (.Get 0) . }}
diff --git a/site/layouts/shortcodes/placeholder.html b/site/layouts/shortcodes/placeholder.html
new file mode 100644
index 0000000000..83f44aec9e
--- /dev/null
+++ b/site/layouts/shortcodes/placeholder.html
@@ -0,0 +1,30 @@
+{{- /*
+ Usage: `placeholder args`
+
+ args can be one of the following:
+ title: Used in the SVG `title` tag, default "Placeholder"
+ text: The text to show in the image - default: "width x height"
+ class: default: "bd-placeholder-img"
+ color: The text color (foreground) - default: "#dee2e6"
+ background: The background color - default: "#868e96"
+ width: default: 100%
+ height: default: 180px
+*/ -}}
+
+{{- $grays := $.Site.Data.grays -}}
+{{- $title := .Get "title" | default "Placeholder" -}}
+{{- $class := .Get "class" -}}
+{{- $color := .Get "color" | default (index $grays 2).hex -}}
+{{- $background := .Get "background" | default (index $grays 5).hex -}}
+{{- $width := .Get "width" | default "100%" -}}
+{{- $height := .Get "height" | default "180" -}}
+{{- $text := .Get "text" | default (printf "%sx%s" $width $height) -}}
+
+{{- $show_title := not (eq $title "false") -}}
+{{- $show_text := not (eq $text "false") -}}
+
+<svg class="bd-placeholder-img{{ with $class }} {{ . }}{{ end }}" width="{{ $width }}" height="{{ $height }}" xmlns="http://www.w3.org/2000/svg"{{ if (or $show_title $show_text) }} aria-label="{{ if $show_title }}{{ $title }}{{ if $show_text }}: {{ end }}{{ end }}{{ if ($show_text) }}{{ $text }}{{ end }}"{{ end }} preserveAspectRatio="xMidYMid slice" role="img">
+ {{- if $show_title -}}<title>{{ $title }}</title>{{- end -}}
+ <rect width="100%" height="100%" fill="{{ $background }}"/>
+ {{- if $show_text -}}<text x="50%" y="50%" fill="{{ $color }}" dy=".3em">{{ $text }}</text>{{- end -}}
+</svg>
diff --git a/site/layouts/shortcodes/year.html b/site/layouts/shortcodes/year.html
new file mode 100644
index 0000000000..bc9dd300d1
--- /dev/null
+++ b/site/layouts/shortcodes/year.html
@@ -0,0 +1,5 @@
+{{- /*
+ Output the current year
+*/ -}}
+
+{{- now.Format "2006" -}}
diff --git a/site/layouts/sitemap.xml b/site/layouts/sitemap.xml
new file mode 100644
index 0000000000..872ce44926
--- /dev/null
+++ b/site/layouts/sitemap.xml
@@ -0,0 +1,9 @@
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+ {{- range .Data.Pages -}}{{ if ne .Params.sitemap_exclude true }}
+ <url>
+ <loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
+ <lastmod>{{ safeHTML (.Lastmod.Format "2006-01-02T15:04:05-07:00") }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
+ <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
+ <priority>{{ .Sitemap.Priority }}</priority>{{ end }}
+ </url>{{ end }}{{ end }}
+</urlset>