Update CSS and markdown

1caf2258ad13c1c66839be7e90805c0800b84c20
Alexis Sellier committed ago 1 parent cbb304f4
build +1 -1
53 53
54 54
    header, body = File.read(input).split(/\n\n/, 2)
55 55
    result = header && header.strip.match(/^<!--(.*)-->$/m)
56 56
    meta = result[1] || abort("article #{input} is not well formed")
57 57
58 -
    @body = CommonMarker.render_doc(body, [:FOOTNOTES]).to_html
58 +
    @body = CommonMarker.render_doc(body, [:FOOTNOTES, :SMART]).to_html
59 59
60 60
    attrs = {}
61 61
    meta.strip.each_line do |l|
62 62
      matches = l.match(/^(\w+)\s*:\s*(.*)$/)
63 63
      attrs[matches[1].downcase.to_sym] = matches[2].chomp
css/base.css +36 -6
1 1
@charset "utf-8";
2 2
3 3
:root {
4 4
	--highlight-color: aquamarine;
5 5
	--subtle-color: #2c4146;
6 +
	--scrollbar-width: 0.5rem;
6 7
}
7 8
8 9
* {
9 10
	margin: 0;
10 11
	padding: 0;
19 20
	padding: 120px 0 180px 0;
20 21
	line-height: 1.4em;
21 22
	font-size: 1.25rem;
22 23
	scrollbar-width: thin;
23 24
	scrollbar-height: thin;
24 -
	scrollbar-color: var(--highlight-color) var(--subtle-color);
25 +
	scrollbar-color: var(--highlight-color) transparent;
25 26
	-webkit-font-smoothing: antialiased;
26 27
	-moz-osx-font-smoothing: greyscale;
27 28
}
28 29
29 30
body, code, pre, p, kbd, h1, h2, h3, h4, h5 {
30 31
	font-family: "Consolas", "Inconsolata", monospace;
31 32
}
32 33
33 34
/* Chrome/Edge/Safari scrollbar */
34 35
*::-webkit-scrollbar {
35 -
	width: 0.5rem;
36 -
	height: 0.5rem;
36 +
	width: var(--scrollbar-width);
37 +
	height: var(--scrollbar-width);
37 38
}
38 39
*::-webkit-scrollbar-track {
39 40
	background: transparent;
40 41
}
41 42
*::-webkit-scrollbar-thumb {
42 -
	background-color: var(--highlight-color);
43 +
	background: transparent;
43 44
	border-radius: 4px;
44 45
}
46 +
*::-webkit-scrollbar-corner {
47 +
	background: transparent;
48 +
}
49 +
*:hover::-webkit-scrollbar-thumb,
50 +
body::-webkit-scrollbar-thumb {
51 +
	background-color: var(--highlight-color);
52 +
}
45 53
46 54
::selection {
47 55
	background: #9fe7e1;
48 56
}
49 57
77 85
	border: 1px solid #888;
78 86
	margin: 30px 0;
79 87
	outline: none;
80 88
}
81 89
90 +
hr {
91 +
	border: none;
92 +
	border-top: 1px solid var(--subtle-color);
93 +
	margin: 2rem 0;
94 +
}
95 +
82 96
/*
83 97
 * HEADERS
84 98
 */
85 99
86 100
h1, h2, h3, h4 {
110 124
/*
111 125
 * CODE
112 126
 */
113 127
114 128
pre {
115 -
	padding: 1.5rem 1.75rem;
129 +
	padding: 1.5rem 1.75rem calc(1.5rem - var(--scrollbar-width)) 1.75rem;
116 130
	background-color: #060f11;
117 131
	border-radius: 4px;
132 +
	overflow-x: scroll !important;
118 133
}
119 134
pre code {
120 135
	white-space: pre-wrap;
136 +
	white-space: pre;
121 137
}
122 138
123 139
code {
124 140
	color: #a1fde6;
125 141
	white-space: nowrap;
131 147
}
132 148
code.language-rust .comment {
133 149
	color: #4b6267;
134 150
	font-style: italic;
135 151
}
152 +
code.language-rust .op {
153 +
	color: #8b9297;
154 +
}
136 155
code.language-rust .keyword {
137 156
	color: white;
138 157
	font-weight: bold;
139 158
}
159 +
code.language-rust .ref {
160 +
	color: #9bb2b7;
161 +
}
162 +
code.language-rust .macro {
163 +
	color: white;
164 +
	font-weight: bold;
165 +
}
140 166
code.language-rust .special {
141 167
	color: white;
142 168
	font-weight: bold;
143 169
}
170 +
code.language-rust .attr {
171 +
	color: #4b6267;
172 +
	font-weight: bold;
173 +
}
144 174
code.language-rust .string {
145 -
	color: #bbb;
175 +
	color: #aaa;
146 176
}
147 177
code.language-rust .number {
148 178
	color: #fff897;
149 179
}
150 180