forked from weiameili/Pensela
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackground.html
113 lines (101 loc) · 2.42 KB
/
background.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Choose Background</title>
<style>
body {
width: 100vw;
height: 100vh;
padding: 0vh;
margin: 0px;
display: flex;
}
#container {
margin: auto;
width: 95vw;
height: 95vh;
border-radius: 30px;
background-color: rgb(8, 13, 15);
display: flex;
justify-content: space-around;
box-shadow: 0px 0px 10px 2px #000;
}
#main {
width: 85vw;
height: 87vh;
display: grid;
grid-template-columns: auto auto;
grid-template-rows: auto auto auto auto;
grid-gap: 4vmin;
margin-top: auto;
margin-bottom: auto;
}
.item {
background-color: indianred;
box-shadow: 0px 0px 5px 1px #80caff;
border-radius: 15px;
transition: all 1s;
}
.item:hover {
cursor: pointer;
box-shadow: 0px 0px 10px 2px #ff8f80;
}
.item.transparent {
background-image: url("./assets/icons/transparent.png");
background-size: 250% 400%;
}
.item.black {
background-color: #000;
}
.item.white {
background-color: #fff;
}
.item.blue {
background-color: #b4deff;
}
.item.red {
background-color: #ffb4bd;
}
.item.green {
background-color: #b3fdd7;
}
.item.yellow {
background-color: #fff2b9;
}
.item.orange {
background-color: #ffad88;
}
</style>
</head>
<body>
<div id="container">
<div id="main">
<div
class="item transparent"
col="00000000"
bg='url("./assets/icons/transparent.png")'
></div>
<div class="item black" col="000000" bg="#000000"></div>
<div class="item white" col="ffffff" bg="#ffffff"></div>
<div class="item red" col="ffb4bd" bg="#ffb4bd"></div>
<div class="item blue" col="b4deff" bg="#b4deff"></div>
<div class="item yellow" col="fff2b9" bg="#fff2b9"></div>
<div class="item green" col="b3fdd7" bg="#b3fdd7"></div>
<div class="item orange" col="ffad88" bg="#ffad88"></div>
</div>
</div>
</body>
<script>
const { ipcRenderer } = require("electron");
const jQuery = require("jquery");
const $ = jQuery;
$(".item").on("click", (e) => {
ipcRenderer.send("bgUpdate", e.target.getAttribute("bg"));
ipcRenderer.send("bgSubmit", e.target.getAttribute("col"));
window.close();
});
</script>
</html>