Update views for new router architecture

This commit is contained in:
Timothée Goguely 2024-09-17 17:22:58 +02:00
parent f7e7c24164
commit 40692b1cf3
5 changed files with 52 additions and 67 deletions

View file

@ -2,9 +2,7 @@
<h1 v-if="page" class="sr-only">{{ page.content.title }}</h1>
<div class="with-sidebar">
<Menu />
<main>
<RouterView />
</main>
<RouterView />
</div>
</template>

View file

@ -1,12 +1,9 @@
<template>
<Projects />
<main>
<Projects />
</main>
</template>
<script setup>
import Menu from "../components/Menu.vue";
import Projects from "../components/Projects.vue";
const { data } = defineProps({
data: Object,
});
</script>

View file

@ -1,22 +1,24 @@
<template>
<h2 id="tabslist" class="sr-only">Inspirations</h2>
<Tabs :tabs="tabs" @update:currentTab="changeTab" />
<Selector />
<section :id="currentTab" class="inspiration">
<Header :inspiration="currentInspiration" />
<div class="masonry flow">
<template
v-for="(item, index) in currentInspiration.media"
:key="item.id"
>
<Image
:item="item"
:inspirationUri="currentInspiration.uri"
:currentTab="currentTab"
/>
</template>
</div>
</section>
<main>
<h2 id="tabslist" class="sr-only">Inspirations</h2>
<Tabs :tabs="tabs" @update:currentTab="changeTab" />
<Selector />
<section :id="currentTab" class="inspiration">
<Header :inspiration="currentInspiration" />
<div class="masonry flow">
<template
v-for="(item, index) in currentInspiration.media"
:key="item.id"
>
<Image
:item="item"
:inspirationUri="currentInspiration.uri"
:currentTab="currentTab"
/>
</template>
</div>
</section>
</main>
</template>
<script setup>

View file

@ -1,32 +1,26 @@
<template>
<h1 class="sr-only">{{ data.content.title }}</h1>
<div class="with-sidebar">
<Menu />
<main class="wrapper">
<h2 id="tabslist" class="sr-only">Status</h2>
<Tabs :tabs="tabs" @update:currentTab="changeTab" />
<button class="btn | absolute top-0 right-0" disabled>Marquer tout come lu</button>
<div class="flex flex-col | text-grey-700 | absolute inset-0 -z-1">
<svg aria-hidden="true" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.7 28.925C23.4895 30.6616 22.625 32.2526 21.2825 33.3741C19.94 34.4955 18.2205 35.0631 16.4742 34.9611C14.7279 34.8591 13.0861 34.0953 11.8832 32.8252C10.6804 31.5551 10.0069 29.8743 10 28.125V24.15M34.6 32.675L5.425 22.5C4.94896 22.3339 4.53427 22.0278 4.23534 21.6218C3.93642 21.2158 3.76724 20.7289 3.75 20.225V17.5C3.75206 16.9832 3.91423 16.4798 4.21418 16.0589C4.51414 15.6381 4.93715 15.3205 5.425 15.15L34.6 5.00001C34.7873 4.93673 34.987 4.91879 35.1825 4.94766C35.3781 4.97653 35.5641 5.05137 35.7251 5.16606C35.8862 5.28074 36.0177 5.43199 36.109 5.60738C36.2002 5.78277 36.2485 5.9773 36.25 6.17501V31.5C36.2485 31.6977 36.2002 31.8922 36.109 32.0676C36.0177 32.243 35.8862 32.3943 35.7251 32.5089C35.5641 32.6236 35.3781 32.6985 35.1825 32.7273C34.987 32.7562 34.7873 32.7383 34.6 32.675Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<p>Vous navez pas de nouvelles notifications</p>
</div>
</main>
</div>
<main class="wrapper">
<h2 id="tabslist" class="sr-only">Status</h2>
<Tabs :tabs="tabs" @update:currentTab="changeTab" />
<button class="btn | absolute top-0 right-0" disabled>Marquer tout come lu</button>
<div class="flex flex-col | text-grey-700 | absolute inset-0 -z-1">
<svg aria-hidden="true" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.7 28.925C23.4895 30.6616 22.625 32.2526 21.2825 33.3741C19.94 34.4955 18.2205 35.0631 16.4742 34.9611C14.7279 34.8591 13.0861 34.0953 11.8832 32.8252C10.6804 31.5551 10.0069 29.8743 10 28.125V24.15M34.6 32.675L5.425 22.5C4.94896 22.3339 4.53427 22.0278 4.23534 21.6218C3.93642 21.2158 3.76724 20.7289 3.75 20.225V17.5C3.75206 16.9832 3.91423 16.4798 4.21418 16.0589C4.51414 15.6381 4.93715 15.3205 5.425 15.15L34.6 5.00001C34.7873 4.93673 34.987 4.91879 35.1825 4.94766C35.3781 4.97653 35.5641 5.05137 35.7251 5.16606C35.8862 5.28074 36.0177 5.43199 36.109 5.60738C36.2002 5.78277 36.2485 5.9773 36.25 6.17501V31.5C36.2485 31.6977 36.2002 31.8922 36.109 32.0676C36.0177 32.243 35.8862 32.3943 35.7251 32.5089C35.5641 32.6236 35.3781 32.6985 35.1825 32.7273C34.987 32.7562 34.7873 32.7383 34.6 32.675Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<p>Vous navez pas de nouvelles notifications</p>
</div>
</main>
</template>
<script setup>
import Menu from "../components/Menu.vue";
import Tabs from "../components/Tabs.vue";
import { usePageStore } from "../stores/page"
import { useUserStore } from "../stores/user";
import { ref, computed } from "vue";
import { storeToRefs } from "pinia";
const { data } = defineProps({
data: Object
});
const { page } = storeToRefs(usePageStore());
const user = useUserStore().user;
const currentTab = ref("all");
const tabs = computed(() => {

View file

@ -1,32 +1,26 @@
<template>
<h1 class="sr-only">{{ data.content.title }}</h1>
<div class="with-sidebar">
<Menu />
<main class="wrapper">
<h2 id="tabslist" class="sr-only">Status</h2>
<Tabs :tabs="tabs" @update:currentTab="changeTab" />
<div class="flex flex-col | text-grey-700 | absolute inset-0 -z-1">
<svg aria-hidden="true" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.25 8.75C5.58696 8.75 4.95107 9.01339 4.48223 9.48223C4.01339 9.95107 3.75 10.587 3.75 11.25V33.75C3.75 34.413 4.01339 35.0489 4.48223 35.5178C4.95107 35.9866 5.58696 36.25 6.25 36.25H33.75C34.413 36.25 35.0489 35.9866 35.5178 35.5178C35.9866 35.0489 36.25 34.413 36.25 33.75V11.25C36.25 10.587 35.9866 9.95107 35.5178 9.48223C35.0489 9.01339 34.413 8.75 33.75 8.75H28.75M3.75 18.75H36.25M11.25 3.75V13.75M28.75 3.75V13.75M11.25 8.75H23.75" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<p class="mb-32">Vous navez aucune réunion programmée</p>
<button class="btn">Demander un RDV</button>
</div>
</main>
</div>
<main class="wrapper">
<h2 id="tabslist" class="sr-only">Status</h2>
<Tabs :tabs="tabs" @update:currentTab="changeTab" />
<div class="flex flex-col | text-grey-700 | absolute inset-0 -z-1">
<svg aria-hidden="true" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.25 8.75C5.58696 8.75 4.95107 9.01339 4.48223 9.48223C4.01339 9.95107 3.75 10.587 3.75 11.25V33.75C3.75 34.413 4.01339 35.0489 4.48223 35.5178C4.95107 35.9866 5.58696 36.25 6.25 36.25H33.75C34.413 36.25 35.0489 35.9866 35.5178 35.5178C35.9866 35.0489 36.25 34.413 36.25 33.75V11.25C36.25 10.587 35.9866 9.95107 35.5178 9.48223C35.0489 9.01339 34.413 8.75 33.75 8.75H28.75M3.75 18.75H36.25M11.25 3.75V13.75M28.75 3.75V13.75M11.25 8.75H23.75" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<p class="mb-32">Vous navez aucune réunion programmée</p>
<button class="btn">Demander un RDV</button>
</div>
</main>
</template>
<script setup>
import Menu from "../components/Menu.vue";
import Tabs from "../components/Tabs.vue";
import { usePageStore } from "../stores/page"
import { useUserStore } from "../stores/user";
import { ref, computed } from "vue";
import { storeToRefs } from "pinia";
const { data } = defineProps({
data: Object
});
const { page } = storeToRefs(usePageStore());
const user = useUserStore().user;
const currentTab = ref("future");
const tabs = computed(() => {