diff options
author | korki <65349313+korki43@users.noreply.github.com> | 2021-12-19 01:03:34 +0300 |
---|---|---|
committer | Mark Otto <otto@github.com> | 2022-01-21 22:55:27 +0300 |
commit | b321381a2371cdcb1ace8ae4df1528b3437d7f6a (patch) | |
tree | 754f5dc2f6f2fb4ea582ff66e01416fb8c062912 | |
parent | f044b799019eacd1605b9cc31d2570da0fbc2808 (diff) |
add font code point to icon page
-rw-r--r-- | docs/layouts/icons/single.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/layouts/icons/single.html b/docs/layouts/icons/single.html index 0884587d7..3c8dc2deb 100644 --- a/docs/layouts/icons/single.html +++ b/docs/layouts/icons/single.html @@ -116,6 +116,19 @@ {{- highlight $iconFontSnippet "html" "" }} </div> + <h2 class="fs-3">Code point</h2> + <div class="mb-4"> + {{ $codepoints := getJSON "font/bootstrap-icons.json" -}} + {{ $hexCodepoint := printf "%X" (int (index $codepoints .File.TranslationBaseName)) }} + <p> + Unicode: <code>U+{{- $hexCodepoint}}</code><br/> + CSS: <code>\{{- $hexCodepoint}}</code><br/> + JS: <code>\u{{- $hexCodepoint}}</code><br/> + HTML: <code>&#x{{- $hexCodepoint}};</code> + </p> + </div> + + <h2 class="fs-3">Copy HTML</h2> <p>Paste the SVG right into your project's code.</p> |