Switch to Hugo.
No more Ruby dependency and most important more than 10 times less build time (at least on Windows)!
34
site/layouts/_default/docs.html
Normal file
@@ -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>
|
52
site/layouts/_default/examples.html
Normal file
@@ -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>
|
19
site/layouts/_default/home.html
Normal file
@@ -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>
|
29
site/layouts/_default/single.html
Normal file
@@ -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>
|
11
site/layouts/alias.html
Normal file
@@ -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>
|
1
site/layouts/partials/ads.html
Normal file
@@ -0,0 +1 @@
|
||||
<script async src="https://cdn.carbonads.com/carbon.js?serve=CKYIKKJL&placement=getbootstrapcom" id="_carbonads_js"></script>
|
6
site/layouts/partials/analytics.html
Normal file
@@ -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>
|
5
site/layouts/partials/callout-danger-async-methods.md
Normal file
@@ -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/).
|
@@ -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.
|
@@ -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).
|
@@ -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.
|
71
site/layouts/partials/docs-navbar.html
Normal file
@@ -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>
|
43
site/layouts/partials/docs-sidebar.html
Normal file
@@ -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>
|
9
site/layouts/partials/favicons.html
Normal file
@@ -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">
|
12
site/layouts/partials/footer.html
Normal file
@@ -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>
|
17
site/layouts/partials/header.html
Normal file
@@ -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" . }}
|
46
site/layouts/partials/home/masthead-followup.html
Normal file
@@ -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>
|
30
site/layouts/partials/home/masthead.html
Normal file
@@ -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>
|
1
site/layouts/partials/icons/bootstrap-stack.svg
Normal file
@@ -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>
|
After Width: | Height: | Size: 3.3 KiB |
1
site/layouts/partials/icons/bootstrap.svg
Normal file
@@ -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>
|
After Width: | Height: | Size: 824 B |
1
site/layouts/partials/icons/download.svg
Normal file
@@ -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>
|
After Width: | Height: | Size: 419 B |
1
site/layouts/partials/icons/github.svg
Normal file
@@ -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>
|
After Width: | Height: | Size: 1.0 KiB |
1
site/layouts/partials/icons/import.svg
Normal file
@@ -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>
|
After Width: | Height: | Size: 378 B |
1
site/layouts/partials/icons/lightning.svg
Normal file
@@ -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>
|
After Width: | Height: | Size: 379 B |
1
site/layouts/partials/icons/menu.svg
Normal file
@@ -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>
|
After Width: | Height: | Size: 344 B |
1
site/layouts/partials/icons/opencollective.svg
Normal file
@@ -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>
|
After Width: | Height: | Size: 518 B |
1
site/layouts/partials/icons/slack.svg
Normal file
@@ -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>
|
After Width: | Height: | Size: 1.3 KiB |
1
site/layouts/partials/icons/twitter.svg
Normal file
@@ -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>
|
After Width: | Height: | Size: 795 B |
19
site/layouts/partials/scripts.html
Normal file
@@ -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 -}}
|
3
site/layouts/partials/skippy.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<a class="skippy sr-only sr-only-focusable" href="#content">
|
||||
<span class="skippy-text">Skip to main content</span>
|
||||
</a>
|
18
site/layouts/partials/social.html
Normal file
@@ -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">
|
16
site/layouts/partials/stylesheet.html
Normal file
@@ -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 }}
|
8
site/layouts/robots.txt
Normal file
@@ -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
|
40
site/layouts/shortcodes/bugify.html
Normal file
@@ -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 -}}
|
10
site/layouts/shortcodes/callout.html
Normal file
@@ -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>
|
53
site/layouts/shortcodes/example.html
Normal file
@@ -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 -}}
|
19
site/layouts/shortcodes/list-examples.html
Normal file
@@ -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 -}}
|
20
site/layouts/shortcodes/list-versions.html
Normal file
@@ -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>
|
1
site/layouts/shortcodes/markdown.html
Normal file
@@ -0,0 +1 @@
|
||||
{{- .Inner | markdownify -}}
|
1
site/layouts/shortcodes/partial.html
Normal file
@@ -0,0 +1 @@
|
||||
{{ partial (.Get 0) . }}
|
30
site/layouts/shortcodes/placeholder.html
Normal file
@@ -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>
|
5
site/layouts/shortcodes/year.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{- /*
|
||||
Output the current year
|
||||
*/ -}}
|
||||
|
||||
{{- now.Format "2006" -}}
|
9
site/layouts/sitemap.xml
Normal file
@@ -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>
|