From 39a1926f77061281fdc6ea4be0f1a62ccd4a06e5 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 19 Jul 2019 14:39:39 +0300 Subject: [PATCH] Automate icons docs. --- site/content/docs/4.3/components/icons.md | 394 +--------------------- site/layouts/shortcodes/svg.html | 2 - 2 files changed, 16 insertions(+), 380 deletions(-) delete mode 100644 site/layouts/shortcodes/svg.html diff --git a/site/content/docs/4.3/components/icons.md b/site/content/docs/4.3/components/icons.md index e82e878e306c..e6c6c0b7fa03 100644 --- a/site/content/docs/4.3/components/icons.md +++ b/site/content/docs/4.3/components/icons.md @@ -19,384 +19,22 @@ Meet the Bootstrap icons, a limited set of icons designed first and foremost to - - Bootstrap - - {{< svg "/docs/4.3/icons/bootstrap-solid.svg" >}} - - - .bi-bootstrap-solid - - - - Bootstrap - - {{< svg "/docs/4.3/icons/bootstrap-outline.svg" >}} - - - .bi-bootstrap-outline - - - - Reboot - - {{< svg "/docs/4.3/icons/reboot.svg" >}} - - - .bi-reboot - - - - Arrow left - - {{< svg "/docs/4.3/icons/arrow-left.svg" >}} - - - .bi-arrow-left - - - - Arrow right - - {{< svg "/docs/4.3/icons/arrow-right.svg" >}} - - - .bi-arrow-right - - - - Arrow up - - {{< svg "/docs/4.3/icons/arrow-up.svg" >}} - - - .bi-arrow-up - - - - Arrow down - - {{< svg "/docs/4.3/icons/arrow-down.svg" >}} - - - .bi-arrow-down - - - - Resize - - {{< svg "/docs/4.3/icons/resize.svg" >}} - - - .bi-resize - - - - Check - - {{< svg "/docs/4.3/icons/check.svg" >}} - - - .bi-check - - - - Chevron left - - {{< svg "/docs/4.3/icons/chevron-left.svg" >}} - - - .bi-chevron-left - - - - Chevron right - - {{< svg "/docs/4.3/icons/chevron-right.svg" >}} - - - .bi-chevron-right - - - - Chevron up - - {{< svg "/docs/4.3/icons/chevron-up.svg" >}} - - - .bi-chevron-up - - - - Chevron down - - {{< svg "/docs/4.3/icons/chevron-down.svg" >}} - - - .bi-chevron-down - - - - Chevron condensed left - - {{< svg "/docs/4.3/icons/chevron-condensed-left.svg" >}} - - - .bi-chevron-condensed-left - - - - Chevron condensed right - - {{< svg "/docs/4.3/icons/chevron-condensed-right.svg" >}} - - - .bi-chevron-condensed-right - - - - Circle - - {{< svg "/docs/4.3/icons/circle.svg" >}} - - - .bi-circle - - - - Dash - - {{< svg "/docs/4.3/icons/dash.svg" >}} - - - .bi-dash - - - - Plus - - {{< svg "/docs/4.3/icons/plus.svg" >}} - - - .bi-plus - - - - Dot - - {{< svg "/docs/4.3/icons/dot.svg" >}} - - - .bi-dot - - - - Code - - {{< svg "/docs/4.3/icons/code.svg" >}} - - - .bi-code - - - - Display - - {{< svg "/docs/4.3/icons/display.svg" >}} - - - .bi-display - - - - Heart filled - - {{< svg "/docs/4.3/icons/heart-filled.svg" >}} - - - .bi-heart-filled - - - - Heart outline - - {{< svg "/docs/4.3/icons/heart-outline.svg" >}} - - - .bi-heart-filled - - - - Image - - {{< svg "/docs/4.3/icons/image.svg" >}} - - - .bi-image - - - - Text left - - {{< svg "/docs/4.3/icons/text-left.svg" >}} - - - .bi-text-left - - - - Text center - - {{< svg "/docs/4.3/icons/text-center.svg" >}} - - - .bi-text-center - - - - Text right - - {{< svg "/docs/4.3/icons/text-right.svg" >}} - - - .bi-text-right - - - - Justify left - - {{< svg "/docs/4.3/icons/justify-left.svg" >}} - - - .bi-justify-left - - - - Justify - - {{< svg "/docs/4.3/icons/justify.svg" >}} - - - .bi-justify - - - - Justify right - - {{< svg "/docs/4.3/icons/justify-right.svg" >}} - - - .bi-justify-right - - - - Ellipsis - - {{< svg "/docs/4.3/icons/ellipsis.svg" >}} - - - .bi-ellipsis - - - - Typography - - {{< svg "/docs/4.3/icons/type.svg" >}} - - - .bi-type - - - - Bold - - {{< svg "/docs/4.3/icons/bold.svg" >}} - - - .bi-bold - - - - Italic - - {{< svg "/docs/4.3/icons/italic.svg" >}} - - - .bi-italic - - - - Underline - - {{< svg "/docs/4.3/icons/underline.svg" >}} - - - .bi-underline - - - - Person - - {{< svg "/docs/4.3/icons/person.svg" >}} - - - .bi-person - - - - People - - {{< svg "/docs/4.3/icons/people.svg" >}} - - - .bi-people - - - - Star filled - - {{< svg "/docs/4.3/icons/star-filled.svg" >}} - - - .bi-star-filled - - - - Star outline - - {{< svg "/docs/4.3/icons/star-outline.svg" >}} - - - .bi-star-outline - - - - Search - - - - - .bi-search - - - - Warning - - {{< svg "/docs/4.3/icons/warning.svg" >}} - - - .bi-warning - - - - X - - {{< svg "/docs/4.3/icons/x.svg" >}} - - - .bi-x - - + {{< listIcons.inline >}} + {{- $dirName := printf "site/content/docs/%s/icons/" .Site.Params.docs_version -}} + + {{- range (readDir $dirName) -}} + {{- $filenameWithExt := split .Name "." -}} + {{- $filename := index $filenameWithExt 0 -}} + {{- $name := humanize $filename -}} + + {{ $name }} + {{ readFile (printf "%s%s" $dirName .Name) }} + + .bi-{{ $filename }} + + + {{ end -}} + {{< /listIcons.inline >}} diff --git a/site/layouts/shortcodes/svg.html b/site/layouts/shortcodes/svg.html deleted file mode 100644 index df864517cfa8..000000000000 --- a/site/layouts/shortcodes/svg.html +++ /dev/null @@ -1,2 +0,0 @@ -{{ $file := (.Get 0) | readFile }} -{{ print $file | safeHTML }}