From 6f6aa9a4fcb16cd926759cf4acb371c94e5c0b52 Mon Sep 17 00:00:00 2001 From: Gordon Pedersen Date: Tue, 10 Sep 2024 12:50:47 +1000 Subject: [PATCH] style change to display code block language --- configuration/template.html | 2 +- weblog/B0. Template/styles.css.md | 10 ++++++++++ weblog/B0. Template/template-cv.html.md | 2 +- weblog/B0. Template/template-home.html.md | 2 +- weblog/B0. Template/template-landing-page.html.md | 2 +- weblog/B0. Template/template-page.html.md | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/configuration/template.html b/configuration/template.html index 76d87db..56320fa 100644 --- a/configuration/template.html +++ b/configuration/template.html @@ -5,7 +5,7 @@ - + {feeds} diff --git a/weblog/B0. Template/styles.css.md b/weblog/B0. Template/styles.css.md index 813479b..0157a1d 100644 --- a/weblog/B0. Template/styles.css.md +++ b/weblog/B0. Template/styles.css.md @@ -463,6 +463,16 @@ pre code { padding: 1em; white-space: pre-wrap; word-wrap: break-word; + position: relative; +} + +code[data-lang]::before { + content: attr(data-lang); + position: absolute; + top: -1.5rem; + left: 0; + font-size: 1rem; + color: var(--accent); } img { diff --git a/weblog/B0. Template/template-cv.html.md b/weblog/B0. Template/template-cv.html.md index 88e97c8..055464f 100644 --- a/weblog/B0. Template/template-cv.html.md +++ b/weblog/B0. Template/template-cv.html.md @@ -8,7 +8,7 @@ Title: cv - + {feeds} diff --git a/weblog/B0. Template/template-home.html.md b/weblog/B0. Template/template-home.html.md index a115407..3db2abd 100644 --- a/weblog/B0. Template/template-home.html.md +++ b/weblog/B0. Template/template-home.html.md @@ -7,7 +7,7 @@ Title: Home {weblog-title} - + {feeds} diff --git a/weblog/B0. Template/template-landing-page.html.md b/weblog/B0. Template/template-landing-page.html.md index c850b32..a24d95d 100644 --- a/weblog/B0. Template/template-landing-page.html.md +++ b/weblog/B0. Template/template-landing-page.html.md @@ -8,7 +8,7 @@ Title: Landing Page Template - + {feeds} diff --git a/weblog/B0. Template/template-page.html.md b/weblog/B0. Template/template-page.html.md index e031ae5..b37f1d5 100644 --- a/weblog/B0. Template/template-page.html.md +++ b/weblog/B0. Template/template-page.html.md @@ -8,7 +8,7 @@ Title: Page Template - + {feeds}