diff --git a/config.yml b/config.yml index 1546faf353..fa4019e7fd 100644 --- a/config.yml +++ b/config.yml @@ -4,7 +4,7 @@ baseURL: "https://icons.getbootstrap.com" enableInlineShortcodes: true enableRobotsTXT: true metaDataFormat: "yaml" -disableKinds: ["404", "taxonomy", "term", "RSS"] +disableKinds: ["404", "RSS"] publishDir: "_site" @@ -53,6 +53,14 @@ module: - source: node_modules/list.js/dist/list.min.js target: assets/js/vendor/list.min.js +taxonomies: + category: categories + tag: tags + +permalinks: + categories: "/:section/:slug" + tags: "/:section/:slug" + params: description: "Official open source SVG icon library for Bootstrap" social_image_path: /assets/img/bootstrap-icons-social.png diff --git a/docs/assets/scss/docs.scss b/docs/assets/scss/docs.scss index a3ae687e9a..b35e8f18e0 100644 --- a/docs/assets/scss/docs.scss +++ b/docs/assets/scss/docs.scss @@ -22,7 +22,7 @@ // @import "bootstrap/accordion"; @import "bootstrap/breadcrumb"; // @import "bootstrap/pagination"; -// @import "bootstrap/badge"; +@import "bootstrap/badge"; // @import "bootstrap/alert"; // @import "bootstrap/progress"; // @import "bootstrap/list-group"; @@ -92,13 +92,13 @@ white-space: pre; background-color: transparent; border: 0; - } + } pre code { @include font-size(inherit); - word-wrap: normal; + word-wrap: normal; + } } -} .bd-example { @@ -137,6 +137,7 @@ border-bottom: 1px solid var(--bs-border-color-translucent); .highlight { + padding: 1rem 1.25rem; margin-bottom: 0; background-color: var(--bs-tertiary-bg); border-radius: .5rem; @@ -156,7 +157,7 @@ } .btn { - padding: 1rem 1.25rem; + padding: .75rem 1.25rem; border-radius: .5rem; } @@ -174,9 +175,14 @@ .list { font-size: 2rem; + :target { + padding-top: 6rem; + margin-top: -6rem; + } + // stylelint-disable declaration-no-important - a:hover, - a:focus { + .list-icon:hover, + .list-icon:focus { &, .name { color: var(--bs-link-hover-color) !important; @@ -207,6 +213,12 @@ } @media (min-width: 1200px) { + .row-cols-xl-6 { + > * { + flex: 0 0 16.666667%; + max-width: 16.666667%; + } + } .row-cols-xl-8 { > * { flex: 0 0 12.5%; @@ -235,3 +247,77 @@ padding-bottom: 4.5rem !important; } // stylelint-enable declaration-no-important + +.bd-sidebar { + @include media-breakpoint-up(lg) { + position: sticky; + top: 5rem; + // Override collapse behaviors + // display: block !important; + height: subtract(100vh, 6rem); + // Prevent focus styles to be cut off: + // padding-left: .25rem; + // margin-left: -.25rem; + overflow-y: auto; + } +} + +.bd-sidebar-list { + --bs-nav-link-padding-y: .375rem; + --bs-nav-link-padding-x: .75rem; + --bs-nav-link-color: var(--bs-gray-600); + --bs-nav-pills-link-active-color: var(--bd-purple); + --bs-nav-pills-link-active-bg: rgba(var(--bd-violet-rgb), .05); +} + +.grid { + display: grid; + grid-template-rows: repeat(var(--bs-rows, 1), 1fr); + grid-template-columns: repeat(var(--bs-columns, 12), 1fr); + gap: var(--bs-gap, 1.5rem); +} + +.category-grid { + --bs-columns: 1; + + @include media-breakpoint-up(sm) { + --bs-columns: 2; + } + + @include media-breakpoint-up(md) { + --bs-columns: 3; + } + + @include media-breakpoint-up(lg) { + --bs-columns: 4; + } + + .bi { + width: 3rem; + aspect-ratio: 1 / 1; + text-align: center; + } +} + +.hover-link-primary:hover { + color: var(--bs-primary) !important; // stylelint-disable-line declaration-no-important +} +.new-shadow { + box-shadow: 0 .25rem .75rem var(--bs-shadow-color, rgba(0, 0, 0, .1)); +} +.hover-shadow-primary:hover { + --bs-shadow-color: rgba(var(--bs-primary-rgb), .25); +} +.hover-border-primary:hover { + --bs-border-color: rgba(var(--bs-primary-rgb), .75); +} + +.btn-subtle { + --bs-btn-color: #{mix($gray-500, $gray-600)}; + --bs-btn-bg: #{$gray-100}; + --bs-btn-hover-color: #{$gray-600}; + --bs-btn-hover-bg: #{mix($gray-100, $gray-200)}; + --bs-btn-active-color: #{$gray-600}; + --bs-btn-active-bg: #{$gray-200}; + --bs-btn-active-border-color: #{$gray-200}; +} diff --git a/docs/content/_index.md b/docs/content/_index.md index fe8f9973a6..c14138da9c 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -2,226 +2,3 @@ aliases: - /font/ --- - -## Install - -Bootstrap Icons are published to npm, but they can also be manually downloaded if needed. - -
-
-{{< md >}} -### Package manager -Install [Bootstrap Icons](https://www.npmjs.com/package/bootstrap-icons)—including SVGs, icon sprite, and icon fonts—with npm or Composer. Then, choose how you'd like to include the icons with the [usage instructions](#usage). - -{{< highlight sh >}} -npm i bootstrap-icons -{{< /highlight >}} -{{< highlight sh >}} -composer require twbs/bootstrap-icons -{{< /highlight >}} -{{< /md >}} -
-
-{{< md >}} -### Download -[Releases are published on GitHub](https://github.com/twbs/icons/releases/) and include icon SVGs, fonts, license, and readme. Our `package.json` is also included, though our npm scripts are primarily available for our development workflows. - -Download latest ZIP -{{< /md >}} -
-
-{{< md >}} -### CDN -Include the icon fonts stylesheet—in your website `` or via `@import` in CSS—from our CDN and get started in seconds. [See icon font docs](#icon-font) for examples. - -{{< highlight html >}} - -{{< /highlight >}} - -{{< highlight css >}} -@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@{{< param version >}}/font/bootstrap-icons.css"); -{{< /highlight >}} -{{< /md >}} -
-
- -## Usage - -Bootstrap Icons are SVGs, so you can include them into your HTML in a few ways depending on how your project is setup. We recommend using a `width: 1em` (and optionally `height: 1em`) for easy resizing via `font-size`. - -
-
-{{< md >}} -### Embedded -Embed your icons within the HTML of your page (as opposed to an external image file). Here we've used a custom `width` and `height`. -{{< /md >}} -
-
- {{< example >}}{{< /example >}} -
-
- -
-
-{{< md >}} -### Sprite -Use the SVG sprite to insert any icon through the `` element. Use the icon's filename as the fragment identifier (e.g., `toggles` is `#toggles`). SVG sprites allow you to reference an external file similar to an `` element, but with the power of `currentColor` for easy theming. - -**Heads up!** There's an issue with Chrome where [`` doesn't work across domains](https://bugs.chromium.org/p/chromium/issues/detail?id=470601). -{{< /md >}} -
-
- -
- - - -
-{{< highlight html >}} - - - - - - - - - -{{< /highlight >}} -
-
- -
-
-{{< md >}} -### External image -Copy the Bootstrap Icons SVGs to your directory of choice and reference them like normal images with the `` element. -{{< /md >}} -
-
- {{< example >}}Bootstrap{{< /example >}} -
-
- -
-
-{{< md >}} -### Icon font -Icon fonts with classes for every icon are also included for Bootstrap Icons. Include the icon web fonts in your page via CSS, then reference the class names as needed in your HTML (e.g., ``). - -Use `font-size` and `color` to change the icon appearance. -{{< /md >}} -
-
- {{< example >}}{{< /example >}} - {{< example >}}{{< /example >}} -
-
- -
-
-{{< md >}} -### CSS -You can also use the SVG within your CSS (**be sure to escape any characters**, such as `#` to `%23` when specifying hex color values). When no dimensions are specified via `width` and `height` on the ``, the icon will fill the available space. - -The `viewBox` attribute is required if you wish to resize icons with `background-size`. Note that the `xmlns` attribute is required. -{{< /md >}} -
-
-{{< highlight css >}} -.bi::before { - display: inline-block; - content: ""; - vertical-align: -.125em; - background-image: url("data:image/svg+xml,"); - background-repeat: no-repeat; - background-size: 1rem 1rem; -} - -{{< /highlight >}} -
-
- -
-
-{{< md >}} -## Styling -Color can be changed by setting a `.text-*` class or custom CSS: -{{< /md >}} -
-
-
- - - - -
-{{< highlight html >}} - - ... - -{{< /highlight >}} -
-
- -
-
-{{< md >}} -## Accessibility -For purely decorative icons, add `aria-hidden="true"`. Otherwise, provide an appropriate text alternative. Depending on which method you're using to add the icons, and where you're using them (e.g. as standalone images, or as the only content of a button or similar control), there are various possible approaches. Here are a few examples: -{{< /md >}} -
-
-
- Bootstrap -
-{{< highlight html >}} - -Bootstrap -{{< /highlight >}} -
- - -
-{{< highlight html >}} - - - -{{< /highlight >}} -
- -
-{{< highlight html >}} - - -{{< /highlight >}} -
-
- -
-
-{{< md >}} -## Working with SVGs -SVGs are awesome to work with, but they do have some known quirks to work around. Given the numerous ways in which SVGs can be used, we haven't included these attributes and workarounds in our code. -{{< /md >}} -
-
-{{< md >}} -Known issues include: - -- **SVGs receive focus by default in Internet Explorer and Edge Legacy.** When embedding your SVGs, add `focusable="false"` to the `` element. [Learn more on Stack Overflow.](https://stackoverflow.com/questions/18646111/disable-onfocus-event-for-svg-element) - -- **When using SVGs with `` elements, screen readers may not announce them as images, or skip the image completely.** Include an additional `role="img"` on the `` element to avoid any issues. [See this article for details.](https://simplyaccessible.com/article/7-solutions-svgs/#acc-heading-2) - -- **External SVG sprites may not function correctly in Internet Explorer.** Use the [svg4everybody](https://github.com/jonathantneal/svg4everybody) polyfill as needed. - -Found another issue with SVGs we should note? Please open [an issue]({{< param repo >}}/issues) to share details. -{{< /md >}} -
-
diff --git a/docs/content/docs.md b/docs/content/docs.md new file mode 100644 index 0000000000..d4b0bc2e6c --- /dev/null +++ b/docs/content/docs.md @@ -0,0 +1,229 @@ +--- +title: Docs +description: Learn how to install and use Bootstrap Icons in a variety of ways. +layout: +--- + +## Install + +Bootstrap Icons are published to npm, but they can also be manually downloaded if needed. + +
+
+{{< md >}} +### Package manager +Install [Bootstrap Icons](https://www.npmjs.com/package/bootstrap-icons)—including SVGs, icon sprite, and icon fonts—with npm or Composer. Then, choose how you'd like to include the icons with the [usage instructions](#usage). + +{{< highlight sh >}} +npm i bootstrap-icons +{{< /highlight >}} +{{< highlight sh >}} +composer require twbs/bootstrap-icons +{{< /highlight >}} +{{< /md >}} +
+
+{{< md >}} +### Download +[Releases are published on GitHub](https://github.com/twbs/icons/releases/) and include icon SVGs, fonts, license, and readme. Our `package.json` is also included, though our npm scripts are primarily available for our development workflows. + +Download latest ZIP +{{< /md >}} +
+
+{{< md >}} +### CDN +Include the icon fonts stylesheet—in your website `` or via `@import` in CSS—from our CDN and get started in seconds. [See icon font docs](#icon-font) for examples. + +{{< highlight html >}} + +{{< /highlight >}} + +{{< highlight css >}} +@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@{{< param version >}}/font/bootstrap-icons.css"); +{{< /highlight >}} +{{< /md >}} +
+
+ +## Usage + +Bootstrap Icons are SVGs, so you can include them into your HTML in a few ways depending on how your project is setup. We recommend using a `width: 1em` (and optionally `height: 1em`) for easy resizing via `font-size`. + +
+
+{{< md >}} +### Embedded +Embed your icons within the HTML of your page (as opposed to an external image file). Here we've used a custom `width` and `height`. +{{< /md >}} +
+
+ {{< example >}}{{< /example >}} +
+
+ +
+
+{{< md >}} +### Sprite +Use the SVG sprite to insert any icon through the `` element. Use the icon's filename as the fragment identifier (e.g., `toggles` is `#toggles`). SVG sprites allow you to reference an external file similar to an `` element, but with the power of `currentColor` for easy theming. + +**Heads up!** There's an issue with Chrome where [`` doesn't work across domains](https://bugs.chromium.org/p/chromium/issues/detail?id=470601). +{{< /md >}} +
+
+{{< example >}} + + + + + + + + + +{{< /example >}} +
+
+ +
+
+{{< md >}} +### External image +Copy the Bootstrap Icons SVGs to your directory of choice and reference them like normal images with the `` element. +{{< /md >}} +
+
+ {{< example >}}Bootstrap{{< /example >}} +
+
+ +
+
+{{< md >}} +### Icon font +Icon fonts with classes for every icon are also included for Bootstrap Icons. Include the icon web fonts in your page via CSS, then reference the class names as needed in your HTML (e.g., ``). + +Use `font-size` and `color` to change the icon appearance. +{{< /md >}} +
+
+ {{< example >}}{{< /example >}} + {{< example >}}{{< /example >}} +
+
+ +
+
+{{< md >}} +### CSS +You can also use the SVG within your CSS (**be sure to escape any characters**, such as `#` to `%23` when specifying hex color values). When no dimensions are specified via `width` and `height` on the ``, the icon will fill the available space. + +The `viewBox` attribute is required if you wish to resize icons with `background-size`. Note that the `xmlns` attribute is required. +{{< /md >}} +
+
+{{< highlight css >}} +.bi::before { + display: inline-block; + content: ""; + vertical-align: -.125em; + background-image: url("data:image/svg+xml,"); + background-repeat: no-repeat; + background-size: 1rem 1rem; +} + +{{< /highlight >}} +
+
+ +
+
+{{< md >}} +## Styling +Color can be changed by setting a `.text-*` class or custom CSS: +{{< /md >}} +
+
+
+ + + + +
+{{< highlight html >}} + + ... + +{{< /highlight >}} +
+
+ +
+
+{{< md >}} +## Accessibility +For purely decorative icons, add `aria-hidden="true"`. Otherwise, provide an appropriate text alternative. Depending on which method you're using to add the icons, and where you're using them (e.g. as standalone images, or as the only content of a button or similar control), there are various possible approaches. Here are a few examples: +{{< /md >}} +
+
+
+ Bootstrap +
+{{< highlight html >}} + +Bootstrap +{{< /highlight >}} +
+ +
+{{< highlight html >}} + +{{< /highlight >}} +
+ + + +
+{{< highlight html >}} + + + +{{< /highlight >}} +
+ +
+{{< highlight html >}} + + +{{< /highlight >}} +
+
+ +
+
+{{< md >}} +## Working with SVGs +SVGs are awesome to work with, but they do have some known quirks to work around. Given the numerous ways in which SVGs can be used, we haven't included these attributes and workarounds in our code. +{{< /md >}} +
+
+{{< md >}} +Known issues include: + +- **SVGs receive focus by default in Internet Explorer and Edge Legacy.** When embedding your SVGs, add `focusable="false"` to the `` element. [Learn more on Stack Overflow.](https://stackoverflow.com/questions/18646111/disable-onfocus-event-for-svg-element) + +- **When using SVGs with `` elements, screen readers may not announce them as images, or skip the image completely.** Include an additional `role="img"` on the `` element to avoid any issues. [See this article for details.](https://simplyaccessible.com/article/7-solutions-svgs/#acc-heading-2) + +- **External SVG sprites may not function correctly in Internet Explorer.** Use the [svg4everybody](https://github.com/jonathantneal/svg4everybody) polyfill as needed. + +Found another issue with SVGs we should note? Please open [an issue]({{< param repo >}}/issues) to share details. +{{< /md >}} +
+
diff --git a/docs/content/icons/box-arrow-down-left.md b/docs/content/icons/box-arrow-down-left.md index d687e293f7..265b3fb36a 100644 --- a/docs/content/icons/box-arrow-down-left.md +++ b/docs/content/icons/box-arrow-down-left.md @@ -1,7 +1,7 @@ --- title: Box arrow bottom-left categories: - - Box arrows + - Arrows tags: - arrow --- diff --git a/docs/content/icons/box-arrow-down-right.md b/docs/content/icons/box-arrow-down-right.md index f9f97f53af..499aaa283b 100644 --- a/docs/content/icons/box-arrow-down-right.md +++ b/docs/content/icons/box-arrow-down-right.md @@ -1,7 +1,7 @@ --- title: Box arrow bottom-right categories: - - Box arrows + - Arrows tags: - arrow --- diff --git a/docs/content/icons/box-arrow-down.md b/docs/content/icons/box-arrow-down.md index 8aa344f5c9..7d34271a0e 100644 --- a/docs/content/icons/box-arrow-down.md +++ b/docs/content/icons/box-arrow-down.md @@ -1,7 +1,7 @@ --- title: Box arrow down categories: - - Box arrows + - Arrows tags: - arrow - download diff --git a/docs/content/icons/box-arrow-in-down-left.md b/docs/content/icons/box-arrow-in-down-left.md index 2bdf1e5161..7d66516910 100644 --- a/docs/content/icons/box-arrow-in-down-left.md +++ b/docs/content/icons/box-arrow-in-down-left.md @@ -1,7 +1,7 @@ --- title: Box arrow in down left categories: - - Box arrows + - Arrows tags: - arrow --- diff --git a/docs/content/icons/box-arrow-in-down-right.md b/docs/content/icons/box-arrow-in-down-right.md index 5d55af3133..b7c8eb7699 100644 --- a/docs/content/icons/box-arrow-in-down-right.md +++ b/docs/content/icons/box-arrow-in-down-right.md @@ -1,7 +1,7 @@ --- title: Box arrow in down right categories: - - Box arrows + - Arrows tags: - arrow --- diff --git a/docs/content/icons/box-arrow-in-down.md b/docs/content/icons/box-arrow-in-down.md index 19b2a2a2b3..84d5dd59ae 100644 --- a/docs/content/icons/box-arrow-in-down.md +++ b/docs/content/icons/box-arrow-in-down.md @@ -1,7 +1,7 @@ --- title: Box arrow in down categories: - - Box arrows + - Arrows tags: - arrow - upload diff --git a/docs/content/icons/box-arrow-in-left.md b/docs/content/icons/box-arrow-in-left.md index 7ff03377bc..6c5a130576 100644 --- a/docs/content/icons/box-arrow-in-left.md +++ b/docs/content/icons/box-arrow-in-left.md @@ -1,7 +1,7 @@ --- title: Box arrow in left categories: - - Box arrows + - Arrows tags: - arrow - login diff --git a/docs/content/icons/box-arrow-in-right.md b/docs/content/icons/box-arrow-in-right.md index 3c1220ba8a..a4bea3ffae 100644 --- a/docs/content/icons/box-arrow-in-right.md +++ b/docs/content/icons/box-arrow-in-right.md @@ -1,7 +1,7 @@ --- title: Box arrow in right categories: - - Box arrows + - Arrows tags: - arrow - login diff --git a/docs/content/icons/box-arrow-in-up-left.md b/docs/content/icons/box-arrow-in-up-left.md index 806dcd2004..9f50674ec5 100644 --- a/docs/content/icons/box-arrow-in-up-left.md +++ b/docs/content/icons/box-arrow-in-up-left.md @@ -1,7 +1,7 @@ --- title: Box arrow in up left categories: - - Box arrows + - Arrows tags: - arrow --- diff --git a/docs/content/icons/box-arrow-in-up-right.md b/docs/content/icons/box-arrow-in-up-right.md index 17a47cbe4a..fabea218ff 100644 --- a/docs/content/icons/box-arrow-in-up-right.md +++ b/docs/content/icons/box-arrow-in-up-right.md @@ -1,7 +1,7 @@ --- title: Box arrow in up right categories: - - Box arrows + - Arrows tags: - arrow --- diff --git a/docs/content/icons/box-arrow-in-up.md b/docs/content/icons/box-arrow-in-up.md index 232e5c8a16..59ec2ef6fe 100644 --- a/docs/content/icons/box-arrow-in-up.md +++ b/docs/content/icons/box-arrow-in-up.md @@ -1,7 +1,7 @@ --- title: Box arrow in up categories: - - Box arrows + - Arrows tags: - arrow --- diff --git a/docs/content/icons/box-arrow-left.md b/docs/content/icons/box-arrow-left.md index 88adbfc3d9..1c917d217e 100644 --- a/docs/content/icons/box-arrow-left.md +++ b/docs/content/icons/box-arrow-left.md @@ -1,7 +1,7 @@ --- title: Box arrow left categories: - - Box arrows + - Arrows tags: - arrow - logout diff --git a/docs/content/icons/box-arrow-right.md b/docs/content/icons/box-arrow-right.md index ee391b0024..95c5ddeb49 100644 --- a/docs/content/icons/box-arrow-right.md +++ b/docs/content/icons/box-arrow-right.md @@ -1,7 +1,7 @@ --- title: Box arrow right categories: - - Box arrows + - Arrows tags: - arrow - logout diff --git a/docs/content/icons/box-arrow-up-left.md b/docs/content/icons/box-arrow-up-left.md index bcf56be640..ccb0ac743d 100644 --- a/docs/content/icons/box-arrow-up-left.md +++ b/docs/content/icons/box-arrow-up-left.md @@ -1,7 +1,7 @@ --- title: Box arrow up-left categories: - - Box arrows + - Arrows tags: - arrow - external link diff --git a/docs/content/icons/box-arrow-up-right.md b/docs/content/icons/box-arrow-up-right.md index cbbc407fd4..6991ed2205 100644 --- a/docs/content/icons/box-arrow-up-right.md +++ b/docs/content/icons/box-arrow-up-right.md @@ -1,7 +1,7 @@ --- title: Box arrow up-right categories: - - Box arrows + - Arrows tags: - arrow - external link diff --git a/docs/content/icons/box-arrow-up.md b/docs/content/icons/box-arrow-up.md index f8219ccdac..83c893140b 100644 --- a/docs/content/icons/box-arrow-up.md +++ b/docs/content/icons/box-arrow-up.md @@ -1,7 +1,7 @@ --- title: Box arrow up categories: - - Box arrows + - Arrows tags: - arrow --- diff --git a/docs/content/icons/hand-thumbs-down-fill.md b/docs/content/icons/hand-thumbs-down-fill.md index 8a3c2881a2..18fbc095c8 100644 --- a/docs/content/icons/hand-thumbs-down-fill.md +++ b/docs/content/icons/hand-thumbs-down-fill.md @@ -6,5 +6,4 @@ tags: - hand - pointer - thumbs-down - - "-1" --- diff --git a/docs/content/icons/hand-thumbs-down.md b/docs/content/icons/hand-thumbs-down.md index 0c44a2c059..d46d78d07b 100644 --- a/docs/content/icons/hand-thumbs-down.md +++ b/docs/content/icons/hand-thumbs-down.md @@ -6,5 +6,4 @@ tags: - hand - pointer - thumbs-down - - "-1" --- diff --git a/docs/content/icons/hand-thumbs-up-fill.md b/docs/content/icons/hand-thumbs-up-fill.md index a81a7c6331..a44aa58582 100644 --- a/docs/content/icons/hand-thumbs-up-fill.md +++ b/docs/content/icons/hand-thumbs-up-fill.md @@ -6,5 +6,4 @@ tags: - hand - pointer - thumbs-up - - "+1" --- diff --git a/docs/content/icons/hand-thumbs-up.md b/docs/content/icons/hand-thumbs-up.md index d5060fc892..356b20b69c 100644 --- a/docs/content/icons/hand-thumbs-up.md +++ b/docs/content/icons/hand-thumbs-up.md @@ -6,5 +6,4 @@ tags: - hand - pointer - thumbs-up - - "+1" --- diff --git a/docs/content/icons/plugin.md b/docs/content/icons/plugin.md index 965a515766..b89b9da148 100644 --- a/docs/content/icons/plugin.md +++ b/docs/content/icons/plugin.md @@ -1,7 +1,7 @@ --- title: Plugin categories: - - UI + - UI and keyboard tags: - addon - software diff --git a/docs/layouts/_default/baseof.html b/docs/layouts/_default/baseof.html new file mode 100644 index 0000000000..5a7df61bf1 --- /dev/null +++ b/docs/layouts/_default/baseof.html @@ -0,0 +1,18 @@ + + + + {{ partial "head" . }} + + + {{ partialCached "skippy" . }} + {{ partialCached "navbar" . }} + {{ block "hero" . }}{{ end }} + +
+ {{ block "main" . }}{{ end }} +
+ + {{- partialCached "footer" . }} + {{- partialCached "scripts" . }} + + diff --git a/docs/layouts/_default/home.html b/docs/layouts/_default/home.html index 7c458cd7ef..af4a5620cb 100644 --- a/docs/layouts/_default/home.html +++ b/docs/layouts/_default/home.html @@ -1,19 +1,44 @@ - - - - {{ partial "head" . }} - - - {{ partialCached "skippy" . }} - {{ partialCached "navbar" . }} - {{ partialCached "home/hero" . }} +{{ define "hero" }} + {{ partialCached "home/hero" . }} +{{ end }} -
- {{ partialCached "icons" . "home" }} - {{ .Content }} -
+{{ define "main" }} +
+
+
+ - {{- partialCached "footer" . }} - {{- partialCached "scripts" . "home" }} - - +
Documentation
+ +
Categories
+ +
+
+
+ {{ partialCached "icons" . "home" }} +
+
+{{ end }} diff --git a/docs/layouts/_default/sprite.html b/docs/layouts/_default/sprite.html index f44f914816..1cb7043d9e 100644 --- a/docs/layouts/_default/sprite.html +++ b/docs/layouts/_default/sprite.html @@ -1,25 +1,9 @@ - - - - {{ partial "head" . }} - - - {{ partialCached "skippy" . }} - {{ partialCached "navbar" . }} - -
- - {{ partialCached "icons" . "fonts" }} - - {{ .Content }} -
- - {{- partialCached "footer" . }} - {{- partialCached "scripts" . "fonts" }} - - +{{ define "main" }} + + {{ partialCached "icons" . "fonts" }} +{{ end }} diff --git a/docs/layouts/_default/taxonomy.html b/docs/layouts/_default/taxonomy.html new file mode 100644 index 0000000000..325ebac5f3 --- /dev/null +++ b/docs/layouts/_default/taxonomy.html @@ -0,0 +1,23 @@ +{{ define "main" }} + + +

All {{ .Type }}

+
+ {{ range .Data.Pages -}} + +
+ {{ range first 10 (where .Data.Pages ".Params.categories" "intersect" (slice .Title)) -}} + {{- $name := .Title | urlize -}} + + {{ end -}} +
+

{{ .Title }}

+
+ {{ end -}} +
+{{ end -}} diff --git a/docs/layouts/_default/term.html b/docs/layouts/_default/term.html new file mode 100644 index 0000000000..f630414912 --- /dev/null +++ b/docs/layouts/_default/term.html @@ -0,0 +1,25 @@ +{{ define "main" }} + +
+
+

+ {{ .Title | humanize }} icons +

+ +
+ +
+{{ end }} diff --git a/docs/layouts/icons/single.html b/docs/layouts/icons/single.html index 0d791da886..d1b883a3f2 100644 --- a/docs/layouts/icons/single.html +++ b/docs/layouts/icons/single.html @@ -1,154 +1,150 @@ - - - - {{ partial "head" . }} - - - {{ partialCached "skippy" . }} - {{ partialCached "navbar" . }} +{{ define "main" }} + -
- +
+
+

{{ .Title }}

-
-
-

{{ .Title }}

+ {{ if or .Params.tags .Params.categories -}} +
    +
  • + Category: + {{ range .Params.categories -}} + {{ . }} + {{ end -}} +
  • +
  • + Tags: + {{ range .Params.tags -}} + {{ . }} + {{ end -}} +
  • +
+ {{- end }} +
+
+ {{ partialCached "ads" . }} +
+
- {{ if or .Params.tags .Params.categories -}} -
    - {{ with .Params.tags }}
  • Tags: {{ delimit . ", " }}
  • {{ end }} - {{ with .Params.categories }}
  • Category: {{ delimit . ", " }}
  • {{ end }} -
- {{- end }} -
-
- {{ partialCached "ads" . }} -
-
+
-
+ {{- $localSvgPath := printf "/icons/%s.svg" .File.TranslationBaseName -}} + {{- $svgPath := path.Join "/assets/" $localSvgPath -}} + {{- $svgHtml := readFile $localSvgPath | chomp | safeHTML -}} - {{- $localSvgPath := printf "/icons/%s.svg" .File.TranslationBaseName -}} - {{- $svgPath := path.Join "/assets/" $localSvgPath -}} - {{- $svgHtml := readFile $localSvgPath | chomp | safeHTML -}} +
+
+ -
-
-
- {{- partialCached "footer" . }} - {{- partialCached "scripts" . "default" }} - - +

Copy HTML

+

Paste the SVG right into your project's code.

+ + + + {{ highlight $svgHtml "html" "" }} + + +{{ end }} diff --git a/docs/layouts/partials/home/hero.html b/docs/layouts/partials/home/hero.html index e295fb1ed0..84115cb923 100644 --- a/docs/layouts/partials/home/hero.html +++ b/docs/layouts/partials/home/hero.html @@ -26,9 +26,9 @@

Bootstrap Icons

{{ partialCached "ads" . }} -
+
-

+

Currently v{{ .Site.Params.version }} Icons diff --git a/docs/layouts/partials/icon.html b/docs/layouts/partials/icon.html new file mode 100644 index 0000000000..bb5899d427 --- /dev/null +++ b/docs/layouts/partials/icon.html @@ -0,0 +1,17 @@ +{{- $filename := .File.TranslationBaseName -}} +{{- with .Site.GetPage .File.Path }} +

  • + +
    + {{ if $.IsHome -}} + + {{- else -}} + + + + {{- end }} +
    +
    {{ $filename }}
    +
    +
  • +{{- end }} diff --git a/docs/layouts/partials/icons.html b/docs/layouts/partials/icons.html index b9c9b26ac8..70a8b3c499 100644 --- a/docs/layouts/partials/icons.html +++ b/docs/layouts/partials/icons.html @@ -1,30 +1,28 @@
    -
    -

    Icons

    - -
    -