minhnt-dev: footer

This commit is contained in:
MoreStrive
2024-06-19 16:13:42 +07:00
parent 3b613faccf
commit 229155b24a
6 changed files with 45 additions and 35 deletions
@@ -27,7 +27,6 @@ const findDataPosition = computed(() => {
result = currentPage.value.components && currentPage.value.components.find((component: any) => {
return component.settings?.template === enumPageComponentTemplates.NAVIGATION && component.settings?.layout === defineTypeRecusive.TOP_NAVIGATION
});
console.log(result)
break;
case defineTypeRecusive.BOTTOM_NAVIGATION:
result = currentPage.value.components && currentPage.value.components.find((component: any) => {
@@ -1,35 +1,48 @@
<script setup lang="ts">
// import { isEmpty } from "lodash";
// import DynamicComponent from "~/components/cms/page-component/templates/index.vue";
// import { getInputValue } from "@/utils/cms/page/parseSQL";
import { buildTree } from "@/utils/recusive";
// const emit = defineEmits(["selectComponent"]);
const _props = defineProps<{
content?: any;
component?: any;
}>();
// const _props = defineProps<{
// dataResult?: any[];
// dataQuery?: string;
// component?: any;
// }>();
// const SETTING_OPTIONS = {
// MAX_ELEMENT: 10,
// };
const SETTING_OPTIONS = {
MAX_ELEMENT: 4,
};
</script>
<template>
lay outa
<!-- <section>
<div v-for="navItem, index in Array(SETTING_OPTIONS.MAX_ELEMENT).fill({})" :key="index">
<div class="empty"></div>
<div class="mt-4">
<div class="gap-5 grid" :style="`grid-template-columns: repeat(${SETTING_OPTIONS.MAX_ELEMENT}, minmax(0, 1fr));`">
<template v-if="_props.content">
<div v-for="item, index in buildTree(_props.content)" :key="index">
<div class="submenu-container">
<h4 class="mb-0" @click="selectNavigationComponent">{{ item.title }}</h4>
<h4
v-for="_item, _index in item.childs ? item.childs : []"
:key="_index"
class="mb-0"
@click="selectNavigationComponent"
>
{{ _item.title }}
</h4>
</div>
</div>
</template>
</div>
</section> -->
</div>
</template>
<style lang="scss" scoped>
.empty {
width: 120px;
min-height: 100px;
border-radius: 6px;
background: #409eff;
.submenu-container {
display: grid;
gap: 20px;
grid-template-columns: repeat(1, minmax(0, 1fr));
h4 {
font-size: 14px;
font-weight: normal;
text-align: center;
cursor: pointer;
}
}
</style>
@@ -4,7 +4,7 @@ import { buildTree } from "@/utils/recusive";
import RecusiveNavItem from "@/components/dynamic-page/page-component/templates/navigations/components/RecusiveNavItem.vue";
const _props = defineProps<{
content?: any[];
content?: any;
component?: any;
}>();
</script>
@@ -1,12 +1,14 @@
<script setup lang="ts">
import AssignComponent from "~/components/dynamic-page/page-component/AssignComponent.vue";
import { enumPageComponentTemplates, enumPageComponentLayouts } from "@/definitions/enum";
</script>
<template>
<footer class="border-t bg-white mt-6">
<div id="footer-desktop" class="px-4 mx-auto max-w-7xl 2xl:px-0 pt-4">
<div class="grid gap-4 font-semibold md:grid-cols-12 text-sm mb-2">
<div class="col-span-8">
<div class="grid grid-cols-2 md:grid-cols-3 gap-4">
</div>
<AssignComponent :type="enumPageComponentLayouts[enumPageComponentTemplates.NAVIGATION]['NAVIGATION-BOTTOM']" />
</div>
<div class="col-span-4 grid gap-4 sm:border-l sm:pl-4 auto-rows-max">
<div>