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/Makefile b/contrib/Makefile new file mode 100644 index 0000000..cdb9f4c --- /dev/null +++ b/contrib/Makefile @@ -0,0 +1,13 @@ +# Makefile + +HTML := $(wildcard *.html) + +.PHONY: all docs + +all: docs + +docs: $(HTML) + sed -i \ + -e '/href=/s|\.md|\.html|' \ + -e '/blockquote/s|/\*! display \*/|display: none;|' \ + $(HTML) diff --git a/contrib/html.sh b/contrib/html.sh index bbd8ba8..6d7c640 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -2,8 +2,18 @@ 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)|" \ + -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 '/| id="\L\1">|' + -e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \ + -e '/| id="\L\1">|' \ + -e '/' diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 1b1dd03..0ce3ff7 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -1,15 +1,6 @@ -RouterOS Scripts :: __TITLE__ - - - + +RouterOS Scripts :: __TITLE__ + + 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..f05f4bb 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -1,14 +1,19 @@ - - - - -RouterOS-Scripts Logo Color Changer - + + +RouterOS Scripts :: Logo Color Changer + + - - + -

RouterOS-Scripts Logo Color Changer

+

Logo Color Changer

+ +

⬅️ 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 @@ -33,8 +38,11 @@ logo and download it.

for other browsers may differ.)

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

- - +
+ +

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

+ diff --git a/contrib/notification.d/style.css b/contrib/notification.d/style.css deleted file mode 100644 index 648ea23..0000000 --- a/contrib/notification.d/style.css +++ /dev/null @@ -1,36 +0,0 @@ -body { - font-family: fira-sans, sans-serif; - font-size: 10pt; - background-color: transparent; -} -div.notification { - position: relative; - float: right; - width: 600px; - border: 3px outset #6c5d53; - /* border-radius: 5px; */ - padding: 10px; - background-color: #e6e6e6; -} -div.content { - padding-left: 60px; -} -img.logo { - float: left; - border-radius: 50%; -} -p.heading { - margin: 0px; - font-weight: bold; - text-decoration: underline; -} -p.hint { - display: none; -} -pre { - font-family: fira-mono, monospace; - white-space: pre-wrap; -} -span.link { - color: #863600; -} diff --git a/contrib/notification.html b/contrib/notification.html index 7875036..3ff8754 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -1,14 +1,19 @@ - - - - -RouterOS-Scripts Notification Generator - - - - + + +RouterOS Scripts :: Notification Generator + + + + -

RouterOS-Scripts Notification Generator

+

Notification Generator

+ +

⬅️ Go back to main README

+ +

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

@@ -16,8 +21,8 @@

[MikroTik] ℹ️ Subject

Message
-

⏰ This message was queued since oct/18/2022 18:30:48 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%!

@@ -25,11 +30,14 @@

Subject:

Message:

Show link:

-

Queued since

+

Queued since

Cut-off with percent

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

- - +
+ +

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

+ diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md index 804104f..f464ff0 100644 --- a/doc/mod/notification-telegram.md +++ b/doc/mod/notification-telegram.md @@ -106,10 +106,13 @@ 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) +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 -------- diff --git a/general/style.css b/general/style.css new file mode 100644 index 0000000..ad25c7c --- /dev/null +++ b/general/style.css @@ -0,0 +1,79 @@ +/* stylesheet for RouterOS Scripts */ +body { + background-color: transparent; + font-family: fira-sans, sans-serif; + font-size: 10pt; + line-height: 1.6; +} +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: none; + width: 600px; + border: 3px outset #6c5d53; + /* border-radius: 5px; */ + padding: 10px; + background-color: #e6e6e6; +} +div.content { + padding-left: 60px; +} +img.logo { + float: left; + border-radius: 50%; +} +p.heading { + margin: 0px; + font-weight: bold; + text-decoration: underline; +} +p.hint { + display: none; +} +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; +} +@media only screen and (orientation: landscape) { + body { + margin-left: 10vw; + margin-right: 10vw; + } + div.notification { + float: right; + } +}