Merge branch 'contrib-html-head-foot' into next

This commit is contained in:
Christian Hesse 2025-11-13 13:03:35 +01:00
commit 6e4e3a50e5
8 changed files with 55 additions and 1 deletions

View file

@ -8,6 +8,10 @@ GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc)
MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md)
HTML := $(MARKDOWN:.md=.html)
DATE ?= $(shell date --rfc-email)
VERSION ?= $(shell git symbolic-ref --short HEAD 2>/dev/null)/$(shell git rev-list --count HEAD 2>/dev/null)/$(shell git rev-parse --short=8 HEAD 2>/dev/null)
export DATE VERSION
.PHONY: all checksums docs rsc clean
all: checksums docs rsc

View file

@ -8,6 +8,8 @@ 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)|" \
-e "s|__EWORM__|$(realpath --relative-to="${RELTO}" general/eworm-meadow.avif)|" \
-e "s|__QR_CODE__|$(realpath --relative-to="${RELTO}" general/qr-code.png)|" \
< "${0}.d/head.html"
markdown -f toc,idanchor "${1}" | sed \
@ -16,4 +18,7 @@ markdown -f toc,idanchor "${1}" | sed \
-e '/<h[1234] /s|-2c-||g' -e '/<h[1234] /s|--26-amp-3b-||g' \
-e '/The above link may be broken on code hosting sites/s|blockquote|blockquote style="display: none;"|'
printf '</body></html>'
sed \
-e "s|__DATE__|${DATE:-$(date --rfc-email)}|" \
-e "s|__VERSION__|${VERSION:-unknown}|" \
< "${0}.d/foot.html"

View file

@ -0,0 +1,4 @@
<p class="foot">RouterOS Scripts documentation generated on <i>__DATE__</i> for <i>__VERSION__</i></p>
</body></html>

View file

@ -4,3 +4,12 @@
<link rel="stylesheet" type="text/css" href="__STYLE__">
<link rel="icon" type="image/png" href="__LOGO__">
</head><body>
<table><tr>
<td><img src="__EWORM__" alt="eworm on meadow" /></td>
<td><img src="__QR_CODE__" alt="QR code: rsc.eworm.de" /></td>
<td class="head"><span class="top">RouterOS Scripts</span><br />
<span class="bottom">a collection of scripts for MikroTik RouterOS</span></td>
</tr></table>
<hr />

View file

@ -6,6 +6,14 @@
<script src="logo-color.d/script.js"></script>
</head><body>
<table><tr>
<td><img src="../general/eworm-meadow.avif" alt="eworm on meadow" /></td>
<td><img src="../general/qr-code.png" alt="QR code: rsc.eworm.de" /></td>
<td class="head"><span class="top">RouterOS Scripts</span><br />
<span class="bottom">a collection of scripts for MikroTik RouterOS</span></td>
</tr></table>
<hr />
<h1>Logo Color Changer</h1>
<p><a href="../README.md">⬅️ Go back to main README</a></p>

View file

@ -6,6 +6,14 @@
<script src="notification.d/script.js"></script>
</head><body>
<table><tr>
<td><img src="../general/eworm-meadow.avif" alt="eworm on meadow" /></td>
<td><img src="../general/qr-code.png" alt="QR code: rsc.eworm.de" /></td>
<td class="head"><span class="top">RouterOS Scripts</span><br />
<span class="bottom">a collection of scripts for MikroTik RouterOS</span></td>
</tr></table>
<hr />
<h1>Notification Generator</h1>
<p><a href="../README.md">⬅️ Go back to main README</a></p>

BIN
general/eworm-meadow.avif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -43,6 +43,10 @@ img.logo {
float: left;
border-radius: 50%;
}
p.foot {
color: #777;
text-align: center;
}
p.heading {
margin: 0px;
font-weight: bold;
@ -68,6 +72,18 @@ pre code {
span.link {
color: #863600;
}
td.head {
line-height: 1.2;
padding: 0 2em;
}
td.head .top {
font-size: 250%;
font-weight: bold;
}
td.head .bottom {
font-size: 125%;
color: #555;
}
@media only screen and (orientation: landscape) {
body {
margin-left: 10vw;