From 183ecfda0314eb7d93412d38c576c407e0ffa3ea Mon Sep 17 00:00:00 2001 From: Will Date: Fri, 22 Jan 2021 14:31:39 -0800 Subject: [PATCH] Replace sas-emojis template --- .../modules/end_to_end_encryption.md | 2 +- layouts/shortcodes/sas-emojis.html | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 layouts/shortcodes/sas-emojis.html diff --git a/content/client-server-api/modules/end_to_end_encryption.md b/content/client-server-api/modules/end_to_end_encryption.md index 403ec05d..4dc69c95 100644 --- a/content/client-server-api/modules/end_to_end_encryption.md +++ b/content/client-server-api/modules/end_to_end_encryption.md @@ -729,7 +729,7 @@ into 7 groups of 6 bits, similar to how one would base64 encode something. Convert each group of 6 bits to a number and use the following table to get the corresponding emoji: -{{sas\_emoji\_table}} +{{% sas-emojis %}} {{% boxes/note %}} This table is available as JSON at diff --git a/layouts/shortcodes/sas-emojis.html b/layouts/shortcodes/sas-emojis.html new file mode 100644 index 00000000..5ce6a009 --- /dev/null +++ b/layouts/shortcodes/sas-emojis.html @@ -0,0 +1,26 @@ +{{/* + + This template is used to render the table of SAS emoji table. + + It replaces the old {{sas_emoji_table}} template. + +*/}} + +{{ $emoji_json := readFile "data-definitions/sas-emoji.json" | transform.Unmarshal }} + + + + + + + + +{{ range $emoji_json }} + + + + + + +{{ end }} +
NumberEmojiUnicodeDescription
{{ .number }}{{ .emoji }}{{ .unicode }}{{ .description }}