blob: d525ee8d078d584611ac1971c2cd13a5d2bf33fe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
#!/bin/bash
# Regenerate html files.
set -e
( cd linkify; build; )
# generate html/$1.html using /tmp/tags
process() {
rm -f html/$1.html
convert_html $1
linkify/linkify /tmp/tags html/$1.html
mv html/$1.html.out html/$1.html
}
convert_html() {
vim -c "set number" -c TOhtml -c write -c qall $1
sed -i 's,<title>.*/mu/,<title>Mu - ,' $1.html
sed -i 's,\.html</title>,</title>,' $1.html
sed -i 's/^\* { \(.*\) }/* { font-size: 12pt; \1 }/g' $1.html
sed -i 's/^body { \(.*\) }/body { font-size: 12pt; \1 }/g' $1.html
# turn most code grey
sed -i 's/#eeeeee/#aaaaaa/g' $1.html
# ..so that we can use white for cross-links (underlining only on hover)
sed -i '/^body {/ a a:hover { text-decoration: underline; }' $1.html
sed -i '/^body {/ a a { color:#eeeeee; text-decoration: none; }' $1.html
# line numbers are darker still
sed -i 's/^\.LineNr .*/.LineNr { color: #444444; }/' $1.html # line numbers
# tweak contrast for remaining colors
sed -i 's/^\.Constant .*/.Constant { color: #00a0a0; }/' $1.html
sed -i 's/^\.muControl .*/.muControl { color: #c0a020; }/' $1.html
# real links in comments continue to be the usual blue
sed -i 's/^\.Comment .*/.Comment { color: #9090ff; }\n.Comment a { color:#0000ee; text-decora
|