Skip to content

Commit 06c85f4

Browse files
committed
feat: theme update
1 parent 0ea8625 commit 06c85f4

File tree

7 files changed

+98
-59
lines changed

7 files changed

+98
-59
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
> CDN
1212
```html
1313
使用 UMD 格式
14-
<script src="https://www.unpkg.com/@skillnull/[email protected].6/dist/drage.js"></script>
14+
<script src="https://www.unpkg.com/@skillnull/[email protected].7/dist/drage.js"></script>
1515
# or
16-
<script src="https://cdn.jsdelivr.net/npm/@skillnull/[email protected].6/dist/drage.js"></script>
16+
<script src="https://cdn.jsdelivr.net/npm/@skillnull/[email protected].7/dist/drage.js"></script>
1717

1818

1919
使用 ES 格式
20-
<script src="https://www.unpkg.com/@skillnull/[email protected].6/dist/drage.es.js" type="module"></script>
20+
<script src="https://www.unpkg.com/@skillnull/[email protected].7/dist/drage.es.js" type="module"></script>
2121
# or
22-
<script src="https://cdn.jsdelivr.net/npm/@skillnull/[email protected].6/dist/drage.es.js" type="module"></script>
22+
<script src="https://cdn.jsdelivr.net/npm/@skillnull/[email protected].7/dist/drage.es.js" type="module"></script>
2323
```
2424

2525
> #### 安装

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@skillnull/drage-js",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"description": "拖拽元素到页面任意位置",
55
"main": "dist/drage",
66
"author": "skillnull",

src/css/index.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import "theme.dark.css";
2+
@import "theme_light.css";

src/css/theme.dark.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
@media (prefers-color-scheme: dark) {
2+
3+
html, body, #app {
4+
width: 100vw;
5+
height: 100vh;
6+
padding: 0;
7+
margin: 0;
8+
font-family: fangsong;
9+
font-weight: 300;
10+
overflow: hidden;
11+
position: relative;
12+
}
13+
14+
html {
15+
background-color: #333333;
16+
color: white;
17+
}
18+
19+
#watermark_box {
20+
width: 100vw;
21+
height: 100vh;
22+
position: absolute;
23+
z-index: -1;
24+
overflow: hidden;
25+
}
26+
27+
.drag-box {
28+
width: 100px;
29+
height: 100px;
30+
background: aliceblue;
31+
border-radius: 6px;
32+
text-align: center;
33+
cursor: move;
34+
position: absolute;
35+
right: 20px;
36+
bottom: 20px;
37+
color: black;
38+
display: flex;
39+
justify-content: center;
40+
align-items: center;
41+
z-index: 99;
42+
overflow: hidden;
43+
}
44+
}

src/css/theme_light.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
@media (prefers-color-scheme: light) {
2+
html, body, #app {
3+
width: 100vw;
4+
height: 100vh;
5+
padding: 0;
6+
margin: 0;
7+
font-family: fangsong;
8+
font-weight: 300;
9+
overflow: hidden;
10+
position: relative;
11+
}
12+
13+
html {
14+
background-color: #eeeeee;
15+
color: black;
16+
}
17+
18+
#watermark_box {
19+
width: 100vw;
20+
height: 100vh;
21+
position: absolute;
22+
z-index: -1;
23+
overflow: hidden;
24+
}
25+
26+
.drag-box {
27+
width: 100px;
28+
height: 100px;
29+
background: #333333;
30+
border-radius: 6px;
31+
text-align: center;
32+
cursor: move;
33+
position: absolute;
34+
right: 20px;
35+
bottom: 20px;
36+
color: white;
37+
display: flex;
38+
justify-content: center;
39+
align-items: center;
40+
z-index: 99;
41+
overflow: hidden;
42+
}
43+
}

src/index.css

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,viewport-fit=cover" />
88
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#eeeeee">
99
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#333333">
10-
<meta name="description" content="SKILLNULL.DrageJs">
10+
<meta name="description" content="SKILLNULL DrageJs DRAGEJS skillnull drage-js dragejs">
1111
<title>SKILLNULL.DRAGEJS</title>
12-
<link rel="stylesheet" href="./index.css">
12+
<link rel="stylesheet" href="./css/index.css?v=202410311724">
1313
</head>
1414
<body>
1515
<noscript>
@@ -19,7 +19,7 @@
1919
<div id="watermark_box"></div>
2020
<div class="drag-box">Drage Me</div>
2121
</div>
22-
<script src="../dist/drage.js"></script>
23-
<script src="index.js"></script>
22+
<script src="../dist/drage.js?v=202410311724"></script>
23+
<script src="index.js?v=202410311724"></script>
2424
</body>
2525
</html>

0 commit comments

Comments
 (0)