|
| 1 | +{% let path_prefix = crate::path_prefix() %} |
1 | 2 | <!DOCTYPE html> |
2 | 3 | <html lang="en"> |
3 | 4 | <head> |
|
7 | 8 | <title>{{ page.title }}{% block title_content %}{% endblock %}</title> |
8 | 9 | {% match theme %} |
9 | 10 | {% when Some with (Theme::Dark) %} |
10 | | - <link rel="stylesheet" href="{{ page.assets.css.dark.route() }}"> |
| 11 | + <link rel="stylesheet" href="{{ path_prefix }}{{ page.assets.css.dark.route() }}"> |
11 | 12 | {% when Some with (Theme::Light) %} |
12 | | - <link rel="stylesheet" href="{{ page.assets.css.light.route() }}"> |
| 13 | + <link rel="stylesheet" href="{{ path_prefix }}{{ page.assets.css.light.route() }}"> |
13 | 14 | {% when Some with (Theme::System) %} |
14 | | - <link rel="stylesheet" href="{{ page.assets.css.dark.route() }}" media="(prefers-color-scheme: dark)"> |
15 | | - <link rel="stylesheet" href="{{ page.assets.css.light.route() }}" media="(prefers-color-scheme: light)"> |
| 15 | + <link rel="stylesheet" href="{{ path_prefix }}{{ page.assets.css.dark.route() }}" media="(prefers-color-scheme: dark)"> |
| 16 | + <link rel="stylesheet" href="{{ path_prefix }}{{ page.assets.css.light.route() }}" media="(prefers-color-scheme: light)"> |
16 | 17 | {% when None %} |
17 | | - <link rel="stylesheet" href="{{ page.assets.css.dark.route() }}" media="(prefers-color-scheme: dark)"> |
18 | | - <link rel="stylesheet" href="{{ page.assets.css.light.route() }}" media="(prefers-color-scheme: light)"> |
| 18 | + <link rel="stylesheet" href="{{ path_prefix }}{{ page.assets.css.dark.route() }}" media="(prefers-color-scheme: dark)"> |
| 19 | + <link rel="stylesheet" href="{{ path_prefix }}{{ page.assets.css.light.route() }}" media="(prefers-color-scheme: light)"> |
19 | 20 | {% endmatch %} |
20 | | - <link rel="stylesheet" href="{{ page.assets.css.style.route() }}"> |
21 | | - <link rel="icon" href="{{ page.assets.favicon.route() }}" type="image/png"> |
| 21 | + <link rel="stylesheet" href="{{ path_prefix }}{{ page.assets.css.style.route() }}"> |
| 22 | + <link rel="icon" href="{{ path_prefix }}{{ page.assets.favicon.route() }}" type="image/png"> |
22 | 23 | {% block head %}{% endblock %} |
23 | 24 | </head> |
24 | 25 | <body> |
25 | 26 | <div id="main-container"> |
26 | 27 | <header> |
27 | 28 | <div class="nav-group"> |
28 | 29 | <div class="nav-item"> |
29 | | - <a href="/" class="nav-button" title="home" aria-label="home"> |
| 30 | + <a href="{{ path_prefix }}/" class="nav-button" title="home" aria-label="home"> |
30 | 31 | <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"> |
31 | 32 | <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m4 12 8-8 8 8M6 10.5V19a1 1 0 0 0 1 1h3v-3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3h3a1 1 0 0 0 1-1v-8.5"/> |
32 | 33 | </svg> |
|
40 | 41 | {% match theme %} |
41 | 42 | {% when None %} |
42 | 43 | <div class="nav-item" id="dark-switch"> |
43 | | - <a href="/theme?pref=dark" class="nav-button" title="switch to dark" aria-label="switch to dark"> |
| 44 | + <a href="{{ path_prefix }}/theme?pref=dark" class="nav-button" title="switch to dark" aria-label="switch to dark"> |
44 | 45 | <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"> |
45 | 46 | <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 1-.5-17.986V3c-.354.966-.5 1.911-.5 3a9 9 0 0 0 9 9c.239 0 .254.018.488 0A9.004 9.004 0 0 1 12 21Z"/> |
46 | 47 | </svg> |
47 | 48 | </a> |
48 | 49 | </div> |
49 | 50 | {% when Some with (Theme::System) %} |
50 | 51 | <div class="nav-item" id="dark-switch"> |
51 | | - <a href="/theme?pref=dark" class="nav-button" title="switch to dark" aria-label="switch to dark"> |
| 52 | + <a href="{{ path_prefix }}/theme?pref=dark" class="nav-button" title="switch to dark" aria-label="switch to dark"> |
52 | 53 | <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"> |
53 | 54 | <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 1-.5-17.986V3c-.354.966-.5 1.911-.5 3a9 9 0 0 0 9 9c.239 0 .254.018.488 0A9.004 9.004 0 0 1 12 21Z"/> |
54 | 55 | </svg> |
55 | 56 | </a> |
56 | 57 | </div> |
57 | 58 | {% when Some with (Theme::Dark) %} |
58 | 59 | <div class="nav-item" id="light-switch"> |
59 | | - <a href="/theme?pref=light" class="nav-button" title="switch to light" aria-label="switch to light"> |
| 60 | + <a href="{{ path_prefix }}/theme?pref=light" class="nav-button" title="switch to light" aria-label="switch to light"> |
60 | 61 | <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"> |
61 | 62 | <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 5V3m0 18v-2M7.05 7.05 5.636 5.636m12.728 12.728L16.95 16.95M5 12H3m18 0h-2M7.05 16.95l-1.414 1.414M18.364 5.636 16.95 7.05M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/> |
62 | 63 | </svg> |
63 | 64 | </a> |
64 | 65 | </div> |
65 | 66 | {% when Some with (Theme::Light) %} |
66 | | - <div class="nav-item" id="system-switch"> <a href="/theme?pref=system" class="nav-button" title="switch to system" aria-label="switch to system"> |
| 67 | + <div class="nav-item" id="system-switch"> <a href="{{ path_prefix }}/theme?pref=system" class="nav-button" title="switch to system" aria-label="switch to system"> |
67 | 68 | <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"> |
68 | 69 | <path stroke="currentColor" stroke-linecap="square" stroke-linejoin="round" stroke-width="2" d="M10 19H5a1 1 0 0 1-1-1v-1a3 3 0 0 1 3-3h2m10 1a3 3 0 0 1-3 3m3-3a3 3 0 0 0-3-3m3 3h1m-4 3a3 3 0 0 1-3-3m3 3v1m-3-4a3 3 0 0 1 3-3m-3 3h-1m4-3v-1m-2.121 1.879-.707-.707m5.656 5.656-.707-.707m-4.242 0-.707.707m5.656-5.656-.707.707M12 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"/> |
69 | 70 | </svg> |
|
0 commit comments