From a1f568ab7ea9e50024e201dac8e0571c4db298e4 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 13 Nov 2025 13:37:51 +0100 Subject: [PATCH 01/20] contrib/html: add empty lines... ... for easier rebasing. --- contrib/html.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/html.sh b/contrib/html.sh index bbd8ba8..6942ecf 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -3,7 +3,9 @@ set -e sed "s|__TITLE__|$(head -n1 "${1}")|" < "${0}.d/head.html" + markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \ -e '/| id="\L\1">|' + printf '' From 8b1d2524d3d1d4c7ed328eda3b57c601ca235817 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 14:31:17 +0100 Subject: [PATCH 02/20] contrib/{logo-color,notification}: use a single style --- contrib/logo-color.d/style.css | 5 ----- contrib/logo-color.html | 2 +- contrib/notification.html | 4 ++-- {contrib/notification.d => general}/style.css | 3 ++- 4 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 contrib/logo-color.d/style.css rename {contrib/notification.d => general}/style.css (93%) 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..507445b 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..b7d6764 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -3,8 +3,8 @@ RouterOS-Scripts Notification Generator - - + + diff --git a/contrib/notification.d/style.css b/general/style.css similarity index 93% rename from contrib/notification.d/style.css rename to general/style.css index 648ea23..66d44f1 100644 --- a/contrib/notification.d/style.css +++ b/general/style.css @@ -1,7 +1,8 @@ +/* stylesheet for RouterOS Scripts */ body { + background-color: transparent; font-family: fira-sans, sans-serif; font-size: 10pt; - background-color: transparent; } div.notification { position: relative; From 7684c66407a8670921c247261d647ffee1ccf156 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 14:46:01 +0100 Subject: [PATCH 03/20] contrib/html: include stylesheet via link --- Makefile | 2 +- contrib/html.sh | 7 ++++++- contrib/html.sh.d/head.html | 11 +---------- general/style.css | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index d8f2387..b799535 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ HTML = $(MARKDOWN:.md=.html) all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json -%.html: %.md contrib/html.sh contrib/html.sh.d/head.html +%.html: %.md general/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 6942ecf..6a32b5d 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -2,7 +2,12 @@ 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}" general/style.css)|" \ + < "${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 1b1dd03..50653ae 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -1,15 +1,6 @@ RouterOS Scripts :: __TITLE__ - + diff --git a/general/style.css b/general/style.css index 66d44f1..be67afa 100644 --- a/general/style.css +++ b/general/style.css @@ -4,6 +4,28 @@ body { font-family: fira-sans, sans-serif; font-size: 10pt; } +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; From 647e14cd6fbdca853734de11f3a6262892a0ded2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 12:51:34 +0100 Subject: [PATCH 04/20] contrib/html: add a margin on left and right... ... for windows in landscape (wider than high). Also make the notification float right for landscape only. --- general/style.css | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/general/style.css b/general/style.css index be67afa..a9ede5e 100644 --- a/general/style.css +++ b/general/style.css @@ -28,7 +28,7 @@ code { } div.notification { position: relative; - float: right; + float: none; width: 600px; border: 3px outset #6c5d53; /* border-radius: 5px; */ @@ -67,3 +67,12 @@ pre code { span.link { color: #863600; } +@media only screen and (orientation: landscape) { + body { + margin-left: 10vw; + margin-right: 10vw; + } + div.notification { + float: right; + } +} From bcaf737b03fa8f2bdd9a0bfd7ea97b3d10a497ca Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:30:49 +0100 Subject: [PATCH 05/20] contrib/html: increase default line height --- general/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/general/style.css b/general/style.css index a9ede5e..ad25c7c 100644 --- a/general/style.css +++ b/general/style.css @@ -3,6 +3,7 @@ body { background-color: transparent; font-family: fira-sans, sans-serif; font-size: 10pt; + line-height: 1.6; } h2 { border-bottom: 1px solid #ccc; From 1351d675303ba47de347da39d7e5f9e54a51364f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 14:55:00 +0100 Subject: [PATCH 06/20] contrib/html: 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 6a32b5d..d4a1a90 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -7,6 +7,7 @@ RELTO="$(dirname "${1}")" sed \ -e "s|__TITLE__|$(head -n1 "${1}")|" \ -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" general/style.css)|" \ + -e "s|__LOGO__|$(realpath --relative-to="${RELTO}" logo.png)|" \ < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ 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 a975018fc7c147413211e46bec739395c032d8b5 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 22:34:00 +0100 Subject: [PATCH 07/20] contrib/html: 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 d4a1a90..603e606 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -11,7 +11,7 @@ sed \ < "${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 d5910174377f6edb062b667f1b0a5416bc53342b Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 22:57:17 +0100 Subject: [PATCH 08/20] contrib/html: drop ampersand, comma, dash & tick 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 603e606..9c1556c 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -12,6 +12,7 @@ sed \ 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 43f77661abda0b2adcd7f132c2bcec97c7cfce3f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:19:32 +0100 Subject: [PATCH 09/20] contrib/*: unify html code --- contrib/html.sh.d/head.html | 4 ++-- contrib/logo-color.html | 17 +++++++---------- contrib/notification.html | 17 +++++++---------- doc/mod/notification-telegram.md | 2 +- 4 files changed, 17 insertions(+), 23 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 507445b..eb00492 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 b7d6764..472ce48 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.

- - + diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md index 804104f..7d5092d 100644 --- a/doc/mod/notification-telegram.md +++ b/doc/mod/notification-telegram.md @@ -107,7 +107,7 @@ chat with [BotFather ↗️](https://t.me/BotFather) and set it there. ![set profile photo](notification-telegram.d/setuserpic.avif) Have a look at my -[RouterOS-Scripts Logo Color Changer](https://git.eworm.de/cgit/routeros-scripts/plain/contrib/logo-color.html) +[Logo Color Changer](https://git.eworm.de/cgit/routeros-scripts/plain/contrib/logo-color.html) to create a colored version of this scripts' logo. See also From 502c04e903b72c7999aabd990002775b792206dd Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:35:14 +0100 Subject: [PATCH 10/20] 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 eb00492..8ee1ba9 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 472ce48..3bc86fc 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 5cd51c3d182bcf3a336285678baa9caf879e4190 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:06:42 +0100 Subject: [PATCH 11/20] 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 3bc86fc..c86450c 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 1efebf591dfbd58de8957c30bfb70a138885ee8a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:11:23 +0100 Subject: [PATCH 12/20] 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 c86450c..a4d0486 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%!

From a74da2fb842cdd650ef245cf3dc7e94e70f13211 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:25:01 +0100 Subject: [PATCH 13/20] doc/mod/notification-telegram: use relative reference in link This may break, depending on site. --- doc/mod/notification-telegram.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md index 7d5092d..bdf1331 100644 --- a/doc/mod/notification-telegram.md +++ b/doc/mod/notification-telegram.md @@ -106,8 +106,7 @@ chat with [BotFather ↗️](https://t.me/BotFather) and set it there. ![set profile photo](notification-telegram.d/setuserpic.avif) -Have a look at my -[Logo Color Changer](https://git.eworm.de/cgit/routeros-scripts/plain/contrib/logo-color.html) +Have a look at my [Logo Color Changer](../../contrib/logo-color.html) to create a colored version of this scripts' logo. See also From af9c0df96efd4d5cef0af0c31a13c500c8a32649 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:27:59 +0100 Subject: [PATCH 14/20] contrib/logo-color: use relative reference in link ... without extra path elements. This may break, depending on site. --- contrib/logo-color.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 8ee1ba9..9962e99 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -33,7 +33,7 @@ logo and download it.

for other browsers may differ.)

See how to -Set +Set a profile photo for your Telegram bot.


From d98aca4a4ad612921276e1e1d3d76f0f3738f733 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:26:05 +0100 Subject: [PATCH 15/20] contrib: introduce Makefile... ... and update references in links. --- contrib/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 contrib/Makefile diff --git a/contrib/Makefile b/contrib/Makefile new file mode 100644 index 0000000..aae3178 --- /dev/null +++ b/contrib/Makefile @@ -0,0 +1,10 @@ +# Makefile + +HTML := $(wildcard *.html) + +.PHONY: all docs + +all: docs + +docs: $(HTML) + sed -i '/href=/s|\.md|\.html|' $(HTML) From 7bc962273629ef8ee6d153af952de7281c0c8d70 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:40:27 +0100 Subject: [PATCH 16/20] doc/mod/notification-telegram: hint on possibly broken link --- doc/mod/notification-telegram.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md index bdf1331..f464ff0 100644 --- a/doc/mod/notification-telegram.md +++ b/doc/mod/notification-telegram.md @@ -109,6 +109,10 @@ chat with [BotFather ↗️](https://t.me/BotFather) and set it there. Have a look at my [Logo Color Changer](../../contrib/logo-color.html) to create a colored version of this scripts' logo. +> 💡️ **Hint**: The above link may be broken on code hosting sites. +> Use [Logo Color Changer](https://rsc.eworm.de/main/contrib/logo-color.html) +> instead. + See also -------- From 04b4fbaa719787d0dde978286a44bcc13890a556 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:59:08 +0100 Subject: [PATCH 17/20] contrib/html: hide the hint on broken link --- contrib/html.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/html.sh b/contrib/html.sh index 9c1556c..6d7c640 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -13,6 +13,7 @@ sed \ markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \ -e '/| id="\L\1">|' \ - -e '/' From 0bd0193d190713b8fce65ac21c2766b03d85c8dc Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:51:05 +0100 Subject: [PATCH 18/20] contrib/logo-color: hint on possibly broken site --- contrib/logo-color.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 9962e99..f05f4bb 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -10,6 +10,11 @@

⬅️ Go back to main README

+

💡️ Hint: This site or links +on it may be broken on code hosting sites. Use +Logo Color Changer +instead.

+

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

From bc73a32bc525c19b1c8c6881a147faf9717b0538 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:52:58 +0100 Subject: [PATCH 19/20] contrib/notification: hint on possibly broken site --- contrib/notification.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/notification.html b/contrib/notification.html index a4d0486..3ff8754 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -10,6 +10,11 @@

⬅️ Go back to main README

+

💡️ Hint: This site or links +on it may be broken on code hosting sites. Use +Notification Generator +instead.

+
From 4d1d536bb9149584cc75d67241f82f1d351bb059 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:56:16 +0100 Subject: [PATCH 20/20] contrib/Makefile: hide the hint on broken site --- contrib/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/Makefile b/contrib/Makefile index aae3178..cdb9f4c 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -7,4 +7,7 @@ HTML := $(wildcard *.html) all: docs docs: $(HTML) - sed -i '/href=/s|\.md|\.html|' $(HTML) + sed -i \ + -e '/href=/s|\.md|\.html|' \ + -e '/blockquote/s|/\*! display \*/|display: none;|' \ + $(HTML)