This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
dashboard.css
306 lines (253 loc) · 5.91 KB
/
dashboard.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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
html {
font-size: 10px;
/* We have Fira Sans as default font in real device. But it isn't default in
* browser. That's the main reason this line is here.*/
font-family: "Fira Sans";
}
html, body {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
margin: 0;
padding: 0;
}
body {
transform-style: preserve-3d;
perspective: 25rem;
}
a {
outline: 0;
}
a:hover, a:active, a:focus {
outline: 0;
}
#main-section {
position: absolute;
width: 100%;
height: 100%;
transition: transform 1s cubic-bezier(0.5, 0.0, 0.0, 1.0);
}
/* Activate widgets */
body[data-active-direction="up"] #main-section {
transform: translateY(25rem);
}
body[data-active-direction="right"] #main-section {
transform: translateX(-32.8rem);
}
body[data-active-direction="down"] #main-section {
transform: translateY(-28.2rem);
}
body[data-active-direction="left"] #main-section {
transform: translateX(39rem);
}
body[data-active-direction="up"] #center-panel,
body[data-active-direction="right"] #center-panel,
body[data-active-direction="down"] #center-panel,
body[data-active-direction="left"] #center-panel {
opacity: 0.5;
}
body[data-active-direction="up"] #right-panel,
body[data-active-direction="up"] #bottom-panel,
body[data-active-direction="up"] #left-panel,
body[data-active-direction="right"] #top-panel,
body[data-active-direction="right"] #bottom-panel,
body[data-active-direction="right"] #left-panel,
body[data-active-direction="down"] #top-panel,
body[data-active-direction="down"] #right-panel,
body[data-active-direction="down"] #left-panel,
body[data-active-direction="left"] #top-panel,
body[data-active-direction="left"] #right-panel,
body[data-active-direction="left"] #bottom-panel {
opacity: 0;
}
.background {
position: fixed;
top: -14.1rem;
left: -16.4rem;
width: calc(100% + 36.2rem);
height: calc(100% + 26.6rem);
background-image: url(images/Default_wallpaper_02.jpg);
background-position: center;
background-size: cover;
transition: transform 1s cubic-bezier(0.5, 0.0, 0.0, 1.0);
}
body[data-active-direction="up"] .background {
transform: translateY(-12.5rem);
}
body[data-active-direction="right"] .background {
transform: translateX(16.4rem);
}
body[data-active-direction="down"] .background {
transform: translateY(14.1rem);
}
body[data-active-direction="left"] .background {
transform: translateX(-19.6rem);
}
.background-mask {
position: fixed;
width: 100%;
height: 100%;
background: linear-gradient(to right, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 74%, rgba(0,0,0,0.3) 100%),
linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 46%, rgba(0,0,0,0) 54%, rgba(0,0,0,0.3) 100%);
}
#center-panel,
#top-panel,
#right-panel,
#bottom-panel,
#left-panel {
position: absolute;
transition: opacity 1s cubic-bezier(0.5, 0.0, 0.0, 1.0);
}
/* center-panel */
#center-panel {
width: 100%;
height: 100%;
}
/* digital clock */
#digital-clock {
position: absolute;
top: 50%;
left: 50%;
margin: -20.9rem 0 0 -57.5rem;
width: 115rem;
height: 41.8rem;
color: white;
font-weight: 100;
text-align: center;
}
#digital-clock .time {
display: flex;
justify-content: center;
margin: 0;
font-size: 34rem;
line-height: 34rem;
white-space: nowrap;
}
#digital-clock .time span {
width: 17rem;
}
#digital-clock .time span.colons {
position: relative;
top: -3rem;
width: 6rem;
}
#digital-clock .date {
position: relative;
margin-top: 4.4rem;
font-size: 3.4rem;
line-height: 3.4rem;
overflow: hidden;
}
#today-is {
position: relative;
/*top: -4rem;*/
}
#greeting {
position: relative;
top: 4rem;
}
/* top-panel */
#top-panel {
width: 100%;
height: 34.8rem;
top: -25rem;
}
/* right-panel */
#right-panel {
width: 48rem;
height: 100%;
right: -32.8rem;
}
/* bottom-panel */
#bottom-panel {
width: 100%;
height: 44.2rem;
bottom: -28.2rem;
}
/* left-panel */
#left-panel {
width: 58.2rem;
height: 100%;
left: -39rem;
}
iframe {
border: none;
width: 100%;
height: 100%;
}
/* Intro animation */
/*
* Animation for background.
*/
.active .background {
animation: shrink 1s cubic-bezier(0.0, 0.0, 0.0, 1.0) 1.2s;
}
@keyframes shrink {
from { transform: translateZ(10rem); }
to { transform: translateZ(0); }
}
/*
* Animations for greetings and date.
*/
/* XXX: 'both' will keep the animation at running state, not sure if it'll affect performance. ; */
/* Come back to this if there's a performance issue. */
.active #today-is {
animation: slidedown 0.3s cubic-bezier(0.0, 0.0, 0.0, 1.0) 4.5s both;
}
.active #greeting {
animation: slideupdown 2.6s cubic-bezier(0.0, 0.0, 0.0, 1.0) 2.2s both;
}
@keyframes slidedown {
from {
top: -4rem;
}
to {
top: 0;
}
}
@keyframes slideupdown {
0% {
top: 4rem;
}
11.54% {
top: -3.4rem;
}
88.46% {
top: -3.4rem;
}
100% { top: 4rem;}
}
/*
* The following rules set transform origin to central point of the screen.
* For the formula calc(XXrem +/- 50vh/vw), they locate to respective screen
* edges by the former term XXrem, then componsate 50vh/50vw for centeral point.
*/
.active #bottom-panel {
/* 16rem is the height of its preview area. */
transform-origin: 50vw calc(16rem - 50vh);
animation: zoomin 1s cubic-bezier(0.0, 0.0, 0.0, 1.0) 1.2s both;
}
.active #top-panel {
/* 25rem is the height of its hidden area. */
transform-origin: 50vw calc(25rem + 50vh);
animation: zoomin 1s cubic-bezier(0.0, 0.0, 0.0, 1.0) 1.2s both;
}
.active #left-panel {
/* 39rem is the width of its hidden area. */
transform-origin: calc(39rem + 50vw) 50vh;
animation: zoomin 1s cubic-bezier(0.0, 0.0, 0.0, 1.0) 1.2s both;
}
.active #right-panel {
/* 15.2rem is the width of its preview area. */
transform-origin: calc(15.2rem - 50vw) 50vh;
animation: zoomin 1s cubic-bezier(0.0, 0.0, 0.0, 1.0) 1.2s both;
}
@keyframes zoomin {
from {
transform: scale(1.7);
}
to {
transform: scale(1);
}
}