Single-binary self-hosted Markdown blog on Rust axum: no database, live search, Typst PDF export, and strong SEO.
axumblogdockermarkdownminijinjarustself-hostedtypstvite
1body {
2 min-height: 100vh;
3 display: flex;
4 flex-direction: column;
5 -webkit-font-smoothing: antialiased;
6 -moz-osx-font-smoothing: grayscale;
7 letter-spacing: 0.01em;
8}
9
10// ── Logo ──
11
12.logo {
13 content: "";
14 display: flex;
15 align-items: center;
16 justify-content: center;
17 background-image: linear-gradient(
18 135deg,
19 rgb(14, 63, 180) 0%,
20 rgb(107, 158, 120) 100%
21 );
22 width: 36px;
23 height: 36px;
24 margin-top: auto;
25 margin-bottom: auto;
26 border-radius: 3px;
27 transition: transform 0.25s ease, box-shadow 0.25s ease;
28 position: relative;
29 text-decoration: none !important;
30
31 &::after {
32 content: ">_";
33 font-family: monospace;
34 font-weight: bold;
35 font-size: 14px;
36 color: rgba(255, 255, 255, 0.9);
37 line-height: 1;
38 text-decoration: none;
39 }
40
41 &[style*="width: 20px"]::after {
42 font-size: 8px;
43 }
44
45 &:hover {
46 transform: rotate(12deg) scale(1.08);
47 box-shadow: 0 0 14px rgba(107, 158, 120, 0.3);
48 }
49}
50
51// ── Navbar ──
52
53.navbar {
54 border-bottom: 1px solid rgba(107, 158, 120, 0.06);
55
56 .navbar-toggler {
57 color: rgba(221, 215, 205, 0.7);
58 padding: 0.35rem 0.55rem;
59 font-size: 1rem;
60
61 &:focus { box-shadow: none; }
62 }
63
64 .nav-link {
65 font-size: 0.82rem;
66 font-weight: 500;
67 letter-spacing: 0.04em;
68 padding-left: 1rem !important;
69 padding-right: 1rem !important;
70 text-transform: lowercase;
71 position: relative;
72
73 &::after {
74 content: '';
75 position: absolute;
76 bottom: 0;
77 left: 1rem;
78 right: 1rem;
79 height: 1px;
80 background: #6b9e78;
81 box-shadow: 0 0 6px rgba(107, 158, 120, 0.3);
82 transform: scaleX(0);
83 transition: transform 250ms ease;
84 }
85
86 &:hover::after,
87 &.active::after {
88 transform: scaleX(1);
89 }
90 }
91
92 // ── Mobile (under 768px): stacked drawer ──
93 // The blog navbar shows tag links (ai, coding, databases, …); on phones
94 // they need to stack as a clean drawer beneath the brand row, not float
95 // dim-on-dim into the page content. Top-rule separator, full-width tap
96 // targets, left accent for active.
97 @media (max-width: 767.98px) {
98 .navbar-collapse {
99 width: 100%;
100 border-top: 1px solid rgba(107, 158, 120, 0.08);
101 margin-top: 0.5rem;
102 padding: 0.4rem 0 0.6rem;
103 }
104
105 .navbar-nav {
106 margin-left: 0 !important;
107 width: 100%;
108 }
109
110 .nav-link {
111 padding: 0.65rem 0.75rem !important;
112 border-left: 2px solid transparent;
113 border-radius: 2px;
114 transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
115
116 &::after { display: none; }
117
118 &:hover {
119 background: rgba(221, 215, 205, 0.04);
120 color: #ddd7cd;
121 }
122
123 &.active {
124 color: #ddd7cd;
125 border-left-color: #6b9e78;
126 background: rgba(107, 158, 120, 0.08);
127 }
128 }
129 }
130}
131
132// ── Breadcrumb bar ──
133
134.breadcrumb-bar {
135 background: rgba(107, 158, 120, 0.02);
136 border-bottom: 1px solid rgba(107, 158, 120, 0.04);
137}
138
139// ── Footer ──
140
141footer {
142 padding-top: 4rem;
143 position: relative;
144
145 .links {
146 padding-top: 4rem;
147 padding-bottom: 2rem;
148 position: relative;
149 z-index: 20;
150 }
151
152 .h5 {
153 font-size: 0.72rem;
154 letter-spacing: 0.1em;
155 text-transform: uppercase;
156 color: rgba(201, 168, 76, 0.55);
157 font-weight: 600;
158 }
159
160 p {
161 color: rgba(221, 215, 205, 0.5);
162 font-size: 0.88rem;
163 line-height: 1.75;
164
165 a {
166 color: rgba(221, 215, 205, 0.75);
167 text-decoration: underline;
168 text-underline-offset: 2px;
169 transition: color 200ms ease;
170
171 &:hover {
172 color: #ddd7cd;
173 }
174 }
175 }
176}
177
178// ── Footer bar (sosumi) ──
179
180.footer-bar {
181 background: #070605;
182 border-top: 1px solid rgba(107, 158, 120, 0.05);
183 padding: 1rem 0;
184 color: rgba(221, 215, 205, 0.3);
185 font-size: 0.78rem;
186 letter-spacing: 0.03em;
187 position: relative;
188 z-index: 20;
189
190 small {
191 color: rgba(221, 215, 205, 0.3);
192 }
193
194 &-link {
195 color: rgba(221, 215, 205, 0.3);
196 transition: color 200ms ease;
197
198 &:hover {
199 color: #ddd7cd;
200 }
201 }
202}
203
204// ── Footer animated plane ──
205
206.footer-plane {
207 position: relative;
208 width: 100%;
209 height: 300px;
210 overflow: hidden;
211 z-index: 10;
212 perspective: 350px;
213
214 &-overlay {
215 width: 100%;
216 height: 100%;
217 position: absolute;
218 z-index: 11;
219 background: radial-gradient(
220 ellipse at 50% 50%,
221 rgba(9, 8, 6, 0) 0,
222 rgb(9, 8, 6) 80%
223 );
224 }
225
226 @keyframes footer-plane-keyframes {
227 0% {
228 transform: rotateX(45deg) translateY(-50%);
229 }
230
231 to {
232 transform: rotateX(45deg) translateY(0);
233 }
234 }
235
236 &-grid {
237 position: relative;
238 width: 100%;
239 height: 200%;
240 background-image: linear-gradient(
241 90deg,
242 rgba(107, 158, 120, 0.18) 1px,
243 transparent 0
244 ),
245 linear-gradient(180deg, rgba(107, 158, 120, 0.18) 1px, transparent 0);
246 background-size: 40px 30px;
247 background-repeat: repeat;
248 transform-origin: 100% 0 0;
249 animation: footer-plane-keyframes 17s linear infinite;
250 }
251}
252
253// ── Section labels — terminal-prompt style with amber ──
254
255.section-label {
256 font-size: 0.72rem;
257 font-weight: 600;
258 letter-spacing: 0.1em;
259 text-transform: uppercase;
260 color: #c9a84c;
261
262 &::before {
263 content: '> ';
264 opacity: 0.5;
265 }
266}
267
268// ── Card hover effects ──
269
270.card {
271 transition: border-color 250ms ease, box-shadow 250ms ease;
272
273 &:hover {
274 border-color: rgba(107, 158, 120, 0.18);
275 box-shadow: 0 0 20px rgba(107, 158, 120, 0.04);
276 }
277}
278
279// ── Search form — terminal style ──
280
281.search-form {
282 .search-icon {
283 position: absolute;
284 left: 0.85rem;
285 top: 50%;
286 transform: translateY(-50%);
287 color: #665f56;
288 pointer-events: none;
289 z-index: 2;
290 }
291
292 .search-input {
293 padding-left: 2.5rem;
294 font-size: 0.85rem;
295 letter-spacing: 0.02em;
296 border: 1px solid rgba(107, 158, 120, 0.15);
297 background: rgba(19, 18, 14, 0.6);
298 color: #ddd7cd;
299 transition: border-color 200ms ease, box-shadow 200ms ease;
300
301 &::placeholder {
302 color: #665f56;
303 font-style: normal;
304 }
305
306 &:focus {
307 border-color: rgba(107, 158, 120, 0.4);
308 box-shadow: 0 0 0 2px rgba(107, 158, 120, 0.1);
309 background: #13120e;
310 }
311 }
312}
313
314// ── Live search results ──
315
316#id_search_results .list-group-item {
317 color: #ddd7cd;
318 border-color: rgba(107, 158, 120, 0.08);
319
320 .fw-bold {
321 color: #ddd7cd;
322 }
323
324 &.active {
325 background: rgba(107, 158, 120, 0.12);
326 border-color: rgba(107, 158, 120, 0.2);
327 color: #ddd7cd;
328 }
329
330 &:hover {
331 background: rgba(107, 158, 120, 0.08);
332 }
333}
334
335// ── Blog index filter pills ──
336
337.filter-label {
338 font-size: 0.68rem;
339 font-weight: 600;
340 letter-spacing: 0.1em;
341 text-transform: uppercase;
342 color: #c9a84c;
343 opacity: 0.7;
344}
345
346.filter-divider {
347 width: 1px;
348 height: 1.2rem;
349 background: rgba(221, 215, 205, 0.1);
350 margin: 0 0.25rem;
351}
352
353.btn-filter {
354 background: rgba(221, 215, 205, 0.04);
355 color: #a09890;
356 border: 1px solid rgba(221, 215, 205, 0.08);
357 font-size: 0.75rem;
358 line-height: 1;
359 padding: 0.4rem 0.75rem;
360 display: inline-flex;
361 align-items: center;
362 transition: all 200ms ease;
363
364 &:hover {
365 background: rgba(107, 158, 120, 0.1);
366 color: #ddd7cd;
367 border-color: rgba(107, 158, 120, 0.2);
368 }
369}
370
371.btn-filter-active {
372 background: rgba(107, 158, 120, 0.15);
373 color: #7db88c;
374 border: 1px solid rgba(107, 158, 120, 0.3);
375 font-size: 0.75rem;
376 line-height: 1;
377 padding: 0.4rem 0.75rem;
378 display: inline-flex;
379 align-items: center;
380}
381
382.btn-filter-clear {
383 background: rgba(196, 112, 85, 0.1);
384 color: #c47055;
385 border: 1px solid rgba(196, 112, 85, 0.2);
386 font-size: 0.75rem;
387 line-height: 1;
388 padding: 0.4rem 0.75rem;
389 display: inline-flex;
390 align-items: center;
391 transition: all 200ms ease;
392
393 &:hover {
394 background: rgba(196, 112, 85, 0.2);
395 color: #d88a70;
396 border-color: rgba(196, 112, 85, 0.35);
397 }
398}
399
400// ── Vertical rule override ──
401
402.vr {
403 background-color: rgba(107, 158, 120, 0.12);
404}