aboutsummaryrefslogtreecommitdiff
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
parent203b2889f124ac84db842baee4722379f234b7f6 (diff)
downloadthedroneely.com-0c8782d62e45f78b821663ecddffd78a4446c8f6.tar.gz
thedroneely.com-0c8782d62e45f78b821663ecddffd78a4446c8f6.tar.bz2
thedroneely.com-0c8782d62e45f78b821663ecddffd78a4446c8f6.zip
generators/hugo/layouts/shortcodes: Add mark
-rw-r--r--generators/hugo/themes/tdro/layouts/shortcodes/mark.html9
-rw-r--r--public/css/tdro-dark.css1
-rw-r--r--public/css/tdro.css6
3 files changed, 15 insertions, 1 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. */ -}}
diff --git a/public/css/tdro-dark.css b/public/css/tdro-dark.css
index 4369113..556183f 100644
--- a/public/css/tdro-dark.css
+++ b/public/css/tdro-dark.css
@@ -232,6 +232,7 @@ textarea:-ms-input-placeholder {
.timeline .timeline-item .timeline-marker {
border: 3px solid #001f2c !important;
}
+article > mark,
.sidenote-container:hover .sidenote-mark span,
.sidenote-container:hover .sidenote mark,
.marginnote-container:hover .marginnote-mark span,
diff --git a/public/css/tdro.css b/public/css/tdro.css
index e90183d..1ac9e18 100644
--- a/public/css/tdro.css
+++ b/public/css/tdro.css
@@ -17,6 +17,7 @@
.highlight:not(:last-child),
.level:not(:last-child),
.list:not(:last-child),
+article > mark:not(:last-child),
.message:not(:last-child) {
margin-bottom: 1.5rem;
}
@@ -1315,6 +1316,7 @@ textarea,
}
.serif,
+article > mark,
.document ol li,
.document > ul li {
font-family: Charter, Georgia, "Book Antiqua", serif;
@@ -1332,6 +1334,7 @@ blockquote > p.serif {
color: #000;
}
+article > mark,
.is-size-serif {
font-size: 1.25rem !important;
}
@@ -2051,11 +2054,12 @@ input.marginnote-toggle {
top: -0.5rem;
}
-mark {
+.sidenote-container mark {
background-color: transparent;
color: unset;
}
+article > mark,
.sidenote-container:hover .sidenote-mark span,
.sidenote-container:hover .sidenote mark,
.marginnote-container:hover .marginnote-mark span,