Skip to content

Commit 444cb01

Browse files
committed
feat: switch the homepage background to a spinning globe
1 parent 4cbef56 commit 444cb01

10 files changed

Lines changed: 1395 additions & 63 deletions

File tree

src/assets/json/globe-dots.json

Lines changed: 1013 additions & 0 deletions
Large diffs are not rendered by default.

src/assets/less/app.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
@import "components/test-examples.less";
3333
@import "components/probe-filters.less";
3434
@import "components/probe-loading-state.less";
35+
@import "components/globe.less";
3536

3637
@import "pages/globalping.less";
3738
@import "pages/network-tools.less";

src/assets/less/common.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,12 @@ body.noscroll {
11831183
}
11841184
}
11851185

1186+
.mobile-only {
1187+
@media (min-width: @screen-sm-min) {
1188+
display: none;
1189+
}
1190+
}
1191+
11861192
.btn-outline-danger {
11871193
color: #eb3333;
11881194
background: #fff;
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.c-gp-globe {
2+
position: absolute;
3+
z-index: -1;
4+
pointer-events: none;
5+
6+
svg {
7+
display: block;
8+
width: 100%;
9+
height: auto;
10+
overflow: visible;
11+
}
12+
13+
&_outline {
14+
fill: none;
15+
stroke: #365590;
16+
stroke-width: 1.5;
17+
}
18+
19+
&_shell {
20+
fill: #17233a;
21+
}
22+
23+
&_dot {
24+
fill: #5074b8;
25+
}
26+
27+
&_pulse-dot {
28+
fill: #17d4a7;
29+
}
30+
}

src/assets/less/components/jumbotron.less

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@
5656
// styles for a specific GP pages
5757
&.main {
5858
overflow: clip visible;
59-
height: 532px;
60-
background: linear-gradient(180deg, #17233a 0, #17233a 50%, #0a206f 70%, #fff 100%);
59+
height: 800px;
60+
background: linear-gradient(180deg, #17233a 0%, #17233a 44%, #24345a 58%, #4d659f 73%, #97a7d8 84%, #d7ddef 92%, #f3f5fb 97%, #fff 100%);
6161

6262
@media (min-width: @screen-sm-min) {
6363
height: 680px;
6464
}
6565

6666
.jumbotron_blur {
67-
top: 380px;
67+
top: 320px;
6868
height: 360px;
6969
overflow: visible;
7070
z-index: -1;
@@ -92,6 +92,27 @@
9292
transform: translate(-50%, -55%) rotate(-180deg);
9393
background: radial-gradient(50% 52% at 50% 50%, rgba(48, 90, 171, .28) 0%, rgba(48, 90, 171, .75) 64%, rgba(48, 90, 171, .5) 82%, rgba(48, 90, 171, 0) 100%);
9494
}
95+
96+
@media (min-width: @screen-sm-min) {
97+
display: none;
98+
}
99+
}
100+
101+
.jumbotron_globe {
102+
display: none;
103+
--globe-size: min(900px, calc(100vw - 64px));
104+
left: 50%;
105+
bottom: calc(var(--globe-size) * -.35);
106+
width: var(--globe-size);
107+
transform: translateX(-50%);
108+
109+
@media (min-width: @screen-sm-min) {
110+
display: block;
111+
}
112+
113+
@media (min-width: @screen-md-min) {
114+
bottom: calc(var(--globe-size) * -.5);
115+
}
95116
}
96117
}
97118

src/assets/less/components/sponsorship.less

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@
3434
font-weight: 600;
3535
}
3636

37-
.mobile-only {
38-
@media (min-width: @screen-sm-min) {
39-
display: none;
40-
}
41-
}
42-
4337
.prevent-select {
4438
-webkit-user-select: none;
4539
-ms-user-select: none;

src/assets/less/pages/globalping.less

Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,17 @@ html.gp-video-modal-scroll-stable {
2929
display: flex;
3030
flex-direction: column;
3131
justify-content: center;
32-
row-gap: 32px;
32+
text-align: start;
33+
row-gap: 24px;
3334
margin: 40px 24px;
34-
max-width: 808px;
35+
max-width: 880px;
36+
37+
@media (min-width: @screen-sm-min) {
38+
text-align: center;
39+
}
3540

3641
@media (min-width: @screen-md-min) {
37-
margin: 82px 24px 100px;
42+
margin: 82px 24px 48px;
3843
}
3944

4045
&_descr {
@@ -62,9 +67,10 @@ html.gp-video-modal-scroll-stable {
6267
justify-content: space-between;
6368
row-gap: 32px;
6469

65-
@media (min-width: @screen-md-min) {
66-
flex-direction: row;
67-
align-items: flex-end;
70+
@media (min-width: @screen-sm-min) {
71+
flex-direction: column;
72+
align-items: center;
73+
row-gap: 48px;
6874
}
6975
}
7076

@@ -89,6 +95,7 @@ html.gp-video-modal-scroll-stable {
8995
@media (min-width: @screen-sm-min) {
9096
row-gap: 0;
9197
flex-grow: 0;
98+
align-items: center;
9299
}
93100

94101
&:hover {
@@ -183,6 +190,7 @@ html.gp-video-modal-scroll-stable {
183190
line-height: 20px;
184191

185192
@media (min-width: @screen-sm-min) {
193+
margin-left: 5px;
186194
white-space: nowrap;
187195
}
188196
}
@@ -191,48 +199,30 @@ html.gp-video-modal-scroll-stable {
191199

192200
&_video {
193201
display: flex;
194-
flex-direction: column;
195202
align-items: center;
196-
row-gap: 8px;
203+
gap: 10px;
197204
color: #fff;
198205
flex-shrink: 0;
206+
border: none;
207+
border-radius: 8px;
208+
background: #17d4a7;
209+
padding: 10px 16px;
210+
font-weight: 400;
211+
font-size: 16px;
212+
line-height: 20px;
213+
white-space: nowrap;
214+
transition: background .15s ease-out;
199215

200-
&_button {
201-
display: inline-flex;
202-
align-items: center;
203-
column-gap: 10px;
204-
border: none;
205-
border-radius: 8px;
206-
background: #17d4a7;
207-
padding: 10px 16px;
208-
font-weight: 400;
209-
font-size: 16px;
210-
line-height: 20px;
211-
color: #fff;
212-
white-space: nowrap;
213-
transition: background .15s ease-out;
214-
215-
&:hover {
216-
background: #46e1bc;
217-
}
218-
219-
&:focus {
220-
outline: none;
221-
}
222-
223-
&:focus-visible {
224-
box-shadow: 0 0 0 3px rgba(23, 212, 167, .8);
225-
}
216+
&:hover {
217+
background: #46e1bc;
226218
}
227219

228-
&_text {
229-
font-size: 14px;
230-
line-height: 20px;
231-
text-align: center;
220+
&:focus {
221+
outline: none;
222+
}
232223

233-
@media (max-width: @screen-sm-max) {
234-
display: none;
235-
}
224+
&:focus-visible {
225+
box-shadow: 0 0 0 3px rgba(23, 212, 167, .8);
236226
}
237227
}
238228

0 commit comments

Comments
 (0)