From: Carlos Maniero <carlos@maniero.me>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Cc: Carlos Maniero <carlos@maniero.me>
Subject: [PATCH olang 1/5] docs: unify manual and site style
Date: Sat, 7 Sep 2024 00:35:15 -0300 [thread overview]
Message-ID: <20240907033519.293370-2-carlos@maniero.me> (raw)
In-Reply-To: <20240907033519.293370-1-carlos@maniero.me>
We were duplicating code, now they point to a single source.
Signed-off-by: Carlos Maniero <carlos@maniero.me>
---
docs/Makefile | 6 +++-
docs/manual/Makefile | 2 +-
docs/{manual => }/style.css | 0
docs/template.html | 68 +------------------------------------
4 files changed, 7 insertions(+), 69 deletions(-)
rename docs/{manual => }/style.css (100%)
diff --git a/docs/Makefile b/docs/Makefile
index b57617a..ae5e546 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -4,13 +4,14 @@ BUILD_DIR := build
SITE_DIR := $(BUILD_DIR)/site
TARGET := $(SITE_DIR)/index.html
DIST_FILE := site.tar.gz
+STYLE := style.css
PAGES_DIR := pages
MANPAGES := $(BUILD_DIR)/man
PAGES := $(wildcard $(PAGES_DIR)/*.md)
HTML_PAGES := $(patsubst $(PAGES_DIR)/%.md, $(SITE_DIR)/$(PAGES_DIR)/%.html, $(PAGES))
.PHONY: all
-all: $(BUILD_DIR) $(TARGET) $(PAGES) manpages manual
+all: $(BUILD_DIR) $(STYLE) $(TARGET) $(PAGES) manpages manual
.PHONY: clean
clean:
@@ -42,6 +43,9 @@ $(BUILD_DIR):
@mkdir -p $(SITE_DIR)/$(PAGES_DIR)
@mkdir -p $(MANPAGES)
+$(STYLE): $(BUILD_DIR)
+ cp style.css $(SITE_DIR)
+
$(SITE_DIR)/manual/index.html: manual/*.texi
make -C manual
rm -rf $(SITE_DIR)/manual
diff --git a/docs/manual/Makefile b/docs/manual/Makefile
index 2bafbe6..59aeb03 100644
--- a/docs/manual/Makefile
+++ b/docs/manual/Makefile
@@ -5,7 +5,7 @@ HTML_HEADER=$(shell cat _header.html)
all: html
html: olang.texi introduction.texi installation.texi getting-started.texi contribution-guide.texi
- $(MAKEINFO) --set-customization-variable AFTER_BODY_OPEN="$(HTML_HEADER)" --css-include=style.css -o html --html olang.texi
+ $(MAKEINFO) --set-customization-variable AFTER_BODY_OPEN="$(HTML_HEADER)" --css-include=../style.css -o html --html olang.texi
.PHONY: clean
clean:
diff --git a/docs/manual/style.css b/docs/style.css
similarity index 100%
rename from docs/manual/style.css
rename to docs/style.css
diff --git a/docs/template.html b/docs/template.html
index e81f53e..ab4b5a6 100644
--- a/docs/template.html
+++ b/docs/template.html
@@ -5,73 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="date" content='$date-meta$'>
<title>$title$ | olang</title>
- <style>
- :root {
- --background-color: #f4f4f4;
- --text-color: black;
- --link-color: #4e5289;
- }
-
- @media (prefers-color-scheme: dark) {
- :root {
- --background-color: #26282B;
- --text-color: white;
- --link-color: #8c91db;
- }
- }
-
- body {
- background: var(--background-color);
- color: var(--text-color);
- font-family: monospace;
- font-size: 1rem;
- margin: 0;
- padding: 0 40px;
- }
-
- a {
- color: var(--link-color);
- }
-
- article, nav, header, footer {
- max-width: 80ch;
- margin: 10px auto;
- }
-
- header > h1 {
- font-weight: normal;
- }
-
- nav, header > h1 {
- text-align: center;
- }
-
- header {
- margin-top: 70px;
- margin-bottom: 20px;
- }
-
- footer {
- margin: 20px auto;
- }
-
- article {
- overflow: hidden;
- }
-
- pre {
- background: rgba(0,0,0, 0.75);
- color: white;
- padding: 10px;
- max-width: 100%;
- overflow: auto;
- font-size: large;
- }
-
- .logo-name {
- font-weight: bold;
- }
- </style>
+ <link rel="stylesheet" href="/style.css">
</head>
<body>
<header>
--
2.34.1
next prev parent reply other threads:[~2024-09-07 3:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-07 3:35 [PATCH olang 0/5] docs: some improvements on the website Carlos Maniero
2024-09-07 3:35 ` Carlos Maniero [this message]
2024-09-07 3:35 ` [PATCH olang 2/5] docs: include the manual link over the manual Carlos Maniero
2024-09-07 3:35 ` [PATCH olang 3/5] docs: make the olang visuals a w3m like website Carlos Maniero
2024-09-07 3:35 ` [PATCH olang 4/5] docs: prevents the menu items to break line Carlos Maniero
2024-09-07 3:35 ` [PATCH olang 5/5] docs: home page: transform the unfinished software warn into a notice Carlos Maniero
2024-09-07 10:38 ` [PATCH olang 0/5] docs: some improvements on the website Johnny Richard
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=20240907033519.293370-2-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