Skip to content

Commit b552c56

Browse files
committed
fix header css loading
1 parent d38199e commit b552c56

1 file changed

Lines changed: 115 additions & 115 deletions

File tree

  • source/_templates/sphinx_minoo_theme/includes
Lines changed: 115 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,115 @@
1-
2-
<meta charset="utf-8">
3-
<meta name="viewport" content="width=device-width, initial-scale=1">
4-
<link rel="alternate" href="https://pythonpersian.com/{{ pagename }}.html" hreflang="fa-ir" />
5-
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vazir-font@28.0.0/dist/font-face.css">
6-
7-
{{ metatags }}
8-
9-
{%- block htmltitle %}
10-
{% if pagename != "index" %}
11-
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
12-
{% else %}
13-
<title>{{ title|striptags|e }}</title>
14-
{% endif %}
15-
{%- endblock %}
16-
17-
18-
<link rel="shortcut icon" type="image/x-icon" href="{{ pathto('_static/favicon.ico', 1) }}"/>
19-
20-
21-
{% if not embedded %}
22-
{% if use_opensearch %}
23-
<link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}">
24-
{% endif %}
25-
{% endif %}
26-
27-
{% for cssfile in css_files %}
28-
<link rel="stylesheet" type=text/css href="{{ pathto(cssfile, 1) }}">
29-
{% endfor %}
30-
{% for cssfile in extra_css_files %}
31-
<link rel="stylesheet" type=text/css href="{{ pathto(cssfile, 1) }}">
32-
{% endfor %}
33-
34-
<link rel="stylesheet" type=text/css href="{{ pathto('_static/font-awesome.min.css', 1) }}">
35-
<link rel="stylesheet" type=text/css href="{{ pathto('_static/bootstrap.min.css', 1) }}">
36-
<link rel="stylesheet" type=text/css href="{{ pathto('_static/pygment-solarized-light.css', 1) }}">
37-
38-
{% if theme_direction == "ltr" %}
39-
<link rel="stylesheet" type=text/css href="{{ pathto('_static/minoo-ltr.css', 1) }}">
40-
{% else %}
41-
<link rel="stylesheet" type="text/css" href="{{ pathto('_static/minoo-20240224.css', 1) }}">
42-
{% endif %}
43-
44-
<link id="dark-style" rel="stylesheet" type="text/css" href="{{ pathto('_static/minoo-dark.css', 1) }}" disabled>
45-
46-
{%- block linktags %}
47-
{%- if hasdoc('about') %}
48-
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
49-
{%- endif %}
50-
{%- if hasdoc('genindex') %}
51-
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
52-
{%- endif %}
53-
{%- if hasdoc('search') %}
54-
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
55-
{%- endif %}
56-
{%- if hasdoc('copyright') %}
57-
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
58-
{%- endif %}
59-
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto(master_doc) }}" />
60-
{%- if parents %}
61-
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
62-
{%- endif %}
63-
{%- if next %}
64-
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
65-
{%- endif %}
66-
{%- if prev %}
67-
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
68-
{%- endif %}
69-
{%- endblock %}
70-
71-
72-
{% if not embedded %}
73-
<script type="text/javascript">
74-
var DOCUMENTATION_OPTIONS = {
75-
URL_ROOT:'{{ url_root }}',
76-
VERSION:'{{ release|e }}',
77-
COLLAPSE_INDEX:false,
78-
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
79-
HAS_SOURCE: {{ has_source|lower }}
80-
};
81-
</script>
82-
83-
{% set script_files = script_files + ['_static/searchtools.js'] %}
84-
85-
{%- for scriptfile in script_files %}
86-
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
87-
{%- endfor %}
88-
{% endif %}
89-
90-
<!-- Google tag (gtag.js) -->
91-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-KZ992ZME9G"></script>
92-
<script>
93-
window.dataLayer = window.dataLayer || [];
94-
function gtag(){dataLayer.push(arguments);}
95-
gtag('js', new Date());
96-
97-
gtag('config', 'G-KZ992ZME9G');
98-
</script>
99-
100-
<script type="text/javascript" src="{{ pathto('_static/minoo-20230505.js', 1) }}"></script>
101-
<script type="text/javascript" src="{{ pathto('_static/modernizr.min.js', 1) }}"></script>
102-
103-
<script async defer src="https://buttons.github.io/buttons.js"></script>
104-
105-
<script>
106-
const darkThemeLink = document.getElementById('dark-style');
107-
function applySystemThemePreference() {
108-
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
109-
darkThemeLink.disabled = !prefersDark;
110-
}
111-
// Initial check
112-
applySystemThemePreference();
113-
// Listen for changes to system theme
114-
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', applySystemThemePreference);
115-
</script>
1+
2+
<meta charset="utf-8">
3+
<meta name="viewport" content="width=device-width, initial-scale=1">
4+
<link rel="alternate" href="https://pythonpersian.com/{{ pagename }}.html" hreflang="fa-ir" />
5+
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vazir-font@28.0.0/dist/font-face.css">
6+
7+
{{ metatags }}
8+
9+
{%- block htmltitle %}
10+
{% if pagename != "index" %}
11+
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
12+
{% else %}
13+
<title>{{ title|striptags|e }}</title>
14+
{% endif %}
15+
{%- endblock %}
16+
17+
18+
<link rel="shortcut icon" type="image/x-icon" href="{{ pathto('_static/favicon.ico', 1) }}"/>
19+
20+
21+
{% if not embedded %}
22+
{% if use_opensearch %}
23+
<link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}">
24+
{% endif %}
25+
{% endif %}
26+
27+
{% for cssfile in css_files %}
28+
<link rel="stylesheet" href="{{ pathto(cssfile.filename, 1) }}" type="text/css" />
29+
{% endfor %}
30+
{% for cssfile in extra_css_files %}
31+
<link rel="stylesheet" href="{{ pathto(cssfile.filename, 1) }}" type="text/css" />
32+
{% endfor %}
33+
34+
<link rel="stylesheet" type=text/css href="{{ pathto('_static/font-awesome.min.css', 1) }}">
35+
<link rel="stylesheet" type=text/css href="{{ pathto('_static/bootstrap.min.css', 1) }}">
36+
<link rel="stylesheet" type=text/css href="{{ pathto('_static/pygment-solarized-light.css', 1) }}">
37+
38+
{% if theme_direction == "ltr" %}
39+
<link rel="stylesheet" type=text/css href="{{ pathto('_static/minoo-ltr.css', 1) }}">
40+
{% else %}
41+
<link rel="stylesheet" type="text/css" href="{{ pathto('_static/minoo-20240224.css', 1) }}">
42+
{% endif %}
43+
44+
<link id="dark-style" rel="stylesheet" type="text/css" href="{{ pathto('_static/minoo-dark.css', 1) }}" disabled>
45+
46+
{%- block linktags %}
47+
{%- if hasdoc('about') %}
48+
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
49+
{%- endif %}
50+
{%- if hasdoc('genindex') %}
51+
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
52+
{%- endif %}
53+
{%- if hasdoc('search') %}
54+
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
55+
{%- endif %}
56+
{%- if hasdoc('copyright') %}
57+
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
58+
{%- endif %}
59+
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto(master_doc) }}" />
60+
{%- if parents %}
61+
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
62+
{%- endif %}
63+
{%- if next %}
64+
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
65+
{%- endif %}
66+
{%- if prev %}
67+
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
68+
{%- endif %}
69+
{%- endblock %}
70+
71+
72+
{% if not embedded %}
73+
<script type="text/javascript">
74+
var DOCUMENTATION_OPTIONS = {
75+
URL_ROOT:'{{ url_root }}',
76+
VERSION:'{{ release|e }}',
77+
COLLAPSE_INDEX:false,
78+
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
79+
HAS_SOURCE: {{ has_source|lower }}
80+
};
81+
</script>
82+
83+
{% set script_files = script_files + ['_static/searchtools.js'] %}
84+
85+
{%- for scriptfile in script_files %}
86+
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
87+
{%- endfor %}
88+
{% endif %}
89+
90+
<!-- Google tag (gtag.js) -->
91+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-KZ992ZME9G"></script>
92+
<script>
93+
window.dataLayer = window.dataLayer || [];
94+
function gtag(){dataLayer.push(arguments);}
95+
gtag('js', new Date());
96+
97+
gtag('config', 'G-KZ992ZME9G');
98+
</script>
99+
100+
<script type="text/javascript" src="{{ pathto('_static/minoo-20230505.js', 1) }}"></script>
101+
<script type="text/javascript" src="{{ pathto('_static/modernizr.min.js', 1) }}"></script>
102+
103+
<script async defer src="https://buttons.github.io/buttons.js"></script>
104+
105+
<script>
106+
const darkThemeLink = document.getElementById('dark-style');
107+
function applySystemThemePreference() {
108+
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
109+
darkThemeLink.disabled = !prefersDark;
110+
}
111+
// Initial check
112+
applySystemThemePreference();
113+
// Listen for changes to system theme
114+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', applySystemThemePreference);
115+
</script>

0 commit comments

Comments
 (0)