From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Documentation <linux-doc@vger.kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>, Randy Dunlap <rdunlap@infradead.org>
Subject: Adding warning icon to warning admonitions?
Date: Fri, 5 Jan 2024 21:28:40 +0700 [thread overview]
Message-ID: <ZZgSGFhvT3SOI4fe@archie.me> (raw)
[-- Attachment #1: Type: text/plain, Size: 2775 bytes --]
Hi,
On my head, I'm often thinking about adding warning icon (more specifically,
circle exclamation) to warning admonition blocks. The idea is inspired by
content safety disclaimers as seen on TikTok (TT) (for example and FYI,
racing-themed contents there like [1] are more likely to get what I called
"pro-only" admonition that literally says `The actions in this video are
performed by professionals or supervised by professionals. Do not attempt.`)
From above inspiration, I'd like to make the warning admonition block from
currently:
```
+----------------------------------------------------------------------------+
| Warning: |
| |
| Function foo() can produce undefined behavior. Either sanitize |
| arguments being passed, or use the safer abstraction foo_wrapper(). |
+----------------------------------------------------------------------------+
```
into:
```
+----------------------------------------------------------------------------+
| (!) Warning: |
| |
| Function foo() can produce undefined behaivor. Either sanitize |
| arguments being passed, or use the safer abstraction foo_wrapper(). |
+----------------------------------------------------------------------------+
```
or even to match TT:
```
+----------------------------------------------------------------------------+
| (!) Function foo() can produce undefined behavior. Either sanitize |
| arguments being passed, or use the safer abstraction foo_wrapper(). |
+----------------------------------------------------------------------------+
```
In other words, the admonition text should be indented after the warning icon.
For the icon itself, the approach is to use Font Awesome [2] (many other doc
sites that uses Sphinx also do that due to site theme they use but Alabaster
theme don't use the icon, hence this question). I personally prefer regular
icon variant (like in TT), but alas it is in non-free PRO plan (and only
solid variant is free and that is what Sphinx themes using).
Does adding warning icon like above idea make sense for the kernel docs? And
does it require non-trivial (complex) changes to Alabaster theme?
Thanks.
[1]: https://www.tiktok.com/@supercars/video/7301916055063088392?is_from_webapp=1&sender_device=pc&web_id=7320595371066557959
[2]: https://fontawesome.com/icons/circle-exclamation?f=classic&s=solid
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next reply other threads:[~2024-01-05 14:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 14:28 Bagas Sanjaya [this message]
2024-01-05 14:59 ` Adding warning icon to warning admonitions? Jonathan Corbet
2024-01-05 18:12 ` Vegard Nossum
2024-01-06 13:02 ` Bagas Sanjaya
2024-01-06 12:43 ` Bagas Sanjaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZZgSGFhvT3SOI4fe@archie.me \
--to=bagasdotme@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox