* [PATCH olang] docs: add white-mode support
@ 2024-02-17 17:46 Carlos Maniero
2024-02-17 17:51 ` [olang/patches/.build.yml] build success builds.sr.ht
2024-02-17 18:44 ` [PATCH olang] docs: add white-mode support Carlos Maniero
0 siblings, 2 replies; 3+ messages in thread
From: Carlos Maniero @ 2024-02-17 17:46 UTC (permalink / raw)
To: ~johnnyrichard/olang-devel; +Cc: Carlos Maniero
For accessibility reasons we now also support white-mode.
Signed-off-by: Carlos Maniero <carlos@maniero.me>
---
docs/template.html | 106 +++++++++++++++++++++++++--------------------
1 file changed, 58 insertions(+), 48 deletions(-)
diff --git a/docs/template.html b/docs/template.html
index 98cc348..ce57b6e 100644
--- a/docs/template.html
+++ b/docs/template.html
@@ -1,55 +1,65 @@
<!doctype html>
<html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="date" content='$date-meta$'>
- <title>$title$ | olang</title>
- <style>
+<head>
+ <meta charset="utf-8">
+ <meta name="date" content='$date-meta$'>
+ <title>$title$ | olang</title>
+ <style>
+ :root {
+ --background-color: #f0f0f0;
+ --text-color: black;
+ }
+ @media (prefers-color-scheme: dark) {
:root {
--background-color: #2e3533;
--text-color: white;
}
- body {
- background: #2e3533;
- color: white;
- font-family: monospace;
- font-size: 1.1rem;
- margin: 0;
- padding: 0;
- }
- a {
- color: #8c91db;
- }
- article, nav, header, footer {
- max-width: 820px;
- margin: 10px auto;
- }
- header, footer {
- margin: 70px auto;
- }
- article {
- line-height: 1.75rem;
- }
- </style>
- </head>
- <body>
- <header>
- <h1>∅lang | The zero programming language.</h1>
- <nav>
- <a href="/">Index</a> |
- <a href="/pages/getting-started.html">Getting started (WIP)</a> |
- <a href="/pages/hacking.html">Hacking (WIP)</a> |
- <a href="https://sr.ht/~johnnyrichard/olang/sources" target="_blank">Sources ↗</a> |
- <a href="https://sr.ht/~johnnyrichard/olang/lists" target="_blank">Mailing list ↗</a>
- </nav>
- </header>
- <article>
- <h1>$title$</h1>
-
- $body$
- </article>
- <footer>
- © 2024 olang maintainers
- </footer>
- </body>
+ }
+ body {
+ background: var(--background-color);
+ color: var(--text-color);
+ font-family: monospace;
+ font-size: 1.1rem;
+ margin: 0;
+ padding: 0;
+ }
+ a {
+ color: #8c91db;
+ }
+ article, nav, header, footer {
+ max-width: 820px;
+ margin: 10px auto;
+ }
+ header, footer {
+ margin: 70px auto;
+ }
+ article {
+ line-height: 1.75rem;
+ }
+ pre {
+ background: rgba(0,0,0, 0.75);
+ color: white;
+ padding: 10px;
+ }
+ </style>
+</head>
+<body>
+ <header>
+ <h1>∅lang | The zero programming language.</h1>
+ <nav>
+ <a href="/">Index</a> |
+ <a href="/pages/getting-started.html">Getting started (WIP)</a> |
+ <a href="/pages/hacking.html">Hacking (WIP)</a> |
+ <a href="https://sr.ht/~johnnyrichard/olang/sources" target="_blank">Sources ↗</a> |
+ <a href="https://sr.ht/~johnnyrichard/olang/lists" target="_blank">Mailing list ↗</a>
+ </nav>
+ </header>
+ <article>
+ <h1>$title$</h1>
+ $body$
+ </article>
+ <footer>
+ © 2024 olang maintainers
+ </footer>
+</body>
</html>
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-17 18:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17 17:46 [PATCH olang] docs: add white-mode support Carlos Maniero
2024-02-17 17:51 ` [olang/patches/.build.yml] build success builds.sr.ht
2024-02-17 18:44 ` [PATCH olang] docs: add white-mode support Carlos Maniero
Code repositories for project(s) associated with this public inbox
https://git.johnnyrichard.com/olang.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox