add makros to the toolchain

This commit is contained in:
opfez 2021-10-03 00:12:26 +02:00
parent 9d055989c0
commit 35dda631cf
6 changed files with 17 additions and 9 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
format
site/*
resources/style.css
resources/footer.html

View File

@ -1,6 +1,5 @@
Writan:
- Additional error handling in the formatter.
- Remove extraneous <p> tags in output.
Pages:
- Add a category theory page (more general, math).

8
gen.sh
View File

@ -2,10 +2,10 @@
# Strip the CSS file of whitespace to reduce file size
echo "Generating CSS"
sed "s/FG/#ddd/g" < resources/style-formatted.css |
sed "s/NORMALBG/#111/g" |
sed "s/CODEBG/#1a1a1a/g" |
tr -d " \t\n\r" > resources/style.css
makros resources/style-formatted.css | tr -d " \t\n\r" > resources/style.css
# Generate the footer
makros resources/_footer.html > resources/footer.html
# Generate HTML pages from Writan sources
echo "Generating pages"

6
resources/_footer.html Normal file
View File

@ -0,0 +1,6 @@
DATE @ date +%s
<hr>
<p><a href="index.html">index</a> | Last generated DATE
</body>
</html>

View File

@ -1,4 +0,0 @@
<hr>
<p><a href="index.html">index</a>
</body>
</html>

View File

@ -1,3 +1,8 @@
FG = #ddd
NORMALBG = #111
CODEBG = #1a1a1a
DATE @ date
body {
color: FG;
background: NORMALBG;
@ -50,3 +55,4 @@ hr {
text-align: left;
margin-left: 0;
}
DATE