aboutsummaryrefslogtreecommitdiff
path: root/generators
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2022-07-07 06:36:40 -0400
committerThedro Neely <thedroneely@gmail.com>2022-07-07 06:36:40 -0400
commit0c8782d62e45f78b821663ecddffd78a4446c8f6 (patch)
tree4541f98e4ca23607e14e65517433bdfe94431781 /generators
parent203b2889f124ac84db842baee4722379f234b7f6 (diff)
downloadthedroneely.com-0c8782d62e45f78b821663ecddffd78a4446c8f6.tar.gz
thedroneely.com-0c8782d62e45f78b821663ecddffd78a4446c8f6.tar.bz2
thedroneely.com-0c8782d62e45f78b821663ecddffd78a4446c8f6.zip
generators/hugo/layouts/shortcodes: Add mark
Diffstat (limited to 'generators')
-rw-r--r--generators/hugo/themes/tdro/layouts/shortcodes/mark.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/mark.html b/generators/hugo/themes/tdro/layouts/shortcodes/mark.html
new file mode 100644
index 0000000..3558a02
--- /dev/null
+++ b/generators/hugo/themes/tdro/layouts/shortcodes/mark.html
@@ -0,0 +1,9 @@
+{{- $text := default "mark" (.Get "text" | default (.Get 0)) -}}
+{{- $title := default "highlighted text" (.Get "title" | default (.Get 1)) -}}
+
+{{- if gt (len .Inner) 1 -}}
+ {{- $text = .Inner -}}
+{{- end -}}
+
+<mark title="{{- $title -}}">{{- $text | markdownify -}}</mark>
+{{- /* This comment removes trailing newlines and white spaces. */ -}}