Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/web/src/components/features/home-page/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ const router = useRouter()
class="flex flex-col justify-between"
:class="[hidden ? 'max-w-52 h-[160px]' : 'h-full']"
>
<div @click="moveTo('main')" class="flex flex-row items-center gap-2">
<div @click="moveTo('main')" class="flex flex-row items-center gap-2 cursor-pointer">
<Valory :size="28" />
<span class="font-valory inline-block bg-linear-to-b from-[#f2f2f2] to-[#dddddd] bg-clip-text text-lg leading-none text-transparent">
VALORY
</span>
</div>
<div class="flex flex-col gap-4">
<div class="flex flex-row gap-2 -ml-2">
Expand Down
96 changes: 49 additions & 47 deletions apps/web/src/components/features/home-page/Header.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { useRoute } from 'vue-router'
import router from '@/router'
import { NAV_DATA } from '@/data'
import { Button } from '@/components/ui/button'
import { LanguageSwitcher, LinkPreview } from '@/components/ui'
import { LoginOrConfigurator } from '@/components/features/home-page/index.ts'
import { Github, Valory } from '@/components/shared/icons'
import { LanguageSwitcher, LinkPreview } from '@/components/ui'
import { Button } from '@/components/ui/button'
import { NAV_DATA } from '@/data'
import { hidden, moveTo } from '@/lib/utils.ts'
import router from '@/router'
import { useI18n } from 'vue-i18n'
import { useRoute } from 'vue-router'

const { t } = useI18n()
const route = useRoute()
Expand All @@ -16,50 +16,52 @@ const isDev = import.meta.env.APP_DEV === 'true'
</script>

<template>
<header
:class="[
'fixed right-0 left-0 top-6 z-100 flex h-16 w-full justify-center transition-all duration-700',
]"
>
<div
class="container flex items-center justify-between rounded-full bg-black/30 py-1 text-sm backdrop-blur-sm"
>
<div class="left flex flex-row gap-8">
<div
class="relative inline-flex gap-2 logo cursor-pointer"
@click="router.push({ name: 'home' })"
>
<Valory :size="30" />
<span
v-if="isDev"
class="absolute -top-2 left-3 inline-flex text-xs px-1.5 py-0.5 h-fit font-semibold items-center justify-center rounded-full border text-white transition border-white/10 bg-neutral-900"
<header class="fixed z-100 flex h-16 w-full justify-center transition-all duration-700">
<div class="w-full bg-black/30 backdrop-blur-sm">
<div class="container h-16 flex items-center justify-between text-sm">
<div class="left flex flex-row gap-8">
<div
class="relative inline-flex gap-2 logo cursor-pointer"
@click="router.push({ name: 'home' })"
>
DEV
</span>
<div @click="moveTo('main')" class="flex flex-row items-center gap-2">
<Valory :size="30" />
<span class="font-valory inline-block bg-linear-to-b from-[#f2f2f2] to-[#dddddd] bg-clip-text text-lg leading-none text-transparent">
VALORY
</span>
</div>
<span
v-if="isDev"
class="absolute -top-2 left-3 inline-flex text-xs px-1.5 py-0.5 h-fit font-semibold items-center justify-center rounded-full border text-white transition border-white/10 bg-neutral-900"
>
DEV
</span>
</div>
<ul v-if="!hidden && route.name === 'home'" class="flex items-center justify-between gap-6">
<li
v-for="nav in NAV_DATA"
:key="nav.name"
@click="moveTo(`${nav.point}`)"
class="cursor-pointer font-medium text-[#F2F2F2]/80 transition duration-150 hover:text-[#F2F2F2]"
>
{{ t(`nav.${nav.point}`) }}
</li>
</ul>
</div>
<div class="right flex flex-row items-center gap-2">
<LinkPreview v-if="!hidden" url="https://github.com/ValoryLabs/Valory" text="Valory">
<Button
class="rounded-full border border-transparent bg-transparent text-white opacity-50 transition hover:border-white/10 hover:bg-white/10 hover:opacity-100"
size="icon"
>
<Github :size="16" />
</Button>
</LinkPreview>
<LanguageSwitcher v-if="!hidden" variant="rounded" />
<LoginOrConfigurator />
</div>
<ul v-if="!hidden && route.name === 'home'" class="flex items-center justify-between gap-6">
<li
v-for="nav in NAV_DATA"
:key="nav.name"
@click="moveTo(`${nav.point}`)"
class="cursor-pointer font-medium text-[#F2F2F2]/80 transition duration-150 hover:text-[#F2F2F2]"
>
{{ t(`nav.${nav.point}`) }}
</li>
</ul>
</div>
<div class="right flex flex-row items-center gap-2">
<LinkPreview v-if="!hidden" url="https://github.com/ValoryLabs/Valory" text="Valory">
<Button
class="rounded-full border border-transparent bg-transparent text-white opacity-50 transition hover:border-white/10 hover:bg-white/10 hover:opacity-100"
size="icon"
>
<Github :size="16" />
</Button>
</LinkPreview>
<LanguageSwitcher v-if="!hidden" variant="rounded" />
<LoginOrConfigurator />
</div>
</div>

</header>
</template>
16 changes: 5 additions & 11 deletions apps/web/src/components/ui/LanguageSwitcher.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<script lang="ts" setup>
import type { HTMLAttributes } from 'vue'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { ChevronsUpDown, Globe } from 'lucide-vue-next'
import { useLocalStorage } from '@vueuse/core'
import { Button } from '@/components/ui/button'
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuLabel,
DropdownMenuRadioGroup,
DropdownMenuRadioItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu'
import { AVAILABLE_LOCALES } from '@/i18n'
import { cn } from '@/lib/utils'
import { useLocalStorage } from '@vueuse/core'
import { ChevronsUpDown, Globe } from 'lucide-vue-next'
import type { HTMLAttributes } from 'vue'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'

const props = withDefaults(
defineProps<{ variant?: 'default' | 'rounded'; class?: HTMLAttributes['class'] }>(),
Expand Down Expand Up @@ -60,10 +58,6 @@ const isRounded = computed(() => props.variant === 'rounded')
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" class="w-40">
<DropdownMenuLabel>
{{ t('components.languageSwitcher') }}
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuRadioGroup v-model="currentLocale">
<DropdownMenuRadioItem
v-for="lang of AVAILABLE_LOCALES"
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
},
"main": {
"discord": "Be part of our Discord family!",
"title": "The ultimate tool\nfor STREAM.",
"title": "The ultimate tool\nfor STREAM",
"subtitle": "Show your Valorant stats effortlessly.\nEngage your audience and keep the focus on the game",
"buttons": {
"first": "Get started",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
},
"main": {
"discord": "Будь частью нашей Discord семьи!",
"title": "Ультимативный\n инструмент\n для стримеров.",
"title": "Ультимативный\n инструмент\n для стримеров",
"subtitle": "Продемонстрируйте свою выдающуюся статистику без особых усилий.\nПривлекайте аудиторию и сосредоточьтесь на игре",
"buttons": {
"first": "Начать",
Expand Down
12 changes: 12 additions & 0 deletions apps/web/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ const router = createRouter({
window.location.href = 'https://status.valory.su/'
},
},
{
path: '/contact',
name: 'contact',
component: { render: () => null },
beforeEnter() {
window.location.href = 'https://discord.gg/pYV4PBV5YW'
},
},
{
path: '/configurator',
name: 'configurator',
Expand Down Expand Up @@ -106,4 +114,8 @@ router.beforeEach(async (to) => {
}
})

router.afterEach(() => {
window.scrollTo({ top: 0, behavior: 'smooth' })
})

export default router