mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 09:59:28 +00:00
contrib/html: include stylesheet via link
This commit is contained in:
parent
619914dcc6
commit
bdf170a7fe
4 changed files with 40 additions and 12 deletions
2
Makefile
2
Makefile
|
|
@ -11,7 +11,7 @@ HTML = $(MARKDOWN:.md=.html)
|
||||||
|
|
||||||
all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json
|
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 $< > $@
|
contrib/html.sh $< > $@
|
||||||
|
|
||||||
%.capsman.rsc: %.template.rsc Makefile
|
%.capsman.rsc: %.template.rsc Makefile
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,12 @@
|
||||||
|
|
||||||
set -e
|
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 \
|
markdown -f toc,idanchor "${1}" | sed \
|
||||||
-e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \
|
-e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,6 @@
|
||||||
<!DOCTYPE html><html lang="en">
|
<!DOCTYPE html><html lang="en">
|
||||||
<head><title>RouterOS Scripts :: __TITLE__</title>
|
<head><title>RouterOS Scripts :: __TITLE__</title>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
<style>
|
<link rel="stylesheet" type="text/css" href="__STYLE__">
|
||||||
body { font-family: sans-serif; }
|
|
||||||
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; }
|
|
||||||
pre { background-color: #f8f8f8; border: 1px solid #ccc; overflow: auto; padding: 6px 10px; border-radius: 3px; }
|
|
||||||
pre code { margin: 0; padding: 0; border: 0; }
|
|
||||||
</style>
|
|
||||||
<link rel="icon" href="/logo.png" type="image/png">
|
<link rel="icon" href="/logo.png" type="image/png">
|
||||||
</head><body>
|
</head><body>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,28 @@ body {
|
||||||
font-family: fira-sans, sans-serif;
|
font-family: fira-sans, sans-serif;
|
||||||
font-size: 10pt;
|
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 {
|
div.notification {
|
||||||
position: relative;
|
position: relative;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
@ -31,6 +53,16 @@ p.hint {
|
||||||
pre {
|
pre {
|
||||||
font-family: fira-mono, monospace;
|
font-family: fira-mono, monospace;
|
||||||
white-space: pre-wrap;
|
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 {
|
span.link {
|
||||||
color: #863600;
|
color: #863600;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue