Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/icons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorkorki <65349313+korki43@users.noreply.github.com>2021-12-19 01:03:34 +0300
committerMark Otto <otto@github.com>2022-01-21 22:55:27 +0300
commitb321381a2371cdcb1ace8ae4df1528b3437d7f6a (patch)
tree754f5dc2f6f2fb4ea582ff66e01416fb8c062912 /docs
parentf044b799019eacd1605b9cc31d2570da0fbc2808 (diff)
add font code point to icon page
Diffstat (limited to 'docs')
-rw-r--r--docs/layouts/icons/single.html13
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>&amp;#x{{- $hexCodepoint}};</code>
+ </p>
+ </div>
+
+
<h2 class="fs-3">Copy HTML</h2>
<p>Paste the SVG right into your project's code.</p>