Portage du site sous vuejs #232
1 changed files with 17 additions and 5 deletions
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue