|
| 1 | +{% let path_prefix = crate::path_prefix() %} |
1 | 2 | <!DOCTYPE html> |
2 | 3 | <html lang="{{ lang.code() }}"> |
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"> |
22 | | - <noscript><link rel="stylesheet" href="{{ page.assets.css.no_js.route() }}"></noscript> |
| 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"> |
| 23 | + <noscript><link rel="stylesheet" href="{{ path_prefix }}{{ page.assets.css.no_js.route() }}"></noscript> |
23 | 24 | {% block head %}{% endblock %} |
24 | 25 | </head> |
25 | 26 | <body{% block body_attrs %}{% endblock %}> |
26 | 27 | {% block body %} |
27 | 28 | <div id="main-container"> |
28 | 29 | <header> |
29 | 30 | <div class="nav-group"> |
30 | | - <a href="/" class="nav-button" title="{{ lang.t("nav.home") }}" aria-label="{{ lang.t("nav.home") }}"> |
| 31 | + <a href="{{ path_prefix }}/" class="nav-button" title="{{ lang.t("nav.home") }}" aria-label="{{ lang.t("nav.home") }}"> |
31 | 32 | <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><path d="M9 22V12h6v10"/></svg> |
32 | 33 | </a> |
33 | 34 | {% block title %}{% endblock %} |
|
37 | 38 | <div class="theme-switcher"> |
38 | 39 | {% match theme %} |
39 | 40 | {% when None %} |
40 | | - <a href="/theme?pref=dark" class="theme-opt" title="{{ lang.t("theme.dark") }}"> |
| 41 | + <a href="{{ path_prefix }}/theme?pref=dark" class="theme-opt" title="{{ lang.t("theme.dark") }}"> |
41 | 42 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/></svg> |
42 | 43 | </a> |
43 | | - <a href="/theme?pref=light" class="theme-opt" title="{{ lang.t("theme.light") }}"> |
| 44 | + <a href="{{ path_prefix }}/theme?pref=light" class="theme-opt" title="{{ lang.t("theme.light") }}"> |
44 | 45 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg> |
45 | 46 | </a> |
46 | | - <a href="/theme?pref=system" class="theme-opt active" title="{{ lang.t("theme.auto") }}"> |
| 47 | + <a href="{{ path_prefix }}/theme?pref=system" class="theme-opt active" title="{{ lang.t("theme.auto") }}"> |
47 | 48 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="3" rx="2"/><path d="M8 21h8"/><path d="M12 17v4"/></svg> |
48 | 49 | </a> |
49 | 50 | {% when Some with (Theme::System) %} |
50 | | - <a href="/theme?pref=dark" class="theme-opt" title="{{ lang.t("theme.dark") }}"> |
| 51 | + <a href="{{ path_prefix }}/theme?pref=dark" class="theme-opt" title="{{ lang.t("theme.dark") }}"> |
51 | 52 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/></svg> |
52 | 53 | </a> |
53 | | - <a href="/theme?pref=light" class="theme-opt" title="{{ lang.t("theme.light") }}"> |
| 54 | + <a href="{{ path_prefix }}/theme?pref=light" class="theme-opt" title="{{ lang.t("theme.light") }}"> |
54 | 55 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg> |
55 | 56 | </a> |
56 | | - <a href="/theme?pref=system" class="theme-opt active" title="{{ lang.t("theme.auto") }}"> |
| 57 | + <a href="{{ path_prefix }}/theme?pref=system" class="theme-opt active" title="{{ lang.t("theme.auto") }}"> |
57 | 58 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="3" rx="2"/><path d="M8 21h8"/><path d="M12 17v4"/></svg> |
58 | 59 | </a> |
59 | 60 | {% when Some with (Theme::Dark) %} |
60 | | - <a href="/theme?pref=dark" class="theme-opt active" title="{{ lang.t("theme.dark") }}"> |
| 61 | + <a href="{{ path_prefix }}/theme?pref=dark" class="theme-opt active" title="{{ lang.t("theme.dark") }}"> |
61 | 62 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/></svg> |
62 | 63 | </a> |
63 | | - <a href="/theme?pref=light" class="theme-opt" title="{{ lang.t("theme.light") }}"> |
| 64 | + <a href="{{ path_prefix }}/theme?pref=light" class="theme-opt" title="{{ lang.t("theme.light") }}"> |
64 | 65 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg> |
65 | 66 | </a> |
66 | | - <a href="/theme?pref=system" class="theme-opt" title="{{ lang.t("theme.auto") }}"> |
| 67 | + <a href="{{ path_prefix }}/theme?pref=system" class="theme-opt" title="{{ lang.t("theme.auto") }}"> |
67 | 68 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="3" rx="2"/><path d="M8 21h8"/><path d="M12 17v4"/></svg> |
68 | 69 | </a> |
69 | 70 | {% when Some with (Theme::Light) %} |
70 | | - <a href="/theme?pref=dark" class="theme-opt" title="{{ lang.t("theme.dark") }}"> |
| 71 | + <a href="{{ path_prefix }}/theme?pref=dark" class="theme-opt" title="{{ lang.t("theme.dark") }}"> |
71 | 72 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/></svg> |
72 | 73 | </a> |
73 | | - <a href="/theme?pref=light" class="theme-opt active" title="{{ lang.t("theme.light") }}"> |
| 74 | + <a href="{{ path_prefix }}/theme?pref=light" class="theme-opt active" title="{{ lang.t("theme.light") }}"> |
74 | 75 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg> |
75 | 76 | </a> |
76 | | - <a href="/theme?pref=system" class="theme-opt" title="{{ lang.t("theme.auto") }}"> |
| 77 | + <a href="{{ path_prefix }}/theme?pref=system" class="theme-opt" title="{{ lang.t("theme.auto") }}"> |
77 | 78 | <svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="3" rx="2"/><path d="M8 21h8"/><path d="M12 17v4"/></svg> |
78 | 79 | </a> |
79 | 80 | {% endmatch %} |
|
0 commit comments