From 2dd4bc7a3957ccfc4b481ec22556cdf34c79311d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 14:31:17 +0100 Subject: [PATCH 1/9] contrib/{logo-color,notification}: use a single style --- contrib/{notification.d => general}/style.css | 1 + contrib/logo-color.d/style.css | 5 ----- contrib/logo-color.html | 2 +- contrib/notification.html | 4 ++-- 4 files changed, 4 insertions(+), 8 deletions(-) rename contrib/{notification.d => general}/style.css (93%) delete mode 100644 contrib/logo-color.d/style.css diff --git a/contrib/notification.d/style.css b/contrib/general/style.css similarity index 93% rename from contrib/notification.d/style.css rename to contrib/general/style.css index 648ea23..a3099a9 100644 --- a/contrib/notification.d/style.css +++ b/contrib/general/style.css @@ -1,3 +1,4 @@ +/* stylesheet for RouterOS Scripts */ body { font-family: fira-sans, sans-serif; font-size: 10pt; diff --git a/contrib/logo-color.d/style.css b/contrib/logo-color.d/style.css deleted file mode 100644 index eb2ec6a..0000000 --- a/contrib/logo-color.d/style.css +++ /dev/null @@ -1,5 +0,0 @@ -body { - font-family: fira-sans, sans-serif; - font-size: 10pt; - background-color: transparent; -} diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 17942ce..802e36c 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -3,7 +3,7 @@ RouterOS-Scripts Logo Color Changer - + diff --git a/contrib/notification.html b/contrib/notification.html index 7875036..49bf8bd 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -3,8 +3,8 @@ RouterOS-Scripts Notification Generator - - + + From 9a39382c938e34058fb057cb6fc66fa7b7112884 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 14:46:01 +0100 Subject: [PATCH 2/9] contrib/html.sh: include stylesheet via link --- contrib/general/style.css | 32 ++++++++++++++++++++++++++++++++ contrib/html.sh | 6 +++++- contrib/html.sh.d/head.html | 11 +---------- 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/contrib/general/style.css b/contrib/general/style.css index a3099a9..d0cb371 100644 --- a/contrib/general/style.css +++ b/contrib/general/style.css @@ -4,6 +4,28 @@ body { font-size: 10pt; background-color: transparent; } +h2 { + border-bottom: 1px solid #ccc; + color: #000; +} +a { + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +blockquote { + border-left: 4px solid #ccc; + padding: 0 10px; + color: #777; +} +code { + margin: 0 2px; + padding: 2px 5px; + border: 1px solid #ccc; + background-color: #f8f8f8; + border-radius: 3px; +} div.notification { position: relative; float: right; @@ -31,6 +53,16 @@ p.hint { pre { font-family: fira-mono, monospace; white-space: pre-wrap; + background-color: #f8f8f8; + border: 1px solid #ccc; + overflow: auto; + padding: 6px 10px; + border-radius: 3px; +} +pre code { + margin: 0; + padding: 0; + border: 0; } span.link { color: #863600; diff --git a/contrib/html.sh b/contrib/html.sh index bbd8ba8..194a7cd 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -2,7 +2,11 @@ set -e -sed "s|__TITLE__|$(head -n1 "${1}")|" < "${0}.d/head.html" +RELTO="$(dirname "${1}")" +sed \ + -e "s|__TITLE__|$(head -n1 "${1}")|" \ + -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" contrib/general/style.css)|" \ + < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \ -e '/| id="\L\1">|' diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 1b1dd03..50653ae 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -1,15 +1,6 @@ RouterOS Scripts :: __TITLE__ - + From 2938c0a7161daff038d45b9e2f2d27c39a613210 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 30 Oct 2025 10:19:30 +0100 Subject: [PATCH 3/9] contrib/html.sh: link the stylesheet from top level... ... and copy it there in Makefile. --- .gitignore | 1 + Makefile | 7 +++++-- contrib/html.sh | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8abdc28..9d27373 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.rej # html files (as generated from markdown) +style.css *.html # checksums file as used by $ScriptInstallUpdate diff --git a/Makefile b/Makefile index 0265a51..a741fef 100644 --- a/Makefile +++ b/Makefile @@ -7,11 +7,14 @@ LOCAL = $(wildcard *.local.rsc) WIFI = $(wildcard *.wifi.rsc) MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md) -HTML = $(MARKDOWN:.md=.html) +HTML = $(MARKDOWN:.md=.html) style.css all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json -%.html: %.md contrib/html.sh contrib/html.sh.d/head.html +style.css: contrib/general/style.css + cp $< $@ + +%.html: %.md style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh $< > $@ %.capsman.rsc: %.template.rsc Makefile diff --git a/contrib/html.sh b/contrib/html.sh index 194a7cd..287119f 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -5,7 +5,7 @@ set -e RELTO="$(dirname "${1}")" sed \ -e "s|__TITLE__|$(head -n1 "${1}")|" \ - -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" contrib/general/style.css)|" \ + -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" style.css)|" \ < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \ From e55c341c3dc1b2ccdee544c4ace371b517107f0b Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 12:51:34 +0100 Subject: [PATCH 4/9] contrib/html.sh: add a margin on left and right --- contrib/general/style.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/general/style.css b/contrib/general/style.css index d0cb371..a001f07 100644 --- a/contrib/general/style.css +++ b/contrib/general/style.css @@ -3,6 +3,8 @@ body { font-family: fira-sans, sans-serif; font-size: 10pt; background-color: transparent; + margin-left: 10vw; + margin-right: 10vw; } h2 { border-bottom: 1px solid #ccc; From 70483a49841053b7d5534f5774abf4daf98d270f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 14:55:00 +0100 Subject: [PATCH 5/9] contrib/html.sh: link the logo with relative path --- contrib/html.sh | 1 + contrib/html.sh.d/head.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/html.sh b/contrib/html.sh index 287119f..3b5b420 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -6,6 +6,7 @@ RELTO="$(dirname "${1}")" sed \ -e "s|__TITLE__|$(head -n1 "${1}")|" \ -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" style.css)|" \ + -e "s|__LOGO__|$(realpath --relative-to="${RELTO}" logo.png)|" \ < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \ diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 50653ae..779e246 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -2,5 +2,5 @@ RouterOS Scripts :: __TITLE__ - + From 9d5ce0d06a54205a97999f6f287b108459e1e359 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:19:32 +0100 Subject: [PATCH 6/9] contrib/*: unify html code --- contrib/html.sh.d/head.html | 4 ++-- contrib/logo-color.html | 17 +++++++---------- contrib/notification.html | 17 +++++++---------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 779e246..0ce3ff7 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -1,6 +1,6 @@ -RouterOS Scripts :: __TITLE__ - + +RouterOS Scripts :: __TITLE__ diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 802e36c..1dc74b0 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -1,14 +1,12 @@ - - - - -RouterOS-Scripts Logo Color Changer + + +RouterOS Scripts :: Logo Color Changer + - - + -

RouterOS-Scripts Logo Color Changer

+

Logo Color Changer

You want the logo for your own notifications? But you joined the Telegram Group and want @@ -36,5 +34,4 @@ for other browsers may differ.)

Set a profile photo for your Telegram bot.

- - + diff --git a/contrib/notification.html b/contrib/notification.html index 49bf8bd..1bd1ca5 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -1,14 +1,12 @@ - - - - -RouterOS-Scripts Notification Generator + + +RouterOS Scripts :: Notification Generator + - - + -

RouterOS-Scripts Notification Generator

+

Notification Generator

@@ -31,5 +29,4 @@

Then right-click, click "Take Screenshot" and finally select the notification and download it.

- - + From 4ff63130f34a293b27451f0c6451126ce0fe7f0f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:35:14 +0100 Subject: [PATCH 7/9] contrib/{logo-color,notification}: add navigation structure --- contrib/logo-color.html | 6 ++++++ contrib/notification.html | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 1dc74b0..78d19e6 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -8,6 +8,8 @@

Logo Color Changer

+

⬅️ Go back to main README

+

You want the logo for your own notifications? But you joined the Telegram Group and want something that differentiates? Color it!

@@ -34,4 +36,8 @@ for other browsers may differ.)

Set a profile photo for your Telegram bot.

+
+ +

⬅️ Go back to main README
+⬆️ Go back to top

diff --git a/contrib/notification.html b/contrib/notification.html index 1bd1ca5..a0eaa11 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -8,6 +8,8 @@

Notification Generator

+

⬅️ Go back to main README

+
@@ -29,4 +31,8 @@

Then right-click, click "Take Screenshot" and finally select the notification and download it.

+
+ +

⬅️ Go back to main README
+⬆️ Go back to top

From f2a3d762dc1e6c779b2ca5cdbad520ce366799c4 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:06:42 +0100 Subject: [PATCH 8/9] contrib/notification: update date format --- contrib/notification.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notification.html b/contrib/notification.html index a0eaa11..5d761b9 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -16,7 +16,7 @@

[MikroTik] ℹ️ Subject

Message
-

⏰ This message was queued since oct/18/2022 18:30:48 and may be obsolete.

+

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

✂️ The message was too long and has been truncated, cut off 13%!

@@ -25,7 +25,7 @@

Subject:

Message:

Show link:

-

Queued since

+

Queued since

Cut-off with percent

Then right-click, click "Take Screenshot" and finally select the From 5c129fbd3de88f5a4ecced09c33b2c56dfb8c13b Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:11:23 +0100 Subject: [PATCH 9/9] contrib/notification: format the values italic --- contrib/notification.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notification.html b/contrib/notification.html index 5d761b9..298e3bd 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -16,8 +16,8 @@

[MikroTik] ℹ️ Subject

Message
-

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

-

✂️ The message was too long and has been truncated, cut off 13%!

+

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

+

✂️ The message was too long and has been truncated, cut off 13%!