change footer information, add lei certificate

This commit is contained in:
2025-07-02 15:17:12 +02:00
parent 687e92429f
commit fbb6c071af
4 changed files with 53 additions and 37 deletions

View File

@ -3,12 +3,19 @@
<UiContainer class="flex flex-col gap-24"> <UiContainer class="flex flex-col gap-24">
<div <div
class="grid grid-cols-1 md:grid-cols-2 gap-[75px] xl:gap-0 xl:grid-cols-none xl:grid-flow-col auto-cols-max justify-between"> class="grid grid-cols-1 md:grid-cols-2 gap-[75px] xl:gap-0 xl:grid-cols-none xl:grid-flow-col auto-cols-max justify-between">
<div v-if="component.front_section_lang" v-for="(item, index) in component.front_section_lang[0].data" <div>
:key="index" class="flex flex-col gap-[25px] sm:gap-8 max-w-[280px]"> <div v-for="(item, key) in contact" :key="key" class="flex flex-col gap-[25px] sm:gap-8 max-w-[280px]">
<h3 class="h4-uppercase-bold-inter">{{ item.title }}</h3> <h3 v-if="key == 'header'" class="h4-uppercase-bold-inter">{{ item }}</h3>
<div class="cursor-pointer hover:text-text-light/80 dark:hover:text-text-dark/70 transition-all text-inter" <div v-else class="transition-all text-inter">{{ item }}</div>
v-for="(el, indexEl) in item.children" :key="indexEl"> </div>
{{ el.title }} </div>
<div v-for="(section, index) in docs" :key="index" class="flex flex-col gap-[25px] sm:gap-8 max-w-[280px]">
<h3 class="h4-uppercase-bold-inter">{{ section.translation }}</h3>
<div v-for="(item, key) in section.data" :key="key">
<div class="cursor-pointer hover:text-text-light/80 dark:hover:text-text-dark/70 transition-all text-inter">
<a target="_blank" :href="`/api/public/document/${item.name}`">{{ item.translation }}</a>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -22,38 +29,17 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
defineProps<{ import type { GenericResponse, Footer } from '~/types';
component: {
id: number
name: string
img: string[]
component_name: string
is_no_lang: boolean
page_name: string
front_section_lang: {
data: {
title: string
children: {
title: string
value: 'email' | 'address' | 'certificate' | 'document' | 'form' | 'info'
link?: string
}[]
}[]
id_front_section: number
id_lang: number
}[]
}
}>();
const menuStore = useMenuStore(); const menuStore = useMenuStore();
const colorMode = useColorMode(); const colorMode = useColorMode();
const isDark = computed({ const { data } = await useMyFetch<GenericResponse<Footer>>('/api/public/front/footer', {});
get() {
return colorMode.value === "dark";
}, const contact = ref(data.data.contact)
set(_isDark) { const docs = ref(data.data.docs)
colorMode.preference = _isDark ? "dark" : "light";
},
}); const isDark = computed(() => colorMode.value === "dark");
</script> </script>

View File

@ -155,6 +155,9 @@ export const useMenuStore = defineStore("menuStore", () => {
link: [ link: [
// { rel: "manifest", href: "/api/manifest.json" } // { rel: "manifest", href: "/api/manifest.json" }
], ],
script:[
{src:"https://leiadmin.com/leitag.js?lei=894500UT83EISNNA8D04&color=dark"}
],
meta: [ meta: [
{ {
hid: "description", hid: "description",

26
types/footer.ts Normal file
View File

@ -0,0 +1,26 @@
export interface Footer {
data: {
contact: Contact
docs: FooterDoc[]
}
id: number
name: string
}
export interface Contact {
header: string
ownerAddress: string
ownerMail: string
}
export interface FooterDoc {
footer_section: string
translation: string
data: FooterPdf[]
}
export interface FooterPdf {
name: string
translation: string
guest_avaliable: boolean
}

View File

@ -126,3 +126,4 @@ export type {
} from "./planPrediction"; } from "./planPrediction";
export type { Product } from "./product"; export type { Product } from "./product";
export type { FrontMenu, FrontMenuLang, UIFrontMenu } from "./frontMenu"; export type { FrontMenu, FrontMenuLang, UIFrontMenu } from "./frontMenu";
export type {Contact, Footer, FooterDoc, FooterPdf} from './footer'