turn isotipo into a button for nav

This commit is contained in:
Georges-Antoine Assi
2025-03-02 10:00:34 -05:00
parent b240191fe9
commit 4e784442e3
2 changed files with 18 additions and 13 deletions

View File

@@ -1,17 +1,9 @@
<script setup lang="ts">
import RIsotipo from "@/components/common/RIsotipo.vue";
import storeNavigation from "@/stores/navigation";
import { ROUTES } from "@/plugins/router";
const navigationStore = storeNavigation();
</script>
<template>
<r-isotipo
:to="{ name: ROUTES.HOME }"
@click="navigationStore.goHome"
class="cursor-pointer"
:size="40"
/>
<r-isotipo :to="{ name: ROUTES.HOME }" class="cursor-pointer" :size="40" />
</template>
<style scoped>

View File

@@ -1,7 +1,10 @@
<script setup lang="ts">
import { ref } from "vue";
import type { RouteLocationRaw } from "vue-router";
withDefaults(defineProps<{ size?: number }>(), { size: 40 });
withDefaults(defineProps<{ size?: number; to?: RouteLocationRaw }>(), {
size: 40,
});
const logos = {
xbox: { path: "romm_logo_xbox_one_circle.svg", weight: 0.945 },
@@ -26,7 +29,17 @@ const randomLogo = ref<string>(getRandomLogo());
</script>
<template>
<v-avatar :size="size">
<img :src="`/assets/logos/${randomLogo}`" alt="Romm Logo" :width="size" />
</v-avatar>
<v-btn
:to="to"
icon
variant="flat"
color="background"
class="rounded-50"
:height="size"
:width="size"
>
<v-avatar :size="size">
<img :src="`/assets/logos/${randomLogo}`" alt="Romm Logo" :width="size" />
</v-avatar>
</v-btn>
</template>