commit 918d900be4f13ef1ba945081916802acd685067b
parent f0b2f48840e07623d284f28a8a197d224b3e08da
Author: David Eisinger <[email protected]>
Date: Sun, 30 Apr 2023 22:09:39 -0400
Add graph to note
Diffstat:
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/content/notes/how-to-spend-time/index.md b/content/notes/how-to-spend-time/index.md
@@ -17,6 +17,8 @@ references:
file: www-artofmanliness-com-6lxmwc.txt
---
+{{<thumbnail graph1 "500x" />}}
+
> Book smarts, street smarts. Learning by study, learning by doing.
> Read about it, apply it, see it in action, take that practical experience
> back to your reading, deepen your understanding, take that deeper
diff --git a/themes/v2/assets/css/style.scss b/themes/v2/assets/css/style.scss
@@ -66,6 +66,10 @@ sup {
line-height: 0;
}
+figure {
+ margin: 0;
+}
+
.nowrap {
white-space: nowrap;
}
@@ -74,13 +78,9 @@ sup {
display: flex;
gap: 1em;
- figure {
- margin: 0;
-
- img {
- width: 100%;
- height: auto;
- }
+ img {
+ width: 100%;
+ height: auto;
}
}
diff --git a/themes/v2/layouts/shortcodes/thumbnail.html b/themes/v2/layouts/shortcodes/thumbnail.html
@@ -1,6 +1,11 @@
{{ $orig := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }}
{{ $options := .Get 1 }}
-{{ $img := $orig.Fill $options }}
+
+{{ $img := $orig.Resize $options }}
+
+{{ if findRE `\d+x\d+` $options }}
+ {{ $img = $orig.Fill $options }}
+{{ end }}
<figure>
<a href="{{ $orig.RelPermalink }}">