瀏覽代碼

switch sh background color depending on dark-mode

Thomas Buck 2 年之前
父節點
當前提交
23bba16d7e
共有 4 個檔案被更改,包括 6 行新增1 行删除
  1. 0
    1
      page.html
  2. 2
    0
      static/css/print.css
  3. 1
    0
      static/css/sh_darkness.min.css
  4. 3
    0
      static/css/style.css

+ 0
- 1
page.html 查看文件

@@ -16,7 +16,6 @@ else:
16 16
     <link rel="alternate" type="application/rss+xml" title="xythobuz.de" href="rss.xml" />
17 17
     <link type="text/css" rel="stylesheet" href="css/style.css" />
18 18
     <link type="text/css" rel="stylesheet" href="css/print.css" media="print" />
19
-    <link type="text/css" rel="stylesheet" href="css/sh_bright.min.css" />
20 19
     <link type="text/css" rel="stylesheet" href="css/gh-fork-ribbon.css" />
21 20
     <link type="text/css" rel="stylesheet" href="css/lightgallery.min.css" />
22 21
     <script type="text/javascript" src="js/sh_main.js"></script>

+ 2
- 0
static/css/print.css 查看文件

@@ -1,3 +1,5 @@
1
+@import "sh_bright.min.css";
2
+
1 3
 .wrap {
2 4
     display: none;
3 5
 }

+ 1
- 0
static/css/sh_darkness.min.css 查看文件

@@ -0,0 +1 @@
1
+pre.sh_sourceCode{background-color:#000;color:#fff;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_keyword{color:#ff0;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_type{color:#0f0;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_string{color:#abab00;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_regexp{color:#abab00;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_specialchar{color:#bfbfbf;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_comment{color:#888;font-weight:normal;font-style:italic;}pre.sh_sourceCode .sh_number{color:#619de7;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_preproc{color:#1da3cf;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_symbol{color:#f0f;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_function{color:#f34627;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_cbracket{color:#f0f;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_url{color:#abab00;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_date{color:#ff0;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_time{color:#ff0;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_file{color:#ff0;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_ip{color:#abab00;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_name{color:#abab00;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_variable{color:#26e0e7;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_oldfile{color:#bfbfbf;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_newfile{color:#abab00;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_difflines{color:#ff0;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_selector{color:#26e0e7;font-weight:normal;font-style:normal;}pre.sh_sourceCode .sh_property{color:#ff0;font-weight:bold;font-style:normal;}pre.sh_sourceCode .sh_value{color:#abab00;font-weight:bold;font-style:normal;}

+ 3
- 0
static/css/style.css 查看文件

@@ -1,3 +1,6 @@
1
+@import "sh_bright.min.css" (prefers-color-scheme: light);
2
+@import "sh_darkness.min.css" (prefers-color-scheme: dark);
3
+
1 4
 body {
2 5
     font-size: 1.2em;
3 6
     font-family: 'Droid Sans', sans-serif;

Loading…
取消
儲存