diff options
author | Mole Shang <[email protected]> | 2023-08-17 17:29:45 +0800 |
---|---|---|
committer | Mole Shang <[email protected]> | 2023-08-17 17:29:45 +0800 |
commit | b932add15d89ab854935cd15930c57b3616ea020 (patch) | |
tree | 489a189249c937ee6cca3adb8eabda7338a35471 /templates/base.html | |
parent | 7f3e4a91691cc8dfc1fc0fb74def6a069ea72e27 (diff) | |
download | Seje2-b932add15d89ab854935cd15930c57b3616ea020.tar.gz Seje2-b932add15d89ab854935cd15930c57b3616ea020.tar.bz2 Seje2-b932add15d89ab854935cd15930c57b3616ea020.zip |
templates: support conditional code-highlighting
Diffstat (limited to 'templates/base.html')
-rw-r--r-- | templates/base.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html index 793efad..795adb3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -33,9 +33,20 @@ <meta property="og:image:height" content="200" /> <link rel="stylesheet" href="{{ config.base_url }}/style.css"> {% if config.extra.seje_darkmode == "auto" %} + {% if config.markdown.highlight_code and config.markdown.highlight_theme == "css" %} + <link rel="stylesheet" type="text/css" href="/syntax-theme-dark.css" media="(prefers-color-scheme: dark)" /> + <link rel="stylesheet" type="text/css" href="/syntax-theme-light.css" media="(prefers-color-scheme: light)" /> + {% endif %} <link rel="stylesheet" href="{{ config.base_url }}/autodarkmode.css"> {% elif config.extra.seje_darkmode == "always" %} + {% if config.markdown.highlight_code and config.markdown.highlight_theme == "css" %} + <link rel="stylesheet" type="text/css" href="/syntax-theme-dark.css"> + {% endif %} <link rel="stylesheet" href="{{ config.base_url }}/darkmode.css"> + {% else %} + {% if config.markdown.highlight_code and config.markdown.highlight_theme == "css" %} + <link rel="stylesheet" type="text/css" href="/syntax-theme-light.css"> + {% endif %} {% endif %} {% if config.extra.seje_vertical_layout %} <link rel="stylesheet" href="{{ config.base_url }}/vertical.css"> |