Skip to content

Commit bbd7098

Browse files
committed
use lite yt embed, use zola serve
1 parent f8299dc commit bbd7098

File tree

8 files changed

+420
-88
lines changed

8 files changed

+420
-88
lines changed

public/elasticlunr.min.js

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

public/search_index.en.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

sass/index.scss

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
#youtube_frame iframe {
1+
#youtube {
22
width: 560px;
33
height: 315px;
44
}
55

6+
#youtube_frame {
7+
width: 100%;
8+
height: 100%;
9+
display: flex;
10+
justify-content: center;
11+
}
12+
613
#main_container {
714
display: flex;
815
flex-direction: row;
@@ -19,9 +26,14 @@
1926
align-items: center;
2027
margin: 0;
2128
padding: 0;
29+
padding-right: 20px;
2230
font-size: 22px;
2331
}
2432

33+
#main_text {
34+
margin-top: 20px;
35+
}
36+
2537
#main_text a {
2638
color: royalblue;
2739
}
@@ -48,7 +60,7 @@
4860
}
4961

5062
@media (max-width: 1200px) {
51-
#youtube_frame iframe {
63+
#youtube {
5264
width: 420px;
5365
height: 236.25px;
5466
}
@@ -63,6 +75,10 @@
6375
flex-direction: column;
6476
}
6577

78+
#main_content {
79+
padding: 0;
80+
}
81+
6682
#main_text {
6783
margin-bottom: 40px;
6884
margin-top: 40px;
@@ -72,11 +88,55 @@
7288
}
7389

7490
@media (max-width: 600px) {
75-
#youtube_frame {
91+
#youtube {
7692
width: 100%;
77-
78-
iframe {
79-
width: 100%;
80-
}
8193
}
8294
}
95+
96+
97+
/* Countdown Container */
98+
.countdown-wrapper {
99+
display: flex;
100+
justify-content: center;
101+
align-items: center;
102+
gap: 30px;
103+
background-color: #eee;
104+
color: #fff;
105+
font-family: "Helvetica Neue", Arial, sans-serif;
106+
padding: 20px;
107+
border-radius: 8px;
108+
width: fit-content;
109+
margin: 40px auto;
110+
margin-bottom: 0;
111+
}
112+
113+
/* Each Time Block */
114+
.time-block {
115+
display: flex;
116+
flex-direction: column;
117+
align-items: center;
118+
min-width: 60px;
119+
}
120+
121+
/* Numbers (Days/Hours/Minutes/Seconds) */
122+
.time-number {
123+
font-size: 3rem;
124+
font-weight: bold;
125+
margin-bottom: 8px;
126+
color: #bdd956;
127+
}
128+
129+
/* Labels (Days/Hours/Minutes/Seconds) */
130+
.time-label {
131+
font-size: 0.9rem;
132+
text-transform: uppercase;
133+
letter-spacing: 1px;
134+
color: #333;
135+
}
136+
137+
/* Optional: Style for the end message (when countdown finishes) */
138+
.finished-message {
139+
text-align: center;
140+
font-size: 2rem;
141+
color: #ff0000;
142+
}

sass/main.scss

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/* * {
2-
border-style: solid;
3-
border-color: #000;
4-
border-width: 0.5px;
5-
} */
1+
// * {
2+
// border-style: solid;
3+
// border-color: #000;
4+
// border-width: 0.5px;
5+
// }
66

77
body {
88
color: #737373;
@@ -201,6 +201,7 @@ header {
201201
.sponsor {
202202
margin: 0;
203203
margin-bottom: 20px;
204+
margin-top: 20px;
204205
}
205206

206207
header ul {
@@ -210,7 +211,11 @@ header {
210211
.social-links {
211212
padding: 0;
212213
}
213-
214+
215+
.license {
216+
text-align: center;
217+
}
218+
214219
.container {
215220
width: 100%;
216221
padding: 0px;
@@ -239,4 +244,4 @@ header {
239244
padding-left: 0.5em;
240245
padding-right: 0.5em;
241246
}
242-
}
247+
}

static/lite-yt-embed.css

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
lite-youtube {
2+
background-color: #000;
3+
position: relative;
4+
display: block;
5+
contain: content;
6+
background-position: center center;
7+
background-size: cover;
8+
cursor: pointer;
9+
max-width: 720px;
10+
}
11+
12+
/* gradient */
13+
lite-youtube::before {
14+
content: attr(data-title);
15+
display: block;
16+
position: absolute;
17+
top: 0;
18+
/* Pixel-perfect port of YT's gradient PNG, using https://github.com/bluesmoon/pngtocss plus optimizations */
19+
background-image: linear-gradient(180deg, rgb(0 0 0 / 67%) 0%, rgb(0 0 0 / 54%) 14%, rgb(0 0 0 / 15%) 54%, rgb(0 0 0 / 5%) 72%, rgb(0 0 0 / 0%) 94%);
20+
height: 99px;
21+
width: 100%;
22+
font-family: "YouTube Noto",Roboto,Arial,Helvetica,sans-serif;
23+
color: hsl(0deg 0% 93.33%);
24+
text-shadow: 0 0 2px rgba(0,0,0,.5);
25+
font-size: 18px;
26+
padding: 25px 20px;
27+
overflow: hidden;
28+
white-space: nowrap;
29+
text-overflow: ellipsis;
30+
box-sizing: border-box;
31+
}
32+
33+
lite-youtube:hover::before {
34+
color: white;
35+
}
36+
37+
/* responsive iframe with a 16:9 aspect ratio
38+
thanks https://css-tricks.com/responsive-iframes/
39+
*/
40+
lite-youtube::after {
41+
content: "";
42+
display: block;
43+
padding-bottom: calc(100% / (16 / 9));
44+
}
45+
lite-youtube > iframe {
46+
width: 100%;
47+
height: 100%;
48+
position: absolute;
49+
top: 0;
50+
left: 0;
51+
border: 0;
52+
}
53+
54+
/* play button */
55+
lite-youtube > .lyt-playbtn {
56+
display: block;
57+
/* Make the button element cover the whole area for a large hover/click target… */
58+
width: 100%;
59+
height: 100%;
60+
/* …but visually it's still the same size */
61+
background: no-repeat center/68px 48px;
62+
/* YT's actual play button svg */
63+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
64+
position: absolute;
65+
cursor: pointer;
66+
z-index: 1;
67+
filter: grayscale(100%);
68+
transition: filter .1s cubic-bezier(0, 0, 0.2, 1);
69+
border: 0;
70+
}
71+
72+
lite-youtube:hover > .lyt-playbtn,
73+
lite-youtube .lyt-playbtn:focus {
74+
filter: none;
75+
}
76+
77+
/* Post-click styles */
78+
lite-youtube.lyt-activated {
79+
cursor: unset;
80+
}
81+
lite-youtube.lyt-activated::before,
82+
lite-youtube.lyt-activated > .lyt-playbtn {
83+
opacity: 0;
84+
pointer-events: none;
85+
}
86+
87+
.lyt-visually-hidden {
88+
clip: rect(0 0 0 0);
89+
clip-path: inset(50%);
90+
height: 1px;
91+
overflow: hidden;
92+
position: absolute;
93+
white-space: nowrap;
94+
width: 1px;
95+
}

0 commit comments

Comments
 (0)