diff options
author | XhmikosR <xhmikosr@gmail.com> | 2022-08-28 19:56:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-28 19:56:36 +0300 |
commit | d0ab6506120b3dd45eb211340912be89b9522bee (patch) | |
tree | d68ed4be1781cd7d419c317c1233bf6a317fdded /docs | |
parent | 43dac5682d3893ab1d526900b5be41d97c6c5253 (diff) |
Generate font page with Hugo (#706)
* Generate font page with Hugo
* fix
* fix font path
* Fix up stylesheet URLs
* Add description
Co-authored-by: Mark Otto <markdotto@gmail.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/font.md | 5 | ||||
-rw-r--r-- | docs/layouts/_default/font.html | 25 | ||||
-rw-r--r-- | docs/layouts/_default/home.html | 5 | ||||
-rw-r--r-- | docs/layouts/partials/home/hero.html | 4 | ||||
-rw-r--r-- | docs/layouts/partials/icons.html | 4 | ||||
-rw-r--r-- | docs/layouts/partials/scripts.html | 2 | ||||
-rw-r--r-- | docs/layouts/partials/stylesheet.html | 2 |
7 files changed, 40 insertions, 7 deletions
diff --git a/docs/content/font.md b/docs/content/font.md new file mode 100644 index 000000000..8b16fb861 --- /dev/null +++ b/docs/content/font.md @@ -0,0 +1,5 @@ +--- +title: Icon Font +description: Use Bootstrap Icons as an icon font, built from our SVGs and easily customized with CSS. +layout: font +--- diff --git a/docs/layouts/_default/font.html b/docs/layouts/_default/font.html new file mode 100644 index 000000000..e525458d7 --- /dev/null +++ b/docs/layouts/_default/font.html @@ -0,0 +1,25 @@ +<!doctype html> +<html lang="en"> + <head> + {{ partial "head" . }} + </head> + <body id="icons-body" class="text-center"> + {{ partialCached "skippy" . }} + {{ partialCached "navbar" . }} + + <main class="container-xxl bd-gutter" id="content"> + <nav aria-label="breadcrumb"> + <ol class="breadcrumb my-4 p-0"> + <li class="breadcrumb-item"><a href="/">Icons</a></li> + <li class="breadcrumb-item active" aria-current="page">Font</li> + </ol> + </nav> + {{ partialCached "icons" . "fonts" }} + + {{ .Content }} + </main> + + {{- partialCached "footer" . }} + {{- partialCached "scripts" . "fonts" }} + </body> +</html> diff --git a/docs/layouts/_default/home.html b/docs/layouts/_default/home.html index 27a4f6f7b..7c458cd7e 100644 --- a/docs/layouts/_default/home.html +++ b/docs/layouts/_default/home.html @@ -8,9 +8,8 @@ {{ partialCached "navbar" . }} {{ partialCached "home/hero" . }} - <main class="container" id="content"> - {{ partialCached "icons" . }} - + <main class="container-xxl bd-gutter" id="content"> + {{ partialCached "icons" . "home" }} {{ .Content }} </main> diff --git a/docs/layouts/partials/home/hero.html b/docs/layouts/partials/home/hero.html index b9851b853..1f6e5f996 100644 --- a/docs/layouts/partials/home/hero.html +++ b/docs/layouts/partials/home/hero.html @@ -1,5 +1,5 @@ <div class="hero py-5 text-center text-lg-start"> - <div class="container"> + <div class="container-xxl bd-gutter"> <div class="row flex-lg-row-reverse"> <div class="col-6 mx-auto col-lg-5 mx-lg-0"> <img srcset="/assets/img/icons-hero.png, /assets/img/icons-hero@2x.png 2x" @@ -33,6 +33,8 @@ <span class="px-1">•</span> <a href="#icons">Icons</a> <span class="px-1">•</span> + <a href="/font">Icon Font</a> + <span class="px-1">•</span> <a href="#install">Install</a> <span class="px-1">•</span> <a href="#usage">Usage</a> diff --git a/docs/layouts/partials/icons.html b/docs/layouts/partials/icons.html index bab633c79..438d00433 100644 --- a/docs/layouts/partials/icons.html +++ b/docs/layouts/partials/icons.html @@ -13,9 +13,13 @@ <li class="col mb-4"{{ with .Params.tags }} data-tags="{{ delimit . " " }}"{{ end }}{{ with .Params.categories }} data-categories="{{ delimit . " " | lower }}"{{ end }}> <a class="d-block text-dark text-decoration-none" href="{{ .RelPermalink }}"> <div class="p-3 py-4 mb-2 bg-light text-center rounded"> + {{ if $.IsHome -}} <svg class="bi" width="1em" height="1em" fill="currentColor"> <use xlink:href="bootstrap-icons.svg#{{ $filename }}"/> </svg> + {{- else -}} + <i class="bi bi-{{ $filename }}"></i> + {{- end }} </div> <div class="name text-muted text-decoration-none text-center pt-1">{{ $filename }}</div> </a> diff --git a/docs/layouts/partials/scripts.html b/docs/layouts/partials/scripts.html index 2edf5b151..059c1f62a 100644 --- a/docs/layouts/partials/scripts.html +++ b/docs/layouts/partials/scripts.html @@ -1,7 +1,7 @@ {{ $bootstrapJs := resources.Get "/js/bootstrap.min.js" }} <script src="{{ $bootstrapJs.Permalink | relURL }}"></script> -{{- if .IsHome }} +{{- if or .IsHome (eq .Page.Layout "font") }} <script src="/assets/js/list.min.js"></script> <script> new List('icons-body', { diff --git a/docs/layouts/partials/stylesheet.html b/docs/layouts/partials/stylesheet.html index 49a612f96..f80dad467 100644 --- a/docs/layouts/partials/stylesheet.html +++ b/docs/layouts/partials/stylesheet.html @@ -1,6 +1,4 @@ -{{- if eq .Layout "home" -}} <link rel="stylesheet" href="/assets/font/bootstrap-icons.css"> -{{- end -}} {{- $sassOptions := dict "targetPath" "assets/css/docs.css" "precision" 6 -}} {{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}} |