diff --git a/themes/vanilla/assets/scss/code.scss b/themes/vanilla/assets/scss/code.scss index 131d128..69b48db 100644 --- a/themes/vanilla/assets/scss/code.scss +++ b/themes/vanilla/assets/scss/code.scss @@ -5,6 +5,16 @@ $code-color-keyword: black; $code-color-type: black; $code-color-comment: grey; +.highlight-label { + padding: 0.25rem 0.5rem 0.25rem 0.5rem; + border: $code-border; + border-bottom: none; + + a { + font-family: $font-code; + } +} + code { font-family: $font-code; background-color: $code-color; diff --git a/themes/vanilla/layouts/shortcodes/codelines.html b/themes/vanilla/layouts/shortcodes/codelines.html index 2d50698..8e16d5c 100644 --- a/themes/vanilla/layouts/shortcodes/codelines.html +++ b/themes/vanilla/layouts/shortcodes/codelines.html @@ -11,4 +11,8 @@ {{ else }} {{ .Scratch.Set "opts" "" }} {{ end }} -{{ highlight (delimit $v "\n") (.Get 0) (printf "linenos=table,linenostart=%d%s" (.Get 2) (.Scratch.Get "opts")) }} +
+
From {{ path.Base (.Get 1) }}, + {{ if eq (.Get 2) (.Get 3) }}line {{ .Get 2 }}{{ else }} lines {{ .Get 2 }} through {{ .Get 3 }}{{ end }}
+ {{ highlight (delimit $v "\n") (.Get 0) (printf "linenos=table,linenostart=%d%s" (.Get 2) (.Scratch.Get "opts")) }} +