2024-02-21 00:30:14 +01:00
|
|
|
<template>
|
|
|
|
<Header />
|
|
|
|
<div class="error-page">
|
|
|
|
<h1 v-if="error.statusCode === 404">Erreur 404</h1>
|
|
|
|
<p v-if="error.statusCode === 404">La page {{ error.url }} n'existe pas</p>
|
2024-04-06 00:46:44 +02:00
|
|
|
<img
|
2024-02-21 00:30:14 +01:00
|
|
|
v-if="global.error_img"
|
2024-04-06 00:46:44 +02:00
|
|
|
:src="`/api/assets/${globalData.error_img}.webp`"
|
|
|
|
:alt="global.error_img_title" />
|
2024-02-21 00:30:14 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
setup() {
|
2024-04-06 00:46:44 +02:00
|
|
|
const global = ref([]);
|
|
|
|
|
|
|
|
const { data, error } = useFetch('/api/items/global', {
|
|
|
|
server: true,
|
|
|
|
onResponse({ request, response, options }) {
|
|
|
|
global.value = response._data.data;
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
provide('globalData', global);
|
2024-02-21 00:30:14 +01:00
|
|
|
|
2024-04-06 00:46:44 +02:00
|
|
|
return {
|
|
|
|
globalData
|
|
|
|
}
|
2024-02-21 00:30:14 +01:00
|
|
|
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
error: Object
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.error-page {
|
|
|
|
text-align: center;
|
|
|
|
margin: 3rem auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
img {
|
|
|
|
width: 60vw;
|
|
|
|
margin: auto;
|
|
|
|
margin-top: 5rem;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|