-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.css
235 lines (207 loc) · 3.78 KB
/
index.css
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
:root {
--primary-color: #2f78ff;
}
* {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
}
#app :not(h1) {
/* make it flex and make it so that each row has 4 boxes */
/* add some padding and margin */
padding: 20px;
margin: 0;
max-width: 800px;
/* add spacing between each box */
}
.devices {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 20px;
}
#main {
position: relative;
left: calc(80px + 1%);
top: 0;
min-height: 100vh;
width: calc(100% - calc(80px + 1%));
transition: all 0.5s ease;
}
.device {
/* add some padding and margin */
padding: 20px;
margin: 0;
/* add a border */
border: 1px solid #ccc;
border-radius: 5px;
/* make it flex */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
/* make each box have the exact same size */
flex: 1;
/* make it slightly bigger */
min-width: 200px;
min-height: 180px;
/* add a shadow */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.op-btn {
/* add some padding */
padding: 10px;
/* add some margin */
margin: 10px 0;
/* add a border */
border: 1px solid #c9daf9;
border-radius: 5px;
/* add a background color */
background-color: var(--primary-color);
color: #fff;
min-width: 4.5rem;
/* add a hover effect */
transition: background-color 0.3s;
display: flex;
gap: 10px;
flex-wrap: nowrap;
font-size: 0.9rem;
}
/* .op-btn > i {
font-size: 1.2rem;
} */
.op-btn:hover {
background-color: #4787fd;
cursor: pointer;
}
.sp {
display: flex;
justify-content: space-around;
gap: 2em;
}
.category-title {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.inp {
margin-top: 0.3rem;
margin-bottom:0.3rem;
}
.sidebar {
position: fixed;
top: 0;
left: 0;
height: 100vh;
width: 80px;
background-color: var(--primary-color);
padding: 0.4rem 0.8rem;
transition: all 0.5s ease;
z-index: 2;
}
.sidebar.active ~ #main {
width: calc(100% - calc(250px + 1%));
left: calc(250px + 1%);
transition: all 0.5s ease;
}
.sidebar.active {
width: 250px;
}
.sidebar #btn {
position: absolute;
color: #fff;
top: 0.4rem;
left: 50%;
font-size: 1.2rem;
line-height: 50px;
transform: translateX(-50%);
cursor: pointer;
/* transition: all 0.5s ease; */
}
.sidebar.active #btn {
left: 90%;
transition: all 0.5s ease;
}
.sidebar ul li {
position: relative;
list-style: none;
height: 50px;
width: 90%;
margin: 0.8rem auto;
line-height: 50px;
}
.sidebar ul li a {
color: #fff;
display: flex;
align-items: center;
text-decoration: none;
border-radius: 0.8rem;
}
.sidebar ul li:hover a, .sidebar ul li.active a {
background-color: #fff;
color: #2f78ff;
}
.nav-item:hover,
.siderbar.active .tooltip:hover {
cursor: pointer !important;
}
.sidebar .tooltip:hover {
cursor: initial;
}
.sidebar .top .logo {
color: #fff;
display: flex;
height: 50px;
width: 100%;
align-items: center;
pointer-events: none;
opacity: 0;
}
.sidebar.active .top .logo {
opacity: 1;
}
.top .logo i {
font-size: 2rem;
margin-right: 5px;
}
.sidebar p {
opacity: 0;
}
.sidebar.sidebar p {
opacity: 1;
}
.nav-item,
.top .logo span {
white-space: nowrap;
overflow: hidden;
transition: all 0.5s ease;
}
.sidebar ul li .tooltip {
position: fixed;
left: 6rem;
background: #fff;
box-shadow: 0 0.5rem 0.8rem rgba(0, 0, 0, 0.2);
border-radius: 0.6rem;
padding: 0.4rem 1.2rem;
line-height: 1.8rem;
display: none;
}
.sidebar ul li:hover .tooltip {
display: inline;
}
.sidebar.active ul li .tooltip {
opacity: 0;
}
.sidebar ul li a i {
min-width: 50px;
text-align: center;
height: 50px;
border-radius: 12px;
line-height: 50px;
}
.sidebar .nav-item {
display: none;
}
.sidebar.active .nav-item {
display: inline-block;
}