77 lines
3.1 KiB
Vue
77 lines
3.1 KiB
Vue
<script lang="ts">
|
|
let icon: HTMLDivElement | null;
|
|
function toggleLeftPanel(_: Event): void {
|
|
document.querySelector('.published-container')?.classList.toggle('is-left-column-open');
|
|
}
|
|
function hideLeftPanel(_: Event): void {
|
|
document.querySelector('.published-container')?.classList.remove('is-left-column-open');
|
|
}
|
|
</script>
|
|
|
|
<script setup lang="ts">
|
|
const { id: project, home, get } = useProject();
|
|
|
|
if(project.value !== 0 && home.value === null)
|
|
{
|
|
const { data: useless } = await useAsyncData(`project:get:${project}`, get);
|
|
}
|
|
|
|
const toggled = ref(false);
|
|
|
|
onMounted(() => {
|
|
icon = document.querySelector('.site-nav-bar .clickable-icon');
|
|
icon?.removeEventListener('click', toggleLeftPanel);
|
|
icon?.addEventListener('click', toggleLeftPanel);
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div class="published-container print has-navigation has-outline">
|
|
<div class="site-nav-bar">
|
|
<div>
|
|
<div class="clickable-icon">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
class="svg-icon lucide-menu">
|
|
<line x1="4" y1="12" x2="20" y2="12"></line>
|
|
<line x1="4" y1="6" x2="20" y2="6"></line>
|
|
<line x1="4" y1="18" x2="20" y2="18"></line>
|
|
</svg>
|
|
</div>
|
|
<div class="gapx-3 flex align-stretch">
|
|
<NuxtLink @click="hideLeftPanel" class="site-nav-bar-text" aria-label="Accueil" :to="{ path: '/', force: true }">
|
|
<ThemeIcon icon="logo" :width=40 :height=40 />
|
|
</NuxtLink>
|
|
<div class="site-nav-bar-text mobile-hidden">
|
|
<NuxtLink aria-label="Projet" :to="{ path: project === 0 ? `/explorer` : `/explorer/${project}${home}`, force: true }"
|
|
:class="{'mod-active': $route.path.startsWith('/explorer')}">Projet</NuxtLink>
|
|
<div class="arrow-down" :class="{active: toggled}" @click="toggled = !toggled"></div>
|
|
<div class="arrow-group" @click="toggled = false">
|
|
<NuxtLink class="arrow-group-item" aria-label="Projets" :to="{ path: '/explorer', force: true }">Liste des projets</NuxtLink>
|
|
</div>
|
|
</div>
|
|
<NuxtLink class="site-nav-bar-text mobile-hidden" aria-label="Outils" :to="{ path: '/tools', force: true }"
|
|
:class="{'mod-active': $route.path.startsWith('/tools')}">Outils</NuxtLink>
|
|
</div>
|
|
</div>
|
|
<div class="mobile-bigger">
|
|
<SearchView />
|
|
</div>
|
|
<div class="ps-1 gapx-1 flex align-center">
|
|
<ThemeSwitch class="mobile-hidden" />
|
|
<NuxtLink class="site-login" :to="{ path: '/user/profile', force: true }">
|
|
<ThemeIcon icon="user" :width=32 :height=32 />
|
|
</NuxtLink>
|
|
</div>
|
|
</div>
|
|
<div class="site-body">
|
|
<LeftComponent />
|
|
<NuxtPage />
|
|
</div>
|
|
<div class="site-footer">
|
|
<p>Copyright Peaceultime - 2024</p>
|
|
<NuxtLink :to="{ path: '/third-party', force: true }">Applications tierces et crédits</NuxtLink>
|
|
</div>
|
|
</div>
|
|
</template>
|