This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
240 lines (218 loc) · 4.61 KB
/
styles.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
* {
/* CSS custom properties (use: var(--custom-property);) */
--primary-color: #5b81b2;
--light-theme-background: #eee;
--header-height: 56px;
--shadow-2dp: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12),
0 3px 1px -2px rgba(0, 0, 0, 0.2);
;
--shadow-4dp: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
0 1px 10px 0 rgba(0, 0, 0, 0.12),
0 2px 4px -1px rgba(0, 0, 0, 0.4);
box-sizing: border-box;
}
html, body {
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
font-family: 'Titillium Web', sans-serif;
overflow: hidden;
}
/*flexbox layout*/
body {
display: flex;
flex-direction: column;
background: var(--light-theme-background);
}
/*header*/
body header {
width: 100%;
padding: 0 16px;
background-color: var(--primary-color);
color: #fff;
font-size: 20px;
height: var(--header-height);
line-height: var(--header-height);
box-shadow: var(--shadow-4dp);
z-index: 1;
}
/*main container of content*/
body main {
flex: 1;
overflow-y: auto;
}
/*youtube video container*/
body .yt-container {
display: flex;
justify-content: center;
}
/*next video countdown*/
body .countdown {
position: absolute;
right: 0;
top: 72px;
padding: 8px 24px 8px 32px;
background: #D50000;
color: #fff;
border-radius: 4px 0px 0px 16px;
transition: all ease-out 0.7s;
opacity: 1;
transform: none;
will-change: transform;
z-index: 2;
}
body .countdown.hidden {
opacity: 0;
transform: translateX(100%);
}
/*detail with video info and cheatsheets*/
body .details {
flex: 1;
flex-direction: column;
display: flex;
}
/*info card with views and add to favorites*/
body .details .info {
display: flex;
width: 978px; /*video width*/
margin: 16px;
align-self: center;
background: #fff;
border-radius: 2px;
}
body .details .info .view-count {
flex: 1;
font-size: 18px;
margin: 16px;
font-weight: bold;
color: #6c6c6c;
line-height: 37px;
}
/*cheatsheet images gallery*/
body .details .image-gallery {
flex: 1;
display: flex;
overflow-x: auto;
overflow-y: visible;
padding-bottom: 8px;
cursor: move;
cursor: -webkit-grab;
cursor: grab;
}
/*cursor for scrolling/grabbing*/
body .details .image-gallery.grabbing {
cursor: move;
cursor: -webkit-grabbing;
cursor: grabbing;
}
/*image styling*/
body .details .image-gallery img {
height: 100%;
max-height: 250px;
margin: 0 8px;
box-shadow: var(--shadow-2dp);
border-radius: 2px;
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
user-drag: none;
}
body .details .image-gallery .image-container {
position: relative;
}
/*icon to jump to video part*/
body .details .image-gallery .image-container .jump-to-icon {
color: #fff;
position: absolute;
top: 8px;
right: 16px;
opacity: 0;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
body .details .image-gallery .image-container:hover .jump-to-icon {
opacity: 1;
}
body .details .image-gallery .image-container .jump-to-icon:focus {
opacity: 1;
}
/*general styling for buttons*/
button.fav {
background-color: var(--primary-color);
text-transform: uppercase;
color: #fff;
border-radius: 2px;
border: none;
font-size: 18px;
padding: 8px;
margin: 16px;
box-shadow: var(--shadow-2dp);
cursor: pointer;
}
button.pseudo {
border: none;
background: none;
}
/*youtube player on desktop*/
#ytplayer {
height: 550px;
width: 978px;
}
/*responsive design from 1100px e.g. tablets and mobile phones*/
@media only screen and (max-width: 1100px) {
/* mobile */
/*aspect ratio 16:9*/
#ytplayer {
width: 100vw;
height: 56.25vw; /*vw to use ar!*/
padding: 0;
}
body header {
font-size: 18px;
height: 56px;
}
body .details .info {
display: flex;
width: 100%;
margin: 0;
}
body .details .image-gallery {
margin: 32px 0;
padding: 0 16px;
}
body .details .image-gallery .img-container {
max-height: 300px;
margin: 0 16px;
}
body .details .image-gallery .img-container:last-of-type {
/*Chrome bugfix*/
padding-right: 16px;
}
body .details .image-gallery .image-container .jump-to-icon {
opacity: 1;
}
button.fav {
font-size: 16px;
}
}
/*some additional responsive styles for mobile phones*/
@media only screen and (max-width: 600px) {
/* mobile */
body header {
font-size: 14px;
}
body .details .image-gallery .img-container {
max-height: 180px;
margin: 0 8px;
}
}
body .details .image-gallery.vertical-scrolling {
flex-wrap: wrap;
justify-content: center;
}