Allow highlighting of code blocks in notes #299

Open
opened 2025-11-08 22:53:50 +00:00 by davmo · 2 comments
Owner

The CSS used for shows under the previous site design made <pre> tagged text (code blocks in Pandoc parlance) to be more visible in contrast to other text. Such text also showed a horizontal scrollbar if needed (though this was mainly used to compensate for the narrowness of the HPR web pages at that time).

Looking at the version of show 4114 created with the old CSS (see attached PDF), the code (and other) sections stand out more than they do in the current version of this episode.

Could highlighting of this type be restored? Using a colour more in keeping with the new site design perhaps?

Rather than making it the default for all <pre> text, enabling it through an id or class attribute would probably be preferable to make it available to those hosts who wish to use it, rather than imposing it on everyone. As a Pandoc user, adding such attributes is not difficult.

Attachment: hpr4114_shownotes_dev.pdf, created from a standalone HTML file created as part of my workflow to let me see how the final version of my notes will look.

The CSS used for shows under the previous site design made `<pre>` tagged text (_code blocks_ in Pandoc parlance) to be more visible in contrast to other text. Such text also showed a horizontal scrollbar if needed (though this was mainly used to compensate for the narrowness of the HPR web pages at that time). Looking at the version of show 4114 created with the old CSS (see attached PDF), the code (and other) sections stand out more than they do in the current version of [this episode](https://hackerpublicradio.org/eps/hpr4114/). Could highlighting of this type be restored? Using a colour more in keeping with the new site design perhaps? Rather than making it the default for all `<pre>` text, enabling it through an `id` or `class` attribute would probably be preferable to make it available to those hosts who wish to use it, rather than imposing it on everyone. As a Pandoc user, adding such attributes is not difficult. _Attachment: `hpr4114_shownotes_dev.pdf`, created from a standalone HTML file created as part of my workflow to let me see how the final version of my notes will look._
davmo added the
Feature Request
label 2025-11-08 22:53:50 +00:00
rho_n self-assigned this 2025-11-09 14:41:12 +00:00
Owner

Thanks for the great issue description!

Merged to main

Thanks for the great issue description! [Merged to main](https://repo.anhonesthost.net/HPR/hpr_generator/commit/3bd64bf5cfd702fb1455ba7f63e3af9fce6e1d61)
rho_n closed this issue 2025-11-09 14:41:31 +00:00
Author
Owner

One oddity following this change:

On Vivaldi and Brave the new highlighted <pre> areas have horizontal and vertical scrollbars all the time. Firefox does not show these scrollbars.

The original CSS would only add the horizontal scrollbar if the text overflowed horizontally (overflow: auto;).

One oddity following this change: On Vivaldi and Brave the new highlighted `<pre>` areas have horizontal and vertical scrollbars all the time. Firefox does not show these scrollbars. The original CSS would only add the horizontal scrollbar if the text overflowed horizontally (`overflow: auto;`).
davmo reopened this issue 2025-11-10 18:12:01 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HPR/hpr_generator#299
No description provided.