public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
From: Carlos Maniero <carlos@maniero.me>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Cc: Carlos Maniero <carlos@maniero.me>
Subject: [PATCH olang] docs: add white-mode support
Date: Sat, 17 Feb 2024 14:46:37 -0300	[thread overview]
Message-ID: <20240217174637.3287169-1-carlos@maniero.me> (raw)

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


             reply	other threads:[~2024-02-17 17:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17 17:46 Carlos Maniero [this message]
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

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=20240217174637.3287169-1-carlos@maniero.me \
    --to=carlos@maniero.me \
    --cc=~johnnyrichard/olang-devel@lists.sr.ht \
    /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.
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