From d0ab6506120b3dd45eb211340912be89b9522bee Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 28 Aug 2022 19:56:36 +0300 Subject: 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 --- .fantasticonrc.js | 2 +- build/font/html.hbs | 53 - docs/content/font.md | 5 + docs/layouts/_default/font.html | 25 + docs/layouts/_default/home.html | 5 +- docs/layouts/partials/home/hero.html | 4 +- docs/layouts/partials/icons.html | 4 + docs/layouts/partials/scripts.html | 2 +- docs/layouts/partials/stylesheet.html | 2 - font/index.html | 7291 --------------------------------- 10 files changed, 41 insertions(+), 7352 deletions(-) delete mode 100644 build/font/html.hbs create mode 100644 docs/content/font.md create mode 100644 docs/layouts/_default/font.html delete mode 100644 font/index.html diff --git a/.fantasticonrc.js b/.fantasticonrc.js index 6a561f176..e786ae087 100644 --- a/.fantasticonrc.js +++ b/.fantasticonrc.js @@ -6,7 +6,7 @@ module.exports = { inputDir: './icons', // (required) outputDir: './font', // (required) fontTypes: ['woff2', 'woff'], - assetTypes: ['css', 'scss', 'json', 'html'], + assetTypes: ['css', 'scss', 'json'], name: 'bootstrap-icons', codepoints, prefix: 'bi', diff --git a/build/font/html.hbs b/build/font/html.hbs deleted file mode 100644 index 0639a3a43..000000000 --- a/build/font/html.hbs +++ /dev/null @@ -1,53 +0,0 @@ - - - - - {{ name }} - - - - - - - - -

{{ name }}

- -
- {{# each assets }} -
- <{{ ../tag }} class="{{ ../prefix }} {{ ../prefix }}-{{ @key }}"> -
{{ @key }}
-
- {{/ each }} -
- - - 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 @@ + + + + {{ partial "head" . }} + + + {{ partialCached "skippy" . }} + {{ partialCached "navbar" . }} + +
+ + {{ partialCached "icons" . "fonts" }} + + {{ .Content }} +
+ + {{- partialCached "footer" . }} + {{- partialCached "scripts" . "fonts" }} + + 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" . }} -
- {{ partialCached "icons" . }} - +
+ {{ partialCached "icons" . "home" }} {{ .Content }}
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 @@
-
+
Icons + Icon Font + Install Usage 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 @@
  • + {{ if $.IsHome -}} + {{- else -}} + + {{- end }}
    {{ $filename }}
    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" }} -{{- if .IsHome }} +{{- if or .IsHome (eq .Page.Layout "font") }}