From 4b8e8adb2d83a910d07ad038e6021606c7c62bac Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 14:31:17 +0100 Subject: [PATCH 01/11] 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 a5ac5138be0ce4ff51d2b36d6312ebc08972751c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 14:46:01 +0100 Subject: [PATCH 02/11] 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 a4d436573548567bce38dd28daa69ecc63ee7dc8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 30 Oct 2025 10:19:30 +0100 Subject: [PATCH 03/11] 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 6317fb8f40196f62ff5debcb1ef1685f57d27118 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 12:51:34 +0100 Subject: [PATCH 04/11] contrib/html.sh: add a margin on left and right... ... for windows in landscape (wider than high). --- contrib/general/style.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/general/style.css b/contrib/general/style.css index d0cb371..f497edf 100644 --- a/contrib/general/style.css +++ b/contrib/general/style.css @@ -4,6 +4,12 @@ body { font-size: 10pt; background-color: transparent; } +@media only screen and (orientation: landscape) { + body { + margin-left: 10vw; + margin-right: 10vw; + } +} h2 { border-bottom: 1px solid #ccc; color: #000; From 45ee884d8a9504bfc1653b05c6204f9e0ff05342 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 14:55:00 +0100 Subject: [PATCH 05/11] 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 51a4a070321b8bdeb9d9e4503eb91954a043c313 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 22:34:00 +0100 Subject: [PATCH 06/11] contrib/html.sh: properly handle anchors --- contrib/html.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/html.sh b/contrib/html.sh index 3b5b420..dbb40f6 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -9,6 +9,6 @@ sed \ -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' \ + -e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \ -e '/| id="\L\1">|' printf '' From a66f8edbd1fa2939ae0631487d8730e01da84b21 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 22:57:17 +0100 Subject: [PATCH 07/11] contrib/html.sh: drop comman from id/anchor --- contrib/html.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/html.sh b/contrib/html.sh index dbb40f6..bd15bf0 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -10,5 +10,6 @@ sed \ < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \ - -e '/| id="\L\1">|' + -e '/| id="\L\1">|' \ + -e '/' From 552dbbd9b9e49e4f52c4aa4eeea1ea6dc2595a5d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:19:32 +0100 Subject: [PATCH 08/11] 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 76ddd9453798fbc86949f78e5ca8ec7e88300473 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:35:14 +0100 Subject: [PATCH 09/11] 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 dbf332383aae947ad8f23d855b59c1fb0f2d9185 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:06:42 +0100 Subject: [PATCH 10/11] 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 24e3c12f02f85f775285c5fd3b85b78c29e0bf61 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:11:23 +0100 Subject: [PATCH 11/11] 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%!