mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 09:59:28 +00:00
Merge branch 'contrib-html-head-foot' into next
This commit is contained in:
commit
39fe8c2ae6
8 changed files with 56 additions and 2 deletions
6
Makefile
6
Makefile
|
|
@ -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
|
||||
|
|
@ -19,7 +23,7 @@ checksums.json: contrib/checksums.sh $(ALL_RSC)
|
|||
|
||||
docs: $(HTML)
|
||||
|
||||
%.html: %.md general/style.css 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.d/foot.html
|
||||
contrib/html.sh $< > $@
|
||||
|
||||
rsc: $(GEN_RSC)
|
||||
|
|
|
|||
|
|
@ -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|-2[7cd]-||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"
|
||||
|
|
|
|||
4
contrib/html.sh.d/foot.html
Normal file
4
contrib/html.sh.d/foot.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
<p class="foot">RouterOS Scripts documentation generated on <i>__DATE__</i> for <i>__VERSION__</i></p>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -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 />
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
BIN
general/eworm-meadow.avif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue