Portage du site sous vuejs #232

Merged
kazhnuz merged 29 commits from vue-remake into master 2023-02-08 12:45:46 +01:00
Showing only changes of commit 56c665eccb - Show all commits

View file

@ -1,11 +1,23 @@
<script setup lang="ts">
import { useConfigStore } from "@/stores/config";
import { computed } from "vue";
const store = useConfigStore();
const sidebar = computed(() => {
return store.getSidebar() ?? { title: "", id: 0, links: [] };
});
</script>
<template> <template>
<aside id="sidebar" class="bg-dark fg-light menu"> <aside id="sidebar" class="bg-dark fg-light menu">
<h1 class="title-5 fg-light">Navigation</h1> <h1 class="title-5 fg-light">Navigation</h1>
<ul> <ul v-for="item in sidebar" :key="item.id">
<li> <div class="menu-divider" v-if="item.title">{{ item.title }}</div>
<router-link to="/jdr/core" class="menu-item" <li v-for="(link, index) in item.links" :key="index">
>Règles de base</router-link <router-link :to="`/jdr/core/${link.path}`" class="menu-item" :replace="true">{{
> link.title
}}</router-link>
</li> </li>
</ul> </ul>
</aside> </aside>