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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
#+BEGIN_EXPORT html
<h1>Theming and Templating</h1>
#+END_EXPORT
#+BEGIN_SRC makefile :tangle theme.mk
SASS := site/style/main.sass
CSS := $(SASS:.sass=.css)
theme-build : ${SASS}
@cleopatra echo Compiling "${CSS}"
@sassc --style=compressed --sass ${SASS} ${CSS}
soupault-build : theme-build
ARTIFACTS += ${CSS}
#+END_SRC
* Main HTML Template
#+BEGIN_SRC html :tangle templates/main.html :noweb no-export
<html lang="en">
<<head>>
<<body>>
</html>
#+END_SRC
** ~<head>~
#+NAME: head
#+BEGIN_SRC html :noweb no-export
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<title></title>
<<syncloading_html>>
<<asyncloading_html>>
</head>
#+END_SRC
*** Assets Loading
#+NAME: syncloading_html
#+BEGIN_SRC html
<link
href="https://soap.coffee/+vendors/normalize.css.8.0.1/normalize.css"
rel="stylesheet">
<link rel="stylesheet" href="/style/main.css">
<link rel="icon" type="image/ico" href="/img/merida.webp">
#+END_SRC
#+NAME: asyncloading_js
#+BEGIN_SRC js
let noscript = document.getElementById('asyncloading');
noscript.insertAdjacentHTML('beforebegin', noscript.innerText);
noscript.parentNode.removeChild(noscript);
#+END_SRC
#+NAME: asyncloading_html
#+BEGIN_SRC html
<noscript id="asyncloading">
<link href="https://soap.coffee/+vendors/fira-code.2+swap/font.css"
rel="stylesheet">
<link href="https://soap.coffee/+vendors/et-book+swap/font.css"
rel="stylesheet">
<link href="https://soap.coffee/+vendors/katex.0.11.1+swap/katex.css"
rel="stylesheet">
<link href="https://soap.coffee/+vendors/fork-awesome.1.1.7+swap/css/fork-awesome.min.css"
rel="stylesheet">
</nolink>
#+END_SRC
** ~body~
#+NAME: body
#+BEGIN_SRC html :noweb no-export
<body id="default">
<header>
<ul>
<li> <a href="/news">News</a></li>
<li> <a href="/">Technical Articles</a></li>
<li> <a href="/projects">Projects</a></li>
</ul>
</header>
<main>
<!-- your page content will be inserted here,
see the content_selector option in soupault.conf -->
</main>
<footer>
<img src="https://soap.coffee/~lthms/img/merida.webp"
alt="Merida from the movie Ralph 2.0 from Disney is the
avatar I use most of the time on the Internet"
title="lthms’ avatar" />
<p>
Hi, I’m <strong>lthms</strong>, and this is my humble corner of the
Internet. You are very welcome here! If you are interested in
<em>functional programming</em>, <em>formal verification</em>, or <em>free
software projects in the making</em>, you may even enjoy your stay!
</p>
<p>
This website has been generated using a collection of
<a href="/posts/Thanks.html">awesome free software projects</a>. You can
have a look at <a href="https://code.soap.coffee/writing/lthms">the source
of this webpage</a>, and if you have find an error, feel free to <a
href="mailto:">shoot me an email</a>.
</p>
</footer>
<script>
<<asyncloading_js>>
</script>
</body>
#+END_SRC
* Main SASS File
#+BEGIN_SRC sass :tangle site/style/main.sass
*
box-sizing : border-box
html
width : 100%
font-size : 100%
body
padding : 2rem
main p,
main h1,
main h2,
main h3,
main h4,
main h5,
main h6,
main ul,
main dl,
main ol,
header,
footer
max-width : 35rem
line-height : 140%
header ul,
footer p
font-size : 90%
header ul
padding : 0
margin : 0
list-style-type : none
display : flex
gap : 1rem
main
padding-top : 1rem
padding-bottom : 1rem
footer img
border-radius : 100%
max-width : 7rem
float : right
margin-left : 1rem
margin-bottom : 1rem
code,
tt,
pre
font-family : 'Fira Code', monospace
font-size : 80%
line-height : 140%
@import plugins
@import org
@import coq
#+END_SRC
|