Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
冰.封万里
apachecn-dl-zh
提交
dae06d5b
A
apachecn-dl-zh
项目概览
冰.封万里
/
apachecn-dl-zh
与 Fork 源项目一致
Fork自
OpenDocCN / apachecn-dl-zh
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apachecn-dl-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
dae06d5b
编写于
5月 08, 2021
作者:
W
wizardforcel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
2021-05-08 23:03:14
上级
d760bfc3
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
70 addition
and
0 deletion
+70
-0
asset/dark-mode.css
asset/dark-mode.css
+23
-0
asset/dark-mode.js
asset/dark-mode.js
+42
-0
asset/moon.svg
asset/moon.svg
+1
-0
asset/sun.svg
asset/sun.svg
+1
-0
index.html
index.html
+3
-0
未找到文件。
asset/dark-mode.css
0 → 100644
浏览文件 @
dae06d5b
#dark-mode-btn
{
position
:
fixed
;
right
:
20px
;
top
:
100px
;
width
:
25px
;
height
:
25px
;
background-repeat
:
no-repeat
;
background-size
:
cover
;
cursor
:
pointer
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
transition
:
background-image
.15s
ease-in-out
.15s
;
}
.dark-logo
{
background-image
:
url('sun.svg')
;
}
.light-logo
{
background-image
:
url('moon.svg')
;
}
\ No newline at end of file
asset/dark-mode.js
0 → 100644
浏览文件 @
dae06d5b
document
.
addEventListener
(
'
DOMContentLoaded
'
,
function
()
{
var
style
=
document
.
querySelector
(
'
#invert
'
)
if
(
style
==
null
)
{
style
=
document
.
createElement
(
'
style
'
)
style
.
id
=
'
invert
'
document
.
head
.
append
(
style
)
}
var
btn
=
document
.
querySelector
(
'
#dark-mode-btn
'
)
if
(
btn
==
null
)
{
btn
=
document
.
createElement
(
'
div
'
)
btn
.
id
=
'
dark-mode-btn
'
btn
.
classList
.
add
(
'
light-logo
'
)
document
.
body
.
append
(
btn
)
}
var
enableDarkMode
=
function
()
{
style
.
innerText
=
'
html,img,pre,#dark-mode-btn{filter:invert(100%)}
'
btn
.
classList
.
remove
(
'
light-logo
'
)
btn
.
classList
.
add
(
'
dark-logo
'
)
localStorage
.
darkLight
=
'
dark
'
}
var
disableDarkMode
=
function
()
{
style
.
innerText
=
''
btn
.
classList
.
remove
(
'
dark-logo
'
)
btn
.
classList
.
add
(
'
light-logo
'
)
localStorage
.
darkLight
=
'
light
'
}
btn
.
addEventListener
(
'
click
'
,
function
(){
var
currMode
=
localStorage
.
darkLight
||
'
light
'
if
(
currMode
==
'
light
'
)
enableDarkMode
()
else
disableDarkMode
()
})
if
(
localStorage
.
darkLight
==
'
dark
'
)
enableDarkMode
()
})
asset/moon.svg
0 → 100644
浏览文件 @
dae06d5b
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"#ffffff"
stroke=
"#34495e"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
class=
"feather feather-moon"
><path
d=
"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"
></path></svg>
\ No newline at end of file
asset/sun.svg
0 → 100644
浏览文件 @
dae06d5b
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"#ffffff"
stroke=
"#ffffff"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
class=
"feather feather-sun"
><circle
cx=
"12"
cy=
"12"
r=
"5"
></circle><line
x1=
"12"
y1=
"1"
x2=
"12"
y2=
"3"
></line><line
x1=
"12"
y1=
"21"
x2=
"12"
y2=
"23"
></line><line
x1=
"4.22"
y1=
"4.22"
x2=
"5.64"
y2=
"5.64"
></line><line
x1=
"18.36"
y1=
"18.36"
x2=
"19.78"
y2=
"19.78"
></line><line
x1=
"1"
y1=
"12"
x2=
"3"
y2=
"12"
></line><line
x1=
"21"
y1=
"12"
x2=
"23"
y2=
"12"
></line><line
x1=
"4.22"
y1=
"19.78"
x2=
"5.64"
y2=
"18.36"
></line><line
x1=
"18.36"
y1=
"5.64"
x2=
"19.78"
y2=
"4.22"
></line></svg>
\ No newline at end of file
index.html
浏览文件 @
dae06d5b
...
...
@@ -15,6 +15,9 @@
<!-- google webmaster -->
<meta
name=
"google-site-verification"
content=
"pyo9N70ZWyh8JB43bIu633mhxesJ1IcwWCZlM3jUfFo"
/>
<link
rel=
"stylesheet"
href=
"asset/dark-mode.css"
>
<script
src=
"asset/dark-mode.js"
></script>
</head>
<body>
<div
id=
"app"
>
now loading...
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录