Skip to content

Commit de5a9b9

Browse files
authored
WIP Added Zorya event
1 parent 0d0d664 commit de5a9b9

File tree

9 files changed

+468
-0
lines changed

9 files changed

+468
-0
lines changed

public/fonts/Fyodor-Bold.eot

56.1 KB
Binary file not shown.

public/fonts/Fyodor-Bold.woff

16.1 KB
Binary file not shown.

public/fonts/Fyodor-Bold.woff2

11.5 KB
Binary file not shown.

public/img/gagarin/space.jpg

1.32 MB
Loading

resources/css/app.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ $utilities: (
103103
@import 'thread';
104104
@import 'marketing';
105105
@import 'post';
106+
@import 'gagarin';
106107

107108
.avatar {
108109
border-radius: 10em;

resources/css/gagarin.scss

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
@mixin sp-layout {
2+
@media screen and (max-width: 750px) {
3+
@content;
4+
}
5+
}
6+
7+
@function random_range($min, $max) {
8+
$rand: random();
9+
$random_range: $min + floor($rand * (($max - $min) + 1));
10+
@return $random_range;
11+
}
12+
13+
@keyframes fall {
14+
to {
15+
visibility: visible;
16+
transform: translate3d(-30em, 0, 0);
17+
}
18+
}
19+
20+
@keyframes tail-fade {
21+
0%,
22+
50% {
23+
visibility: visible;
24+
width: var(--star-tail-length);
25+
opacity: 1;
26+
}
27+
28+
70%,
29+
80% {
30+
visibility: visible;
31+
width: 0;
32+
opacity: 0.4;
33+
}
34+
35+
100% {
36+
visibility: visible;
37+
width: 0;
38+
opacity: 0;
39+
}
40+
}
41+
42+
@keyframes blink {
43+
50% {
44+
visibility: visible;
45+
opacity: 0.6;
46+
}
47+
}
48+
49+
@font-face {
50+
font-family: 'Fyodor-Bold';
51+
src: url('/fonts/Fyodor-Bold.eot');
52+
src:
53+
url('/fonts/Fyodor-Bold.eot?#iefix') format('embedded-opentype'),
54+
url('/fonts/Fyodor-Bold.woff2') format('woff2'),
55+
url('/fonts/Fyodor-Bold.woff') format('woff');
56+
font-weight: normal;
57+
font-style: normal;
58+
}
59+
60+
.gagarin {
61+
background-color: #e5ddbc;
62+
//background: url(/img/gagarin/space.jpg);
63+
background-size: cover;
64+
overflow: hidden;
65+
font-family: 'Fyodor-Bold', serif !important;
66+
position: relative;
67+
@extend .rounded;
68+
69+
svg {
70+
display: block;
71+
background-image: url('/img/gagarin/space.jpg');
72+
border-radius: 0.5rem;
73+
background-size: cover;
74+
}
75+
76+
#ship,
77+
#comet {
78+
border-radius: 8px;
79+
}
80+
81+
.assets {
82+
display: none;
83+
}
84+
85+
#timer {
86+
color: #fff;
87+
font-size: 2rem;
88+
}
89+
90+
.stats {
91+
margin: 1rem;
92+
color: rgba(255, 255, 255, 0.5);
93+
font-size: 2rem;
94+
}
95+
96+
#message {
97+
border-radius: 0.5rem 0.5rem 0 0;
98+
color: #e5ddbc;
99+
font-size: 4rem;
100+
text-align: center;
101+
background: #c44b43;
102+
}
103+
104+
.wrapper {
105+
background: #c44b43;
106+
color: #e5ddbc;
107+
border-radius: 0.35rem;
108+
padding: 1rem 1rem 0 1rem;
109+
z-index: 2;
110+
}
111+
112+
.stars {
113+
position: fixed;
114+
top: 0;
115+
left: 0;
116+
width: 100%;
117+
height: 120%;
118+
transform: rotate(-45deg);
119+
z-index: 1;
120+
}
121+
122+
.star {
123+
$star-count: 50;
124+
--star-color: var(--primary-color);
125+
--star-tail-length: 6em;
126+
--star-tail-height: 2px;
127+
--star-width: calc(var(--star-tail-length) / 6);
128+
--fall-duration: 9s;
129+
--tail-fade-duration: var(--fall-duration);
130+
131+
position: absolute;
132+
top: var(--top-offset);
133+
left: 0;
134+
width: var(--star-tail-length);
135+
height: var(--star-tail-height);
136+
color: var(--star-color);
137+
background: linear-gradient(45deg, #6c7a9a, transparent);
138+
border-radius: 50%;
139+
filter: drop-shadow(0 0 6px currentColor);
140+
transform: translate3d(104em, 0, 0);
141+
visibility: hidden;
142+
animation:
143+
fall var(--fall-duration) var(--fall-delay) linear infinite,
144+
tail-fade var(--tail-fade-duration) var(--fall-delay) ease-out infinite;
145+
146+
@include sp-layout {
147+
// For mobile performance, tail-fade animation will be removed QAQ
148+
animation: fall var(--fall-duration) var(--fall-delay) linear infinite;
149+
}
150+
151+
@for $i from 1 through $star-count {
152+
&:nth-child(#{$i}) {
153+
--star-tail-length: #{max(600, random(750)) / 100}em;
154+
--top-offset: #{random(10000) / 100}vh;
155+
--fall-duration: #{max(6000, random(12000)) / 1000}s;
156+
--fall-delay: #{random(10000) / 1000}s;
157+
}
158+
}
159+
160+
&::before,
161+
&::after {
162+
position: absolute;
163+
content: '';
164+
top: 0;
165+
left: calc(var(--star-width) / -2);
166+
width: var(--star-width);
167+
height: 100%;
168+
background: linear-gradient(45deg, transparent, currentColor, transparent);
169+
border-radius: inherit;
170+
animation: blink 2s linear infinite;
171+
}
172+
173+
&::before {
174+
transform: rotate(45deg);
175+
}
176+
177+
&::after {
178+
transform: rotate(-45deg);
179+
}
180+
}
181+
}

resources/js/controllers/gagarin_controller.js

Whitespace-only changes.

0 commit comments

Comments
 (0)