mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-14 12:14:42 +01:00
lint code
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
defineProps({
|
||||
navigation: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header class="z-30 sticky top-0 left-0 flex justify-center w-full">
|
||||
<div class="w-full px-4 sm:px-6 lg:px-8 sm:mx-8 max-w-7xl py-4 flex justify-between bg-white dark:bg-zinc-900 border-b border-zinc-100 dark:border-zinc-300/10">
|
||||
@@ -15,13 +24,3 @@
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
defineProps({
|
||||
navigation: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
export default defineNuxtRouteMiddleware(async (to) => {
|
||||
let isMaintenance = ref<Boolean>(true)
|
||||
const isMaintenance = ref<boolean>(true)
|
||||
const { $trpc } = useNuxtApp()
|
||||
|
||||
try {
|
||||
isMaintenance.value = await $trpc.maintenance.is.query()
|
||||
} catch (error) {
|
||||
}
|
||||
catch (error) {
|
||||
return navigateTo('/maintenance')
|
||||
}
|
||||
|
||||
|
||||
@@ -1,39 +1,10 @@
|
||||
<template>
|
||||
<section class="w-full min-h-[80svh] flex justify-center items-center">
|
||||
<div class="text-center space-y-8 max-w-5xl">
|
||||
<h3 class="text-subtitle uppercase text-sm">Coming back soon</h3>
|
||||
<h1 class="text-4xl md:text-7xl font-bold">
|
||||
The website is under maintenance
|
||||
</h1>
|
||||
<div v-if="maintenance">
|
||||
<p class="text-subtitle">
|
||||
{{ maintenance.reason }}
|
||||
</p>
|
||||
<div>
|
||||
<p class="text-subtitle">
|
||||
Maintenance planned from {{ useDateFormat(maintenance.beginAt, format).value }} to {{ useDateFormat(maintenance.endAt, format).value }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-center items-center gap-4">
|
||||
<UButton
|
||||
v-for="social in socials"
|
||||
:key="social.name"
|
||||
:icon="social.icon"
|
||||
size="md"
|
||||
:link="social.link"
|
||||
variant="ghost"
|
||||
target="_blank"
|
||||
:ui="{ rounded: 'rounded-full' }"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
definePageMeta({
|
||||
layout: 'maintenance'
|
||||
layout: 'maintenance',
|
||||
})
|
||||
|
||||
useHead({
|
||||
title: 'Site under maintenance • Arthur Danjou',
|
||||
})
|
||||
|
||||
const { $trpc } = useNuxtApp()
|
||||
@@ -63,3 +34,38 @@ const socials = [
|
||||
},
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="w-full min-h-[80svh] flex justify-center items-center">
|
||||
<div class="text-center space-y-8 max-w-5xl">
|
||||
<h3 class="text-subtitle uppercase text-sm">
|
||||
Coming back soon
|
||||
</h3>
|
||||
<h1 class="text-4xl md:text-7xl font-bold">
|
||||
The website is under maintenance
|
||||
</h1>
|
||||
<div v-if="maintenance">
|
||||
<p class="text-subtitle">
|
||||
{{ maintenance.reason }}
|
||||
</p>
|
||||
<div>
|
||||
<p class="text-subtitle">
|
||||
Maintenance planned from {{ useDateFormat(maintenance.beginAt, format).value }} to {{ useDateFormat(maintenance.endAt, format).value }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-center items-center gap-4">
|
||||
<UButton
|
||||
v-for="social in socials"
|
||||
:key="social.name"
|
||||
:icon="social.icon"
|
||||
size="md"
|
||||
:link="social.link"
|
||||
variant="ghost"
|
||||
target="_blank"
|
||||
:ui="{ rounded: 'rounded-full' }"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -141,4 +141,3 @@ const getColor = computed(() => `text-${appConfig.ui.primary}-500`)
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user