Skip to content

Commit ede12ae

Browse files
committed
customize fonts and asciinema
1 parent e3d7693 commit ede12ae

31 files changed

+1491
-312
lines changed

docs/slides/asciinema-player.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../stylesheets/asciinema-player.css
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../javascripts/asciinema-player.min.js

docs/slides/awesome-hello-world.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env python3
2+
import http.server
3+
import socketserver
4+
import time
5+
import threading
6+
import sys
7+
import random
8+
from pathlib import Path
9+
10+
PORT = 8181
11+
HELLO_FILE = Path("/opt/hello/hello.txt")
12+
13+
14+
class HelloHandler(http.server.SimpleHTTPRequestHandler):
15+
def do_GET(self):
16+
self.send_response(200)
17+
self.send_header("Content-type", "text/plain; charset=utf-8")
18+
self.end_headers()
19+
time.sleep(5)
20+
try:
21+
text = HELLO_FILE.read_text()
22+
except Exception as e:
23+
text = f"ERROR: cannot read {HELLO_FILE}: {e}"
24+
self.wfile.write(text.encode("utf-8"))
25+
26+
27+
def noisy_logger():
28+
"""Generate noisy logs forever"""
29+
while True:
30+
r = random.randint(0, 2)
31+
if r == 0:
32+
print(
33+
f"{time.ctime()} DEBUG: heartbeat from awesome-hello-world",
34+
file=sys.stderr,
35+
flush=True,
36+
)
37+
elif r == 1:
38+
print(
39+
f"{time.ctime()} WARN: pretending to have triggered an warning in awesome-hello-world",
40+
file=sys.stderr,
41+
flush=True,
42+
)
43+
else:
44+
print(
45+
f"{time.ctime()} LOG: pretending to log in awesome-hello-world",
46+
file=sys.stderr,
47+
flush=True,
48+
)
49+
50+
time.sleep(0.5)
51+
52+
53+
if __name__ == "__main__":
54+
# Start background noisy logger
55+
threading.Thread(target=noisy_logger, daemon=True).start()
56+
57+
with socketserver.TCPServer(("", PORT), HelloHandler) as httpd:
58+
# print(f"Serving on port {PORT}, reading from {HELLO_FILE}", flush=True)
59+
httpd.serve_forever()
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[Unit]
2+
Description=Awesome Hello World Server
3+
After=network.target
4+
5+
[Service]
6+
ExecStart=/opt/hello/serve-hello.py
7+
ProtectSystem=strict
8+
ProtectHome=yes
9+
10+
[Install]
11+
WantedBy=multi-user.target
12+

docs/slides/customization.html

Lines changed: 1179 additions & 0 deletions
Large diffs are not rendered by default.

docs/slides/dist/theme/night.css

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,28 @@ section.has-light-background h6 {
5555

5656
:root {
5757
--r-heading1-size: 2.11em;
58+
--r-main-font: Atkinson Hyperlegible;
59+
--r-heading-font: Roboto Slab;
60+
--r-heading-font: 'CascadiaCodeNF';
61+
--r-code-font: 'CascadiaCodeNF';
62+
}
63+
64+
.ap-wrapper pre.ap-terminal {
65+
/* border-width: 0em; */
66+
padding: 0;
67+
margin: auto;
68+
font-family: 'CascadiaCodeNF';
69+
}
70+
71+
.fname {
72+
color: var(--r-link-color);
73+
white-space: nowrap;
5874
}
5975

6076
.reveal section {
6177
flex-direction: column;
6278
height: 100%;
63-
justify-content: flex-start;
79+
justify-content: space-evenly;
6480
}
6581

6682
.reveal section .vfill {

docs/slides/fonts.css

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
/* roboto-slab-regular - latin */
2+
3+
@font-face {
4+
font-family: 'CascadiaCodeNF';
5+
font-style: normal;
6+
font-weight: 400;
7+
src: url('./fonts/CascadiaCodeNF.woff2');
8+
}
9+
10+
@font-face {
11+
font-family: 'Roboto Slab';
12+
font-style: normal;
13+
font-weight: 400;
14+
src: local(''),
15+
url('./fonts/roboto-slab-v24-latin-regular.woff2') format('woff2'),
16+
/* Chrome 26+, Opera 23+, Firefox 39+ */
17+
url('./fonts/roboto-slab-v24-latin-regular.woff') format('woff');
18+
/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
19+
}
20+
21+
@font-face {
22+
font-family: 'Noto Color Emoji';
23+
font-style: normal;
24+
font-weight: 400;
25+
src: local(''),
26+
url('./fonts/NotoColorEmoji.ttf') format('truetype');
27+
}
28+
29+
@font-face {
30+
font-family: 'Noto Emoji';
31+
font-style: normal;
32+
font-weight: 400;
33+
src: local(''),
34+
/* url('./fonts/Noto_Emoji/NotoEmoji-VariableFont_wght.ttf') format('ttf'); */
35+
url('./fonts/NotoEmoji-VariableFont_wght.ttf') format('truetype');
36+
}
37+
38+
/* noto-sans-regular - latin */
39+
@font-face {
40+
font-family: 'Noto Sans';
41+
font-style: normal;
42+
font-weight: 400;
43+
src: local(''),
44+
url('./fonts/noto-sans-v27-latin-regular.woff2') format('woff2'),
45+
/* Chrome 26+, Opera 23+, Firefox 39+ */
46+
url('./fonts/noto-sans-v27-latin-regular.woff') format('woff');
47+
/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
48+
}
49+
50+
/* noto-sans-italic - latin */
51+
@font-face {
52+
font-family: 'Noto Sans';
53+
font-style: italic;
54+
font-weight: 400;
55+
src: local(''),
56+
url('./fonts/noto-sans-v27-latin-italic.woff2') format('woff2'),
57+
/* Chrome 26+, Opera 23+, Firefox 39+ */
58+
url('./fonts/noto-sans-v27-latin-italic.woff') format('woff');
59+
/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
60+
}
61+
62+
/* lato-regular - latin */
63+
@font-face {
64+
font-family: 'Lato';
65+
font-style: normal;
66+
font-weight: 400;
67+
src: local(''),
68+
url('./fonts/lato-v23-latin-regular.woff2') format('woff2'),
69+
/* Chrome 26+, Opera 23+, Firefox 39+ */
70+
url('./fonts/lato-v23-latin-regular.woff') format('woff');
71+
/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
72+
}
73+
74+
/* lato-italic - latin */
75+
@font-face {
76+
font-family: 'Lato';
77+
font-style: italic;
78+
font-weight: 400;
79+
src: local(''),
80+
url('./fonts/lato-v23-latin-italic.woff2') format('woff2'),
81+
/* Chrome 26+, Opera 23+, Firefox 39+ */
82+
url('./fonts/lato-v23-latin-italic.woff') format('woff');
83+
/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
84+
}
85+
86+
/* atkinson-hyperlegible-regular - latin */
87+
@font-face {
88+
font-family: 'Atkinson Hyperlegible';
89+
font-style: normal;
90+
font-weight: 400;
91+
src: local(''),
92+
url('./fonts/atkinson-hyperlegible-v10-latin-regular.woff2') format('woff2'),
93+
/* Chrome 26+, Opera 23+, Firefox 39+ */
94+
url('./fonts/atkinson-hyperlegible-v10-latin-regular.woff') format('woff');
95+
/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
96+
}
97+
98+
/* atkinson-hyperlegible-italic - latin */
99+
@font-face {
100+
font-family: 'Atkinson Hyperlegible';
101+
font-style: italic;
102+
font-weight: 400;
103+
src: local(''),
104+
url('./fonts/atkinson-hyperlegible-v10-latin-italic.woff2') format('woff2'),
105+
/* Chrome 26+, Opera 23+, Firefox 39+ */
106+
url('./fonts/atkinson-hyperlegible-v10-latin-italic.woff') format('woff');
107+
/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
108+
}
109+
110+
/* zilla-slab-regular - latin */
111+
@font-face {
112+
font-family: 'Zilla Slab';
113+
font-style: normal;
114+
font-weight: 400;
115+
src: local(''),
116+
url('./fonts/zilla-slab-v11-latin-regular.woff2') format('woff2'),
117+
/* Chrome 26+, Opera 23+, Firefox 39+ */
118+
url('./fonts/zilla-slab-v11-latin-regular.woff') format('woff');
119+
/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
120+
}
121+
122+
/* zilla-slab-600 - latin */
123+
@font-face {
124+
font-family: 'Zilla Slab';
125+
font-style: normal;
126+
font-weight: 600;
127+
src: local(''),
128+
url('./fonts/zilla-slab-v11-latin-600.woff2') format('woff2'),
129+
/* Chrome 26+, Opera 23+, Firefox 39+ */
130+
url('./fonts/zilla-slab-v11-latin-600.woff') format('woff');
131+
/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
132+
}
963 KB
Binary file not shown.
10.2 MB
Binary file not shown.
1.9 MB
Binary file not shown.

0 commit comments

Comments
 (0)