From 762f917ff784ef7b7f67088736f0acaf580d6dcb Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 18 Jun 2021 19:36:50 +0200 Subject: [PATCH] Homepage improvements Signed-off-by: Thomas Citharel --- js/src/i18n/en_US.json | 4 +-- js/src/i18n/fr_FR.json | 4 +-- js/src/views/Home.vue | 68 +++++++++++++++++++++++++----------------- 3 files changed, 45 insertions(+), 31 deletions(-) diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index 787d95548..b370a2fa0 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -857,7 +857,6 @@ "Your city or region and the radius will only be used to suggest you events nearby. The event radius will consider the administrative center of the area.": "Your city or region and the radius will only be used to suggest you events nearby. The event radius will consider the administrative center of the area.", "Your upcoming events": "Your upcoming events", "Last published events": "Last published events", - "On {instance}": "On {instance}", "Events nearby": "Events nearby", "Within {number} kilometers of {place}": "|Within one kilometer of {place}|Within {number} kilometers of {place}", "@{username}": "@{username}", @@ -1053,5 +1052,6 @@ "A new version is available.": "A new version is available.", "An error has occured while refreshing the page.": "An error has occured while refreshing the page.", "Join group {group}": "Join group {group}", - "Public preview": "Public preview" + "Public preview": "Public preview", + "On {instance} and other federated instances": "On {instance} and other federated instances" } diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index f5b8257f4..f9f94422c 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -561,7 +561,6 @@ "On {date} ending at {endTime}": "Le {date}, se terminant à {endTime}", "On {date} from {startTime} to {endTime}": "Le {date} de {startTime} à {endTime}", "On {date} starting at {startTime}": "Le {date} à partir de {startTime}", - "On {instance}": "Sur {instance}", "Ongoing tasks": "Tâches en cours", "Only accessible through link": "Accessible uniquement par le lien", "Only accessible through link (private)": "Uniquement accessible par lien (privé)", @@ -1144,5 +1143,6 @@ "A new version is available.": "Une nouvelle version est disponible.", "An error has occured while refreshing the page.": "Une erreur est survenue lors du rafraîchissement de la page.", "Join group {group}": "Rejoindre le groupe {group}", - "Public preview": "Aperçu public" + "Public preview": "Aperçu public", + "On {instance} and other federated instances": "Sur {instance} et d'autres instances fédérées" } diff --git a/js/src/views/Home.vue b/js/src/views/Home.vue index 38337dd88..47a7aaf6d 100644 --- a/js/src/views/Home.vue +++ b/js/src/views/Home.vue @@ -52,11 +52,13 @@ v-if="config && (!currentUser.id || !currentActor.id)" >
-

+

{{ $t("Last published events") }}

- {{ $t("On {instance}", { instance: config.name }) }} + + {{ config.name }} +

@@ -176,7 +178,7 @@ class="container section" v-if="config && loggedUser && loggedUser.settings" > -
+
{{ $t("Welcome back {username}!", { username: currentActor.displayName(), @@ -189,34 +191,33 @@ }}
-
-

{{ $t("Your upcoming events") }}

+
+

{{ $t("Your upcoming events") }}

- - - {{ + {{ $tc("You have one event today.", row[1].length, { count: row[1].length, }) - }} - {{ + }} + {{ $tc("You have one event tomorrow.", row[1].length, { count: row[1].length, }) - }} - + }} + {{ $tc("You have one event in {days} days.", row[1].length, { count: row[1].length, days: calculateDiffDays(row[0]), }) }} - - + +

+
-

{{ $t("Last week") }}

+

{{ $t("Last week") }}

+
-

+

{{ $t("Events nearby") }}

@@ -289,11 +298,13 @@ " />

-

+

{{ $t("Last published events") }}

- {{ $t("On {instance}", { instance: config.name }) }} + + {{ config.name }} +

@@ -629,20 +640,16 @@ main > div > .container { .date-component-container { display: flex; align-items: center; - margin: 1.5rem auto; + margin: 0.5rem auto 1rem; h3.subtitle { margin-left: 7px; } } -section.container { - margin: auto auto 3rem; -} - span.view-all { display: block; - margin-top: 2rem; + margin-top: 1rem; text-align: right; a { @@ -688,8 +695,8 @@ section.hero { } #recent_events { - padding: 1rem 0; - min-height: calc(100vh - 400px); + padding: 0; + min-height: 20vh; z-index: 10; .title { @@ -697,7 +704,7 @@ section.hero { } .columns { - margin: 0rem auto 3rem; + margin: 0 auto; } } @@ -761,4 +768,11 @@ section.hero { .clickable { cursor: pointer; } + +.title { + font-size: 27px; + &:not(:last-child) { + margin-bottom: 0.5rem; + } +}