From 3ea39841c8049525e31e9f4d6300f0c60cdb42de Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 24 Jan 2023 13:33:51 +0100 Subject: Adding upstream version 5.2.3+dfsg. Signed-off-by: Daniel Baumann --- site/layouts/_default/404.html | 6 + site/layouts/_default/_markup/render-heading.html | 5 + site/layouts/_default/baseof.html | 21 ++ site/layouts/_default/docs.html | 66 ++++ site/layouts/_default/examples.html | 93 ++++++ site/layouts/_default/home.html | 8 + site/layouts/_default/redirect.html | 1 + site/layouts/_default/single.html | 52 +++ site/layouts/alias.html | 1 + site/layouts/partials/ads.html | 1 + site/layouts/partials/analytics.html | 9 + .../partials/callout-danger-async-methods.md | 5 + .../callout-info-mediaqueries-breakpoints.md | 1 + site/layouts/partials/callout-info-npm-starter.md | 1 + .../partials/callout-info-prefersreducedmotion.md | 1 + site/layouts/partials/callout-info-sanitizer.md | 1 + ...callout-warning-color-assistive-technologies.md | 3 + .../callout-warning-data-bs-title-vs-title.md | 1 + .../partials/callout-warning-input-support.md | 3 + site/layouts/partials/docs-navbar.html | 84 +++++ site/layouts/partials/docs-sidebar.html | 46 +++ site/layouts/partials/docs-versions.html | 46 +++ site/layouts/partials/favicons.html | 8 + site/layouts/partials/footer.html | 59 ++++ site/layouts/partials/guide-footer.md | 3 + site/layouts/partials/header.html | 25 ++ site/layouts/partials/home/masthead-followup.html | 356 +++++++++++++++++++++ site/layouts/partials/home/masthead.html | 34 ++ site/layouts/partials/icons.html | 72 +++++ .../partials/icons/bootstrap-logo-solid.svg | 1 + .../partials/icons/bootstrap-white-fill.svg | 1 + site/layouts/partials/icons/bootstrap.svg | 1 + site/layouts/partials/icons/circle-square.svg | 4 + site/layouts/partials/icons/cloud-fill.svg | 3 + site/layouts/partials/icons/code.svg | 3 + site/layouts/partials/icons/collapse.svg | 4 + site/layouts/partials/icons/droplet-fill.svg | 3 + site/layouts/partials/icons/expand.svg | 4 + site/layouts/partials/icons/github.svg | 1 + site/layouts/partials/icons/hamburger.svg | 3 + site/layouts/partials/icons/homepage-hero.svg | 1 + site/layouts/partials/icons/list.svg | 3 + site/layouts/partials/icons/menu.svg | 1 + site/layouts/partials/icons/opencollective.svg | 1 + site/layouts/partials/icons/twitter.svg | 1 + site/layouts/partials/js-data-attributes.md | 3 + site/layouts/partials/redirect.html | 11 + site/layouts/partials/scripts.html | 72 +++++ site/layouts/partials/skippy.html | 8 + site/layouts/partials/social.html | 15 + site/layouts/partials/stylesheet.html | 27 ++ site/layouts/partials/table-content.html | 27 ++ site/layouts/robots.txt | 12 + site/layouts/shortcodes/added-in.html | 5 + site/layouts/shortcodes/bs-table.html | 9 + site/layouts/shortcodes/callout.html | 9 + site/layouts/shortcodes/docsref.html | 1 + site/layouts/shortcodes/example.html | 47 +++ site/layouts/shortcodes/js-dismiss.html | 15 + site/layouts/shortcodes/markdown.html | 1 + site/layouts/shortcodes/param.html | 14 + site/layouts/shortcodes/partial.html | 1 + site/layouts/shortcodes/placeholder.html | 33 ++ site/layouts/shortcodes/scss-docs.html | 43 +++ site/layouts/shortcodes/table.html | 31 ++ site/layouts/shortcodes/year.html | 3 + site/layouts/sitemap.xml | 12 + 67 files changed, 1446 insertions(+) create mode 100644 site/layouts/_default/404.html create mode 100644 site/layouts/_default/_markup/render-heading.html create mode 100644 site/layouts/_default/baseof.html create mode 100644 site/layouts/_default/docs.html create mode 100644 site/layouts/_default/examples.html create mode 100644 site/layouts/_default/home.html create mode 100644 site/layouts/_default/redirect.html create mode 100644 site/layouts/_default/single.html create mode 100644 site/layouts/alias.html create mode 100644 site/layouts/partials/ads.html create mode 100644 site/layouts/partials/analytics.html create mode 100644 site/layouts/partials/callout-danger-async-methods.md create mode 100644 site/layouts/partials/callout-info-mediaqueries-breakpoints.md create mode 100644 site/layouts/partials/callout-info-npm-starter.md create mode 100644 site/layouts/partials/callout-info-prefersreducedmotion.md create mode 100644 site/layouts/partials/callout-info-sanitizer.md create mode 100644 site/layouts/partials/callout-warning-color-assistive-technologies.md create mode 100644 site/layouts/partials/callout-warning-data-bs-title-vs-title.md create mode 100644 site/layouts/partials/callout-warning-input-support.md create mode 100644 site/layouts/partials/docs-navbar.html create mode 100644 site/layouts/partials/docs-sidebar.html create mode 100644 site/layouts/partials/docs-versions.html create mode 100644 site/layouts/partials/favicons.html create mode 100644 site/layouts/partials/footer.html create mode 100644 site/layouts/partials/guide-footer.md create mode 100644 site/layouts/partials/header.html create mode 100644 site/layouts/partials/home/masthead-followup.html create mode 100644 site/layouts/partials/home/masthead.html create mode 100644 site/layouts/partials/icons.html create mode 100644 site/layouts/partials/icons/bootstrap-logo-solid.svg create mode 100644 site/layouts/partials/icons/bootstrap-white-fill.svg create mode 100644 site/layouts/partials/icons/bootstrap.svg create mode 100644 site/layouts/partials/icons/circle-square.svg create mode 100644 site/layouts/partials/icons/cloud-fill.svg create mode 100644 site/layouts/partials/icons/code.svg create mode 100644 site/layouts/partials/icons/collapse.svg create mode 100644 site/layouts/partials/icons/droplet-fill.svg create mode 100644 site/layouts/partials/icons/expand.svg create mode 100644 site/layouts/partials/icons/github.svg create mode 100644 site/layouts/partials/icons/hamburger.svg create mode 100644 site/layouts/partials/icons/homepage-hero.svg create mode 100644 site/layouts/partials/icons/list.svg create mode 100644 site/layouts/partials/icons/menu.svg create mode 100644 site/layouts/partials/icons/opencollective.svg create mode 100644 site/layouts/partials/icons/twitter.svg create mode 100644 site/layouts/partials/js-data-attributes.md create mode 100644 site/layouts/partials/redirect.html create mode 100644 site/layouts/partials/scripts.html create mode 100644 site/layouts/partials/skippy.html create mode 100644 site/layouts/partials/social.html create mode 100644 site/layouts/partials/stylesheet.html create mode 100644 site/layouts/partials/table-content.html create mode 100644 site/layouts/robots.txt create mode 100644 site/layouts/shortcodes/added-in.html create mode 100644 site/layouts/shortcodes/bs-table.html create mode 100644 site/layouts/shortcodes/callout.html create mode 100644 site/layouts/shortcodes/docsref.html create mode 100644 site/layouts/shortcodes/example.html create mode 100644 site/layouts/shortcodes/js-dismiss.html create mode 100644 site/layouts/shortcodes/markdown.html create mode 100644 site/layouts/shortcodes/param.html create mode 100644 site/layouts/shortcodes/partial.html create mode 100644 site/layouts/shortcodes/placeholder.html create mode 100644 site/layouts/shortcodes/scss-docs.html create mode 100644 site/layouts/shortcodes/table.html create mode 100644 site/layouts/shortcodes/year.html create mode 100644 site/layouts/sitemap.xml (limited to 'site/layouts') diff --git a/site/layouts/_default/404.html b/site/layouts/_default/404.html new file mode 100644 index 0000000..c9eecff --- /dev/null +++ b/site/layouts/_default/404.html @@ -0,0 +1,6 @@ +{{ define "body_override" }}{{ end }} +{{ define "main" }} +
+ {{ .Content }} +
+{{ end }} diff --git a/site/layouts/_default/_markup/render-heading.html b/site/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..cfb3d8f --- /dev/null +++ b/site/layouts/_default/_markup/render-heading.html @@ -0,0 +1,5 @@ +{{ .Text | safeHTML }} +{{- if and (ge .Level .Page.Site.Params.anchors.min) (le .Level .Page.Site.Params.anchors.max) }}{{" " -}} + +{{- end -}} + diff --git a/site/layouts/_default/baseof.html b/site/layouts/_default/baseof.html new file mode 100644 index 0000000..fdf19b3 --- /dev/null +++ b/site/layouts/_default/baseof.html @@ -0,0 +1,21 @@ + + + + {{ partial "header" . }} + + {{ block "body_override" . }}{{ end }} + {{ partial "skippy" . }} + {{ partial "icons" . }} + + {{ partial "docs-navbar" . }} + + {{ block "main" . }} + {{ end }} + + {{ partial "footer" . }} + {{ partial "scripts" . }} + + {{ block "footer" . }} + {{ end }} + + diff --git a/site/layouts/_default/docs.html b/site/layouts/_default/docs.html new file mode 100644 index 0000000..1a3f9c1 --- /dev/null +++ b/site/layouts/_default/docs.html @@ -0,0 +1,66 @@ +{{ define "main" }} +
+ + +
+
+
+ + View on GitHub + +

{{ .Title | markdownify }}

+
+

{{ .Page.Params.Description | markdownify }}

+ {{ partial "ads" . }} +
+ + {{ if (eq .Page.Params.toc true) }} +
+ + On this page +
+
+ {{ .TableOfContents }} +
+
+ {{ end }} + +
+ {{ if .Page.Params.sections }} +
+ {{ range .Page.Params.sections }} + + {{ end }} +
+ {{ end }} + + {{ .Content }} +
+
+
+{{ end }} +{{ define "footer" }} + {{ range .Page.Params.extra_js -}} + + {{- end -}} +
+{{ end }} diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html new file mode 100644 index 0000000..f70f859 --- /dev/null +++ b/site/layouts/_default/examples.html @@ -0,0 +1,93 @@ + + + + + + + + + {{ .Page.Title | markdownify }} · {{ .Site.Title | markdownify }} v{{ .Site.Params.docs_version }} + + + + {{ with .Params.robots -}} + + {{- end }} + + {{ partial "stylesheet" . }} + {{ partial "favicons" . }} + + + + {{ range .Page.Params.extra_css }} + {{ "" | safeHTML }} + + {{- end }} + + + {{ .Content }} + + {{ if ne .Page.Params.include_js false -}} + {{- if eq hugo.Environment "production" -}} + + {{- else -}} + + {{- end }} + + {{ range .Page.Params.extra_js -}} + + {{- end -}} + {{- end }} + + diff --git a/site/layouts/_default/home.html b/site/layouts/_default/home.html new file mode 100644 index 0000000..28bcf0c --- /dev/null +++ b/site/layouts/_default/home.html @@ -0,0 +1,8 @@ +{{ define "main" }} +
+ {{ partial "home/masthead" . }} + {{ partial "home/masthead-followup" . }} +
+ + {{ .Content }} +{{ end }} diff --git a/site/layouts/_default/redirect.html b/site/layouts/_default/redirect.html new file mode 100644 index 0000000..63ded08 --- /dev/null +++ b/site/layouts/_default/redirect.html @@ -0,0 +1 @@ +{{ partial "redirect" (.Page.Params.redirect | absURL) }} diff --git a/site/layouts/_default/single.html b/site/layouts/_default/single.html new file mode 100644 index 0000000..52ae87c --- /dev/null +++ b/site/layouts/_default/single.html @@ -0,0 +1,52 @@ +{{ define "main" }} +
+
+
+
+

{{ .Title | markdownify }}

+

{{ .Page.Params.Description | markdownify }}

+ {{ if eq .Title "Examples" }} + + {{ end }} +
+
+ {{ partial "ads" . }} +
+
+
+
+ +
+
+ {{ .Content }} + + {{ if eq .Title "Examples" }} +
+
+
+
+ {{ partial "icons/droplet-fill.svg" (dict "width" "32" "height" "32") }} +
+

Go further with Bootstrap Themes

+

+ Need something more than these examples? Take Bootstrap to the next level with premium themes from the official Bootstrap Themes marketplace. They’re built as their own extended frameworks, rich with new components and plugins, documentation, and powerful build tools. +

+ Browse themes +
+ Bootstrap Themes +
+ {{ end }} +
+
+{{ end }} diff --git a/site/layouts/alias.html b/site/layouts/alias.html new file mode 100644 index 0000000..35765c4 --- /dev/null +++ b/site/layouts/alias.html @@ -0,0 +1 @@ +{{ partial "redirect" .Permalink }} diff --git a/site/layouts/partials/ads.html b/site/layouts/partials/ads.html new file mode 100644 index 0000000..bbb9671 --- /dev/null +++ b/site/layouts/partials/ads.html @@ -0,0 +1 @@ + diff --git a/site/layouts/partials/analytics.html b/site/layouts/partials/analytics.html new file mode 100644 index 0000000..98e5142 --- /dev/null +++ b/site/layouts/partials/analytics.html @@ -0,0 +1,9 @@ + + + + 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 0000000..c8afdc2 --- /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/#asynchronous-functions-and-transitions). 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 0000000..2eea771 --- /dev/null +++ b/site/layouts/partials/callout-info-mediaqueries-breakpoints.md @@ -0,0 +1 @@ +**Why subtract .02px?** Browsers don't currently support [range context queries](https://www.w3.org/TR/mediaqueries-4/#range-context), so 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. diff --git a/site/layouts/partials/callout-info-npm-starter.md b/site/layouts/partials/callout-info-npm-starter.md new file mode 100644 index 0000000..bbd3897 --- /dev/null +++ b/site/layouts/partials/callout-info-npm-starter.md @@ -0,0 +1 @@ +**Get started with Bootstrap via npm with our starter project!** Head to the [twbs/bootstrap-npm-starter](https://github.com/twbs/bootstrap-npm-starter) template repository to see how to build and customize Bootstrap in your own npm project. Includes Sass compiler, Autoprefixer, Stylelint, PurgeCSS, and Bootstrap Icons. diff --git a/site/layouts/partials/callout-info-prefersreducedmotion.md b/site/layouts/partials/callout-info-prefersreducedmotion.md new file mode 100644 index 0000000..d258fbe --- /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-info-sanitizer.md b/site/layouts/partials/callout-info-sanitizer.md new file mode 100644 index 0000000..ee0eda4 --- /dev/null +++ b/site/layouts/partials/callout-info-sanitizer.md @@ -0,0 +1 @@ +By default, this component uses the built-in content sanitizer, which strips out any HTML elements that are not explicitly allowed. See the [sanitizer section in our JavaScript documentation](/docs/{{ .Site.Params.docs_version }}/getting-started/javascript/#sanitizer) for more details. 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 0000000..3568328 --- /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 `.visually-hidden` class. diff --git a/site/layouts/partials/callout-warning-data-bs-title-vs-title.md b/site/layouts/partials/callout-warning-data-bs-title-vs-title.md new file mode 100644 index 0000000..e932f22 --- /dev/null +++ b/site/layouts/partials/callout-warning-data-bs-title-vs-title.md @@ -0,0 +1 @@ +Feel free to use either `title` or `data-bs-title` in your HTML. When `title` is used, Popper will replace it automatically with `data-bs-title` when the element is rendered. diff --git a/site/layouts/partials/callout-warning-input-support.md b/site/layouts/partials/callout-warning-input-support.md new file mode 100644 index 0000000..7b0c8b4 --- /dev/null +++ b/site/layouts/partials/callout-warning-input-support.md @@ -0,0 +1,3 @@ +##### Date & color input support + +Keep in mind date inputs are [not fully supported](https://caniuse.com/input-datetime) by all browsers, namely Safari. diff --git a/site/layouts/partials/docs-navbar.html b/site/layouts/partials/docs-navbar.html new file mode 100644 index 0000000..68a086e --- /dev/null +++ b/site/layouts/partials/docs-navbar.html @@ -0,0 +1,84 @@ + diff --git a/site/layouts/partials/docs-sidebar.html b/site/layouts/partials/docs-sidebar.html new file mode 100644 index 0000000..e7b5576 --- /dev/null +++ b/site/layouts/partials/docs-sidebar.html @@ -0,0 +1,46 @@ + diff --git a/site/layouts/partials/docs-versions.html b/site/layouts/partials/docs-versions.html new file mode 100644 index 0000000..9b662e6 --- /dev/null +++ b/site/layouts/partials/docs-versions.html @@ -0,0 +1,46 @@ +{{- $url := split .Permalink "/" -}} +{{- $page_version := index $url (sub (len $url) 4) -}} +{{- $group_slug := index $url (sub (len $url) 3) -}} +{{- $page_slug := index $url (sub (len $url) 2) -}} + +{{- $versions_link := "" -}} +{{- if and (eq .Layout "docs") (eq $page_version .Site.Params.docs_version) -}} + {{- $versions_link = printf "%s/%s/" $group_slug $page_slug -}} +{{- else if (eq .Layout "single") }} + {{- $versions_link = printf "%s/" $page_slug -}} +{{- end }} + + diff --git a/site/layouts/partials/favicons.html b/site/layouts/partials/favicons.html new file mode 100644 index 0000000..58bdb8b --- /dev/null +++ b/site/layouts/partials/favicons.html @@ -0,0 +1,8 @@ +{{ "" | safeHTML }} + + + + + + + diff --git a/site/layouts/partials/footer.html b/site/layouts/partials/footer.html new file mode 100644 index 0000000..336032a --- /dev/null +++ b/site/layouts/partials/footer.html @@ -0,0 +1,59 @@ + diff --git a/site/layouts/partials/guide-footer.md b/site/layouts/partials/guide-footer.md new file mode 100644 index 0000000..22d4c14 --- /dev/null +++ b/site/layouts/partials/guide-footer.md @@ -0,0 +1,3 @@ +
+ +_See something wrong or out of date here? Please [open an issue on GitHub]({{ .Site.Params.repo }}/issues/new/choose). Need help troubleshooting? [Search or start a discussion]({{ .Site.Params.repo }}/discussions) on GitHub._ diff --git a/site/layouts/partials/header.html b/site/layouts/partials/header.html new file mode 100644 index 0000000..ceeb8b5 --- /dev/null +++ b/site/layouts/partials/header.html @@ -0,0 +1,25 @@ + + + + + + + + + +{{ if .IsHome }}{{ .Site.Title | markdownify }} · {{ .Site.Params.subtitle | markdownify }}{{ else }}{{ .Title | markdownify }} · {{ .Site.Title | markdownify }} v{{ .Site.Params.docs_version }}{{ end }} + + + +{{- if eq .Page.Layout "docs" -}} + +{{- end }} + +{{ with .Params.robots -}} + +{{- end }} + +{{ 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 0000000..58c9fb6 --- /dev/null +++ b/site/layouts/partials/home/masthead-followup.html @@ -0,0 +1,356 @@ +
+
+
+ +
+

Get started any way you want

+

+ Jump right into building with Bootstrap—use the CDN, install it via package manager, or download the source code. +

+

+ + Read installation docs + + +

+
+ +
+
+ +

Install via package manager

+

+ Install Bootstrap’s source Sass and JavaScript files via npm, RubyGems, Composer, or Meteor. Package managed installs don’t include documentation or our full build scripts. You can also use our npm template repo to quickly generate a Bootstrap project via npm. +

+ {{ highlight (printf ("npm install bootstrap@%s") .Site.Params.current_version) "sh" "" }} + {{ highlight (printf ("gem install bootstrap -v %s") .Site.Params.current_ruby_version) "sh" "" }} +

+ Read our installation docs for more info and additional package managers. +

+
+
+ +

Include via CDN

+

+ When you only need to include Bootstrap’s compiled CSS or JS, you can use jsDelivr. See it in action with our simple quick start, or browse the examples to jumpstart your next project. You can also choose to include Popper and our JS separately. +

+ {{ highlight (printf (` + +`) .Site.Params.cdn.css (.Site.Params.cdn.css_hash | safeHTMLAttr)) "html" "" }} + {{ highlight (printf (` + +`) .Site.Params.cdn.js_bundle (.Site.Params.cdn.js_bundle_hash | safeHTMLAttr)) "html" "" }} +
+ +
+

Read our getting started guides

+

Get a jump on including Bootstrap's source files in a new project with our official guides.

+ +
+
+ +
+
+ +
+

Customize everything with Sass

+

+ Bootstrap utilizes Sass for a modular and customizable architecture. Import only the components you need, enable global options like gradients and shadows, and write your own CSS with our variables, maps, functions, and mixins. +

+

+ + Learn more about customizing + + +

+
+ +
+
+

Include all of Bootstrap’s Sass

+

Import one stylesheet and you're off to the races with every feature of our CSS.

+ {{ highlight (printf `// Variable overrides first +$primary: #900; +$enable-shadows: true; +$prefix: "mo-"; + +// Then import Bootstrap +@import "../node_modules/bootstrap/scss/bootstrap"; +`) "scss" "" }} +

Learn more about our global Sass options.

+
+
+

Include what you need

+

The easiest way to customize Bootstrap—include only the CSS you need.

+{{ highlight (printf `// Functions first +@import "../node_modules/bootstrap/scss/functions"; + +// Variable overrides second +$primary: #900; +$enable-shadows: true; +$prefix: "mo-"; + +// Required Bootstrap imports +@import "../node_modules/bootstrap/scss/variables"; +@import "../node_modules/bootstrap/scss/maps"; +@import "../node_modules/bootstrap/scss/mixins"; +@import "../node_modules/bootstrap/scss/root"; + +// Optional components +@import "../node_modules/bootstrap/scss/utilities"; +@import "../node_modules/bootstrap/scss/reboot"; +@import "../node_modules/bootstrap/scss/containers"; +@import "../node_modules/bootstrap/scss/grid"; +@import "../node_modules/bootstrap/scss/helpers"; +@import "../node_modules/bootstrap/scss/utilities/api"; +`) "scss" "" }} +

Learn more about using Bootstrap with Sass.

+
+
+ +
+
+
+ +
+

Build and extend in real-time with CSS variables

+

+ Bootstrap 5 is evolving with each release to better utilize CSS variables for global theme styles, individual components, and even utilities. We provide dozens of variables for colors, font styles, and more at a :root level for use anywhere. On components and utilities, CSS variables are scoped to the relevant class and can easily be modified. +

+

+ + Learn more about CSS variables + + +

+
+
+
+

Using CSS variables

+

Use any of our global :root variables to write new styles. CSS variables use the var(--bs-variableName) syntax and can be inherited by children elements.

+ {{ highlight (printf `.component { + color: var(--bs-gray-800); + background-color: var(--bs-gray-100); + border: 1px solid var(--bs-gray-200); + border-radius: .25rem; +} + +.component-header { + color: var(--bs-purple); +}`) "scss" "" }} +
+
+

Customizing via CSS variables

+

Override global, component, or utility class variables to customize Bootstrap just how you like. No need to redeclare each rule, just a new variable value.

+ {{ highlight (printf `body { + --bs-body-font-family: var(--bs-font-monospace); + --bs-body-line-height: 1.4; + --bs-body-bg: var(--bs-gray-100); +} + +.table { + --bs-table-color: var(--bs-gray-600); + --bs-table-bg: var(--bs-gray-100); + --bs-table-border-color: transparent; +}`) "scss" "" }} +
+
+
+ +
+
+
+ +
+ +
+ +
+

Components, meet the Utility API

+

+ New in Bootstrap 5, our utilities are now generated by our Utility API. We built it as a feature-packed Sass map that can be quickly and easily customized. It's never been easier to add, remove, or modify any utility classes. Make utilities responsive, add pseudo-class variants, and give them custom names. +

+

+ + Learn more about utilities + + + + Explore customized components + + +

+
+
+
+
Quickly customize components
+
+ + +
+ {{ highlight (printf `// Create and extend utilities with the Utility API + +@import "bootstrap/scss/bootstrap"; + +$utilities: map-merge( + $utilities, + ( + "cursor": ( + property: cursor, + class: cursor, + responsive: true, + values: auto pointer grab, + ) + ) +); +`) "scss" "" }} +
+
+ +
+
+
+ +
+

Powerful JavaScript plugins without jQuery

+

+ Easily add toggleable hidden elements, modals and offcanvas menus, popovers and tooltips, and so much more—all without jQuery. JavaScript in Bootstrap is HTML-first, which means adding plugins is as easy as adding data attributes. Need more control? Include individual plugins programmatically. +

+

+ + Learn more about Bootstrap JavaScript + + +

+
+
+
+

Data attribute API

+

Why write more JavaScript when you can write HTML? Nearly all of Bootstrap's JavaScript plugins feature a first-class data API, allowing you to use JavaScript just by adding data attributes.

+
+ +
+ + {{ highlight (printf ` +`) "html" "" }} +

Learn more about our JavaScript as modules and using the programmatic API.

+
+
+

Comprehensive set of plugins

+

Bootstrap features a dozen plugins that you can drop into any project. Drop them in all at once, or choose just the ones you need.

+
+
+ {{- range $plugin := .Site.Data.plugins -}} + {{- $href := printf "/docs/%s/%s" $.Site.Params.docs_version $plugin.link }} + + {{- end }} +
+
+
+ +
+ +
+
+
+ {{ partial "icons/circle-square.svg" (dict "width" "32" "height" "32") }} +
+

Personalize it with Bootstrap Icons

+

+ Bootstrap Icons is an open source SVG icon library featuring over 1,500 glyphs, with more added every release. They're designed to work in any project, whether you use Bootstrap itself or not. Use them as SVGs or icon fonts—both options give you vector scaling and easy customization via CSS. +

+

+ + Get Bootstrap Icons + + +

+
+
+ Bootstrap Icons +
+
+ +
+
+
+ {{ partial "icons/droplet-fill.svg" (dict "width" "32" "height" "32") }} +
+

Make it yours with official Bootstrap Themes

+

+ Take Bootstrap to the next level with premium themes from the official Bootstrap Themes marketplace. Themes are built on Bootstrap as their own extended frameworks, rich with new components and plugins, documentation, and powerful build tools. +

+

+ + Browse Bootstrap Themes + + +

+
+
+ Bootstrap Themes +
+
+
diff --git a/site/layouts/partials/home/masthead.html b/site/layouts/partials/home/masthead.html new file mode 100644 index 0000000..ed43f5c --- /dev/null +++ b/site/layouts/partials/home/masthead.html @@ -0,0 +1,34 @@ +
+
+
+ + New in v5.2 + CSS variables, responsive offcanvas, new utilities, and more! + + Bootstrap +

Build fast, responsive sites with Bootstrap

+

+ Powerful, extensible, and feature-packed frontend toolkit. Build and customize with Sass, utilize prebuilt grid system and components, and bring projects to life with powerful JavaScript plugins. +

+
+
+ {{ highlight (printf ("npm i bootstrap@%s") .Site.Params.current_version) "sh" "" }} +
+ + + Read the docs + +
+

+ Currently v{{ .Site.Params.current_version }} + · + Download + · + v4.6.x docs + · + All releases +

+ {{ partial "ads" . }} +
+
+
diff --git a/site/layouts/partials/icons.html b/site/layouts/partials/icons.html new file mode 100644 index 0000000..9841e14 --- /dev/null +++ b/site/layouts/partials/icons.html @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + Check + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/site/layouts/partials/icons/bootstrap-logo-solid.svg b/site/layouts/partials/icons/bootstrap-logo-solid.svg new file mode 100644 index 0000000..59bed36 --- /dev/null +++ b/site/layouts/partials/icons/bootstrap-logo-solid.svg @@ -0,0 +1 @@ +{{ with .title }}{{ . }}{{ else }}Bootstrap{{ end }} diff --git a/site/layouts/partials/icons/bootstrap-white-fill.svg b/site/layouts/partials/icons/bootstrap-white-fill.svg new file mode 100644 index 0000000..af4bc7f --- /dev/null +++ b/site/layouts/partials/icons/bootstrap-white-fill.svg @@ -0,0 +1 @@ +{{ with .title }}{{ . }}{{ else }}Bootstrap{{ end }} \ 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 0000000..1b57d33 --- /dev/null +++ b/site/layouts/partials/icons/bootstrap.svg @@ -0,0 +1 @@ +{{ with .title }}{{ . }}{{ else }}Bootstrap{{ end }} \ No newline at end of file diff --git a/site/layouts/partials/icons/circle-square.svg b/site/layouts/partials/icons/circle-square.svg new file mode 100644 index 0000000..edd0575 --- /dev/null +++ b/site/layouts/partials/icons/circle-square.svg @@ -0,0 +1,4 @@ + + + + diff --git a/site/layouts/partials/icons/cloud-fill.svg b/site/layouts/partials/icons/cloud-fill.svg new file mode 100644 index 0000000..4ca9276 --- /dev/null +++ b/site/layouts/partials/icons/cloud-fill.svg @@ -0,0 +1,3 @@ + + + diff --git a/site/layouts/partials/icons/code.svg b/site/layouts/partials/icons/code.svg new file mode 100644 index 0000000..7315685 --- /dev/null +++ b/site/layouts/partials/icons/code.svg @@ -0,0 +1,3 @@ + + + diff --git a/site/layouts/partials/icons/collapse.svg b/site/layouts/partials/icons/collapse.svg new file mode 100644 index 0000000..ede702d --- /dev/null +++ b/site/layouts/partials/icons/collapse.svg @@ -0,0 +1,4 @@ + + {{ with .title }}{{ . }}{{ else }}Collapse{{ end }} + + diff --git a/site/layouts/partials/icons/droplet-fill.svg b/site/layouts/partials/icons/droplet-fill.svg new file mode 100644 index 0000000..228abfa --- /dev/null +++ b/site/layouts/partials/icons/droplet-fill.svg @@ -0,0 +1,3 @@ + + + diff --git a/site/layouts/partials/icons/expand.svg b/site/layouts/partials/icons/expand.svg new file mode 100644 index 0000000..d143151 --- /dev/null +++ b/site/layouts/partials/icons/expand.svg @@ -0,0 +1,4 @@ + + {{ with .title }}{{ . }}{{ else }}Expand{{ end }} + + diff --git a/site/layouts/partials/icons/github.svg b/site/layouts/partials/icons/github.svg new file mode 100644 index 0000000..6f06f77 --- /dev/null +++ b/site/layouts/partials/icons/github.svg @@ -0,0 +1 @@ +{{ with .title }}{{ . }}{{ else }}GitHub{{ end }} \ No newline at end of file diff --git a/site/layouts/partials/icons/hamburger.svg b/site/layouts/partials/icons/hamburger.svg new file mode 100644 index 0000000..955d8a6 --- /dev/null +++ b/site/layouts/partials/icons/hamburger.svg @@ -0,0 +1,3 @@ + + + diff --git a/site/layouts/partials/icons/homepage-hero.svg b/site/layouts/partials/icons/homepage-hero.svg new file mode 100644 index 0000000..538045a --- /dev/null +++ b/site/layouts/partials/icons/homepage-hero.svg @@ -0,0 +1 @@ +{{ with .title }}{{ . }}{{ else }}Bootstrap{{ end }} \ No newline at end of file diff --git a/site/layouts/partials/icons/list.svg b/site/layouts/partials/icons/list.svg new file mode 100644 index 0000000..a801c22 --- /dev/null +++ b/site/layouts/partials/icons/list.svg @@ -0,0 +1,3 @@ + + + \ 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 0000000..70eacce --- /dev/null +++ b/site/layouts/partials/icons/menu.svg @@ -0,0 +1 @@ +{{ with .title }}{{ . }}{{ else }}Menu{{ end }} \ 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 0000000..2896ba5 --- /dev/null +++ b/site/layouts/partials/icons/opencollective.svg @@ -0,0 +1 @@ +{{ with .title }}{{ . }}{{ else }}Open Collective{{ end }} \ 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 0000000..7a7fcee --- /dev/null +++ b/site/layouts/partials/icons/twitter.svg @@ -0,0 +1 @@ +{{ with .title }}{{ . }}{{ else }}Twitter{{ end }} \ No newline at end of file diff --git a/site/layouts/partials/js-data-attributes.md b/site/layouts/partials/js-data-attributes.md new file mode 100644 index 0000000..e99ff71 --- /dev/null +++ b/site/layouts/partials/js-data-attributes.md @@ -0,0 +1,3 @@ +As options can be passed via data attributes or JavaScript, you can append an option name to `data-bs-`, as in `data-bs-animation="{value}"`. Make sure to change the case type of the option name from "_camelCase_" to "_kebab-case_" when passing the options via data attributes. For example, use `data-bs-custom-class="beautifier"` instead of `data-bs-customClass="beautifier"`. + +As of Bootstrap 5.2.0, all components support an **experimental** reserved data attribute `data-bs-config` that can house simple component configuration as a JSON string. When an element has `data-bs-config='{"delay":0, "title":123}'` and `data-bs-title="456"` attributes, the final `title` value will be `456` and the separate data attributes will override values given on `data-bs-config`. In addition, existing data attributes are able to house JSON values like `data-bs-delay='{"show":0,"hide":150}'`. diff --git a/site/layouts/partials/redirect.html b/site/layouts/partials/redirect.html new file mode 100644 index 0000000..a951e21 --- /dev/null +++ b/site/layouts/partials/redirect.html @@ -0,0 +1,11 @@ + + + + + + {{ . }} + + + + + diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html new file mode 100644 index 0000000..3378a23 --- /dev/null +++ b/site/layouts/partials/scripts.html @@ -0,0 +1,72 @@ +{{ if eq hugo.Environment "production" -}} + +{{ else -}} + +{{- end }} + +{{ if eq .Page.Layout "docs" -}} + + +{{- end }} + +{{- $vendor := resources.Match "js/vendor/*.js" -}} +{{- $js := resources.Match "js/*.js" -}} +{{- $targetDocsJSPath := path.Join "/docs" .Site.Params.docs_version "assets/js/docs.js" -}} +{{- $docsJs := append $js $vendor | resources.Concat $targetDocsJSPath -}} + +{{- if eq hugo.Environment "production" -}} + {{- $docsJs = $docsJs | resources.Minify -}} +{{- end }} + + + +{{ if eq .Page.Layout "docs" -}} + +{{- end }} diff --git a/site/layouts/partials/skippy.html b/site/layouts/partials/skippy.html new file mode 100644 index 0000000..8da5c0a --- /dev/null +++ b/site/layouts/partials/skippy.html @@ -0,0 +1,8 @@ +
+
+ Skip to main content + {{ if (eq .Page.Layout "docs") -}} + Skip to docs navigation + {{- end }} +
+
diff --git a/site/layouts/partials/social.html b/site/layouts/partials/social.html new file mode 100644 index 0000000..2226c38 --- /dev/null +++ b/site/layouts/partials/social.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/site/layouts/partials/stylesheet.html b/site/layouts/partials/stylesheet.html new file mode 100644 index 0000000..1aa3296 --- /dev/null +++ b/site/layouts/partials/stylesheet.html @@ -0,0 +1,27 @@ +{{ if eq .Page.Layout "docs" -}} + +{{- end }} + +{{ if eq hugo.Environment "production" -}} +{{ if eq .Page.Params.direction "rtl" -}} + +{{- else -}} + +{{- end -}} +{{- else -}} + +{{- end }} + +{{- if (ne .Page.Layout "examples") }} +{{- $targetDocsCssPath := path.Join "/docs" .Site.Params.docs_version "assets/css/docs.css" -}} +{{- $sassOptions := dict "targetPath" $targetDocsCssPath "outputStyle" "expanded" "precision" 6 -}} +{{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}} + +{{ if eq hugo.Environment "production" -}} + {{- $sassOptions = merge $sassOptions (dict "outputStyle" "compressed") -}} +{{- end -}} + +{{- $style := resources.Get "scss/docs.scss" | toCSS $sassOptions | postCSS $postcssOptions }} + + +{{- end }} diff --git a/site/layouts/partials/table-content.html b/site/layouts/partials/table-content.html new file mode 100644 index 0000000..71fca1d --- /dev/null +++ b/site/layouts/partials/table-content.html @@ -0,0 +1,27 @@ + + + # + First + Last + Handle + + + + + 1 + Mark + Otto + @mdo + + + 2 + Jacob + Thornton + @fat + + + 3 + Larry the Bird + @twitter + + diff --git a/site/layouts/robots.txt b/site/layouts/robots.txt new file mode 100644 index 0000000..271b4f1 --- /dev/null +++ b/site/layouts/robots.txt @@ -0,0 +1,12 @@ +# www.robotstxt.org + +{{- $isProduction := eq hugo.Environment "production" -}} +{{- $isNetlify := eq (getenv "NETLIFY") "true" -}} +{{- $allowCrawling := and (not $isNetlify) $isProduction -}} + +{{ if $allowCrawling }} +# Allow crawling of all content +{{- end }} +User-agent: * +Disallow:{{ if not $allowCrawling }} /{{ end }} +Sitemap: {{ "/sitemap.xml" | absURL }} diff --git a/site/layouts/shortcodes/added-in.html b/site/layouts/shortcodes/added-in.html new file mode 100644 index 0000000..ca461c2 --- /dev/null +++ b/site/layouts/shortcodes/added-in.html @@ -0,0 +1,5 @@ +{{- /* Outputs badge to identify the first version something was added */ -}} + +{{- $version := .Get 0 -}} + +Added in v{{ $version }} diff --git a/site/layouts/shortcodes/bs-table.html b/site/layouts/shortcodes/bs-table.html new file mode 100644 index 0000000..9eec109 --- /dev/null +++ b/site/layouts/shortcodes/bs-table.html @@ -0,0 +1,9 @@ +{{- /* + Usage: `bs-table "class class-foo"`, where class can be any string +*/ -}} + +{{- $css_class := .Get 0 | default "table" -}} +{{- $html_table := .Inner | markdownify -}} +{{- $html_table = replace $html_table "" (printf `
` $css_class) -}} +{{- $html_table = replace $html_table "
" "" -}} +{{- $html_table | safeHTML -}} diff --git a/site/layouts/shortcodes/callout.html b/site/layouts/shortcodes/callout.html new file mode 100644 index 0000000..86683ec --- /dev/null +++ b/site/layouts/shortcodes/callout.html @@ -0,0 +1,9 @@ +{{- /* + Usage: `callout "type"`, where `type` is one of info (default), danger, or warning +*/ -}} + +{{- $css_class := .Get 0 | default "info" -}} + +
+{{ .Inner | markdownify }} +
diff --git a/site/layouts/shortcodes/docsref.html b/site/layouts/shortcodes/docsref.html new file mode 100644 index 0000000..2379de2 --- /dev/null +++ b/site/layouts/shortcodes/docsref.html @@ -0,0 +1 @@ +{{- relref . ((path.Join "docs" $.Site.Params.docs_version (.Get 0)) | relURL) -}} diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html new file mode 100644 index 0000000..c6dcddb --- /dev/null +++ b/site/layouts/shortcodes/example.html @@ -0,0 +1,47 @@ +{{- /* + Usage: `example args` + + `args` are all 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: "" + * lang: language used to display the code - default: "html" + * show_markup: if the markup should be output in the HTML - default: `true` + * show_preview: if the preview should be output in the HTML - default: `true` + * stackblitz_add_js: if extra JS snippet should be added to StackBlitz - default: `false` +*/ -}} + +{{- $id := .Get "id" -}} +{{- $class := .Get "class" -}} +{{- $lang := .Get "lang" | default "html" -}} +{{- $stackblitz_add_js := .Get "stackblitz_add_js" | default false -}} +{{- $show_markup := .Get "show_markup" | default true -}} +{{- $show_preview := .Get "show_preview" | default true -}} +{{- $input := .Inner -}} + +
+ {{- if eq $show_preview true -}} + + {{- $input -}} +
+ {{- end -}} + + {{- if eq $show_markup true -}} + {{- if eq $show_preview true -}} +
+ {{- $lang -}} +
+ + +
+
+ {{- end -}} + + {{- $content := replaceRE `\n` `...` $input -}} + {{- $content = replaceRE ` (class=" *?")` "" $content -}} + {{- highlight (trim $content "\n") $lang "" -}} + {{- end -}} + diff --git a/site/layouts/shortcodes/js-dismiss.html b/site/layouts/shortcodes/js-dismiss.html new file mode 100644 index 0000000..45d72d0 --- /dev/null +++ b/site/layouts/shortcodes/js-dismiss.html @@ -0,0 +1,15 @@ +{{- /* Usage: js-dismiss "ComponentName" */ -}} + +{{- $name := .Get 0 -}} + +Dismissal can be achieved with the `data` attribute on a button **within the {{ $name }}** as demonstrated below: + +```html + +``` + +or on a button **outside the {{ $name }}** using the `data-bs-target` as demonstrated below: + +```html + +``` diff --git a/site/layouts/shortcodes/markdown.html b/site/layouts/shortcodes/markdown.html new file mode 100644 index 0000000..82107bc --- /dev/null +++ b/site/layouts/shortcodes/markdown.html @@ -0,0 +1 @@ +{{- .Inner | markdownify -}} diff --git a/site/layouts/shortcodes/param.html b/site/layouts/shortcodes/param.html new file mode 100644 index 0000000..34ad00c --- /dev/null +++ b/site/layouts/shortcodes/param.html @@ -0,0 +1,14 @@ +{{- /* + Work around wrong escapes in integrity attributes. + Original: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/shortcodes/param.html +*/ -}} + +{{- $name := .Get 0 -}} +{{- with $name -}} +{{- $value := $.Page.Param . -}} +{{- /* If any parameter ends with `_hash`, mark the string as safe HTML */ -}} +{{- if (strings.HasSuffix $name "_hash") -}} + {{- $value = $value | safeHTML -}} +{{- end -}} +{{- with $value }}{{ . }}{{ else }}{{ errorf "Param %q not found: %s" $name $.Position }}{{ end -}} +{{- else }}{{ errorf "Missing param key: %s" $.Position }}{{ end -}} diff --git a/site/layouts/shortcodes/partial.html b/site/layouts/shortcodes/partial.html new file mode 100644 index 0000000..c9d3496 --- /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 0000000..c267bf4 --- /dev/null +++ b/site/layouts/shortcodes/placeholder.html @@ -0,0 +1,33 @@ +{{- /* + Usage: `placeholder args` + + `args` are all optional and 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: Class to add to the `svg` - 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 -}} +{{- $default_color := (index $grays 2).hex -}} +{{- $default_background := (index $grays 5).hex -}} + +{{- $title := .Get "title" | default "Placeholder" -}} +{{- $class := .Get "class" -}} +{{- $color := .Get "color" | default $default_color -}} +{{- $background := .Get "background" | default $default_background -}} +{{- $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") -}} + + diff --git a/site/layouts/shortcodes/scss-docs.html b/site/layouts/shortcodes/scss-docs.html new file mode 100644 index 0000000..3d1cd09 --- /dev/null +++ b/site/layouts/shortcodes/scss-docs.html @@ -0,0 +1,43 @@ +{{- /* + Usage: `scss-docs name="name" file="file/_location.scss"` + + Prints everything between `// scss-docs-start "name"` and `// scss-docs-end "name"` + comments in the docs. + + Optional parameters: + * strip-default: Remove the ` !default` flag from variable assignments - default: `true` +*/ -}} + +{{- $name := .Get "name" -}} +{{- $file := .Get "file" -}} +{{- $strip_default := .Get "strip-default" | default "true" -}} + +{{- /* If any parameters are missing, print an error and exit */ -}} +{{- if or (not $name) (not $file) -}} + {{- errorf "%s: %q: Missing required parameters! Got: name=%q file=%q!" .Position .Name $name $file -}} +{{- else -}} + {{- $capture_start := printf "// scss-docs-start %s\n" $name -}} + {{- $capture_end := printf "// scss-docs-end %s" $name -}} + {{- $regex := printf `%s((?:.|\n)*)%s` $capture_start $capture_end -}} + + {{- /* + TODO: figure out why we can't do the following and get the first group (the only capturing one)... + $regex := printf `(?:// scss-docs-start %s\n)((?:.|\n)*)(?:\n// scss-docs-end %s)` $name $name + */ -}} + + {{- $match := findRE $regex (readFile $file) -}} + {{- $match = index $match 0 -}} + + {{- if not $match -}} + {{- errorf "%s: %q: Got no matches for name=%q in file=%q!" .Position .Name $name $file -}} + {{- end -}} + + {{- $match = replace $match $capture_start "" -}} + {{- $match = replace $match $capture_end "" -}} + + {{- if (ne $strip_default "false") -}} + {{- $match = replace $match " !default" "" -}} + {{- end -}} + + {{- highlight $match "scss" "" -}} +{{- end -}} diff --git a/site/layouts/shortcodes/table.html b/site/layouts/shortcodes/table.html new file mode 100644 index 0000000..a98b5eb --- /dev/null +++ b/site/layouts/shortcodes/table.html @@ -0,0 +1,31 @@ +{{- /* + Usage: `table [args]` + + `args` are optional and can be one of the following: + * class: any class(es) to be added to the `table` - default "" + * simplified: show a simplified version in the examples - default `true` +*/ -}} + +{{- $class := .Get "class" -}} +{{- $simplified := .Get "simplified" | default true -}} + +{{- $table_attributes := "" -}} +{{- $table_content := " ...\n" -}} + +{{- with $class -}} + {{- $table_attributes = printf ` class="%s"` . -}} +{{- end -}} + +{{- if eq $simplified "false" -}} + {{- $table_content = partialCached "table-content" . -}} +{{- end -}} + +{{- $table := printf "\n%s" $table_attributes $table_content -}} + +
+ + {{ partialCached "table-content" . }} + +
+ +{{- highlight $table "html" "" -}} diff --git a/site/layouts/shortcodes/year.html b/site/layouts/shortcodes/year.html new file mode 100644 index 0000000..db7f18e --- /dev/null +++ b/site/layouts/shortcodes/year.html @@ -0,0 +1,3 @@ +{{- /* Outputs the current year */ -}} + +{{- now.Format "2006" -}} diff --git a/site/layouts/sitemap.xml b/site/layouts/sitemap.xml new file mode 100644 index 0000000..869f1cb --- /dev/null +++ b/site/layouts/sitemap.xml @@ -0,0 +1,12 @@ +{{ printf "" | safeHTML }} + + {{- range .Data.Pages -}}{{ if and .Permalink (ne .Params.sitemap_exclude true) }} + + {{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ safeHTML (.Lastmod.Format "2006-01-02T15:04:05-07:00") }}{{ end }}{{ with .Sitemap.ChangeFreq }} + {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} + {{ end }} + {{ end }} + {{ end }}{{ end }} + -- cgit v1.2.3