Skip to content

Commit 6e46317

Browse files
authored
feat(frontend): refactor and modernize welcome page (#3614)
* feat(frontend): refactor and modernize welcome page - also fixes navbar issue. Closes: #1533 * fix(frontend): lint issues & use standard variables instead of the constants from error.vue * fix(frontend): remove creator count as it's not a count of all users * fix(frontend): lang reshuffle * feat: rinthbot * fix: lint issues * fix: sizing of bot on mobile & scss cleanup for error.vue * fix: lint issues * fix: ui lint
1 parent b59f208 commit 6e46317

File tree

15 files changed

+228
-110
lines changed

15 files changed

+228
-110
lines changed

apps/frontend/src/error.vue

Lines changed: 92 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@
55
<Logo404 />
66
</div>
77
<div class="error-box" :class="{ 'has-bot': !is404 }">
8-
<img
9-
v-if="!is404"
10-
src="https://cdn-raw.modrinth.com/sad-bot.webp"
11-
alt="Sad Modrinth bot"
12-
class="error-box__sad-bot"
13-
/>
8+
<img v-if="!is404" :src="SadRinthbot" alt="Sad Modrinth bot" class="error-box__sad-bot" />
149
<div v-if="!is404" class="error-box__top-glow" />
1510
<div class="error-box__body">
1611
<h1 class="error-box__title">{{ formatMessage(errorMessages.title) }}</h1>
@@ -55,6 +50,7 @@
5550

5651
<script setup>
5752
import { defineMessage, useVIntl } from "@vintl/vintl";
53+
import { SadRinthbot } from "@modrinth/assets";
5854
import Logo404 from "~/assets/images/404.svg";
5955
6056
const { formatMessage } = useVIntl();
@@ -272,6 +268,19 @@ const routeMessages = [
272268
}
273269
}
274270
271+
.error-graphic {
272+
margin-bottom: 2rem;
273+
display: flex;
274+
justify-content: center;
275+
276+
svg {
277+
fill: var(--color-text);
278+
color: var(--color-text);
279+
width: min(15rem, 100%);
280+
height: auto;
281+
}
282+
}
283+
275284
.error-box {
276285
background-color: var(--color-raised-bg);
277286
border-radius: 1.25rem;
@@ -281,105 +290,96 @@ const routeMessages = [
281290
gap: 1.25rem;
282291
box-shadow: var(--shadow-card);
283292
position: relative;
284-
}
285-
286-
.error-box.has-bot {
287-
margin-block: 120px;
288-
}
289-
290-
.error-box p {
291-
margin: 0;
292-
}
293293
294-
.error-box a {
295-
color: var(--color-brand);
296-
font-weight: 600;
297-
}
294+
&.has-bot {
295+
margin-block: 120px;
296+
}
298297
299-
.error-box a:hover,
300-
.error-box a:focus {
301-
filter: brightness(1.125);
302-
text-decoration: underline;
303-
}
298+
p {
299+
margin: 0;
300+
}
304301
305-
.error-graphic {
306-
margin-bottom: 2rem;
307-
display: flex;
308-
justify-content: center;
309-
}
302+
a {
303+
color: var(--color-brand);
304+
font-weight: 600;
310305
311-
.error-graphic svg {
312-
fill: var(--color-text);
313-
color: var(--color-text);
306+
&:hover,
307+
&:focus {
308+
filter: brightness(1.125);
309+
text-decoration: underline;
310+
}
311+
}
314312
315-
width: min(15rem, 100%);
316-
height: auto;
317-
}
313+
&__sad-bot {
314+
--_bot-height: 112px;
315+
position: absolute;
316+
top: calc(-1 * var(--_bot-height));
317+
right: 5rem;
318+
width: auto;
319+
height: var(--_bot-height);
318320
319-
.error-box__sad-bot {
320-
--_bot-height: 112px;
321-
position: absolute;
322-
top: calc(-1 * var(--_bot-height));
323-
right: 5rem;
324-
width: auto;
325-
height: var(--_bot-height);
326-
}
321+
@media screen and (max-width: 768px) {
322+
--_bot-height: 70px;
323+
right: 2rem;
324+
}
325+
}
327326
328-
.error-box__top-glow {
329-
width: 100%;
330-
height: 1px;
331-
background: linear-gradient(
332-
to right,
333-
transparent 2rem,
334-
var(--color-green) calc(100% - 13rem),
335-
var(--color-green) calc(100% - 5rem),
336-
transparent calc(100% - 2rem)
337-
);
338-
position: absolute;
339-
top: 0;
340-
left: 0;
341-
opacity: 0.4;
342-
}
327+
&__top-glow {
328+
width: 100%;
329+
height: 1px;
330+
background: linear-gradient(
331+
to right,
332+
transparent 2rem,
333+
var(--color-green) calc(100% - 13rem),
334+
var(--color-green) calc(100% - 5rem),
335+
transparent calc(100% - 2rem)
336+
);
337+
position: absolute;
338+
top: 0;
339+
left: 0;
340+
opacity: 0.4;
341+
}
343342
344-
.error-box__title {
345-
font-size: 2rem;
346-
font-weight: 900;
347-
margin: 0;
348-
}
343+
&__title {
344+
font-size: 2rem;
345+
font-weight: 900;
346+
margin: 0;
347+
}
349348
350-
.error-box__subtitle {
351-
font-size: 1.25rem;
352-
font-weight: 600;
353-
}
349+
&__subtitle {
350+
font-size: 1.25rem;
351+
font-weight: 600;
352+
}
354353
355-
.error-box__body {
356-
display: flex;
357-
flex-direction: column;
358-
gap: 0.75rem;
359-
}
354+
&__body {
355+
display: flex;
356+
flex-direction: column;
357+
gap: 0.75rem;
358+
}
360359
361-
.error-box__list-title {
362-
font-weight: 600;
363-
}
360+
&__list-title {
361+
font-weight: 600;
362+
}
364363
365-
.error-box__list {
366-
margin: 0;
367-
display: flex;
368-
flex-direction: column;
369-
gap: 0.25rem;
370-
padding-left: 1.25rem;
371-
}
364+
&__list {
365+
margin: 0;
366+
display: flex;
367+
flex-direction: column;
368+
gap: 0.25rem;
369+
padding-left: 1.25rem;
370+
}
372371
373-
.error-box li {
374-
line-height: 1.5;
375-
}
372+
li {
373+
line-height: 1.5;
374+
}
376375
377-
.error-box__details {
378-
display: flex;
379-
flex-direction: column;
380-
color: var(--color-secondary);
381-
gap: 0.25rem;
382-
font-weight: 500;
383-
font-size: 0.875rem;
376+
&__details {
377+
display: flex;
378+
flex-direction: column;
379+
color: var(--color-secondary);
380+
gap: 0.25rem;
381+
font-weight: 500;
382+
font-size: 0.875rem;
383+
}
384384
}
385385
</style>

apps/frontend/src/locales/en-US/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"message": "Subscribe to updates about Modrinth"
160160
},
161161
"auth.welcome.description": {
162-
"message": "Thank you for creating an account. You can now follow and create projects, receive updates about your favorite projects, and more!"
162+
"message": "You’re now part of the awesome community of creators & explorers already building, downloading, and staying up-to-date with amazing mods."
163163
},
164164
"auth.welcome.label.tos": {
165165
"message": "By creating an account, you have agreed to Modrinth's <terms-link>Terms</terms-link> and <privacy-policy-link>Privacy Policy</privacy-policy-link>."

0 commit comments

Comments
 (0)