Skip to content
Snippets Groups Projects
Commit d960250b authored by Emmanuel Salomon's avatar Emmanuel Salomon :fist:
Browse files

chore: map footer column to settings

parent ca3e2988
No related branches found
No related tags found
No related merge requests found
<template>
<div
class="flex flex-wrap justify-center bg-gradient-to-r from-purple-600 to-purple-400 py-6 text-white z-10 dark:from-purple-900 dark:to-purple-700 dark:text-gray-100"
class="
flex flex-wrap
justify-center
bg-gradient-to-r
from-purple-600
to-purple-400
py-6
text-white
z-10
dark:from-purple-900 dark:to-purple-700 dark:text-gray-100
"
>
<div class="container">
<div class="flex flex-wrap mb-4 w-full">
......@@ -30,32 +40,24 @@
</div>
<div
class="w-full flex flex-col pl-0 sm:w-1/2 sm:items-start sm:pl-8 md:justify-around md:flex-row"
class="
w-full
flex flex-col
pl-0
sm:w-1/2 sm:items-start sm:pl-8
md:justify-around md:flex-row
"
>
<div>
<h3 class="text-3xl py-4">Sections</h3>
<ul>
<li>
<nuxt-link class="hover:underline" to="/blog">Blog</nuxt-link>
</li>
<li>
<nuxt-link class="hover:underline" to="/ressources">
Ressources
</nuxt-link>
</li>
<li>
<nuxt-link class="hover:underline" to="/faq">FAQ</nuxt-link>
</li>
<li>
<nuxt-link class="hover:underline" to="/lexique">
Lexique
</nuxt-link>
<div v-for="(column, index) of menuFooter" :key="index">
<h3 class="text-3xl py-4">{{ column.title }}</h3>
<ul v-if="column.type === 'column'">
<li v-for="(menu, i) of column.menus" :key="i">
<nuxt-link class="hover:underline" :to="menu.url">{{
menu.title
}}</nuxt-link>
</li>
</ul>
</div>
<div>
<h3 class="text-3xl py-4">Ressources</h3>
<ul>
<ul v-if="column.type === 'ressources'">
<li v-for="category in categories" :key="category.title">
<nuxt-link
class="hover:underline"
......@@ -76,11 +78,13 @@
</template>
<script>
import menus from '~/static/settings/menus.json'
import categories from '~/static/settings/categories.json'
export default {
data() {
return {
menuFooter: menus.menu_footer,
categories: categories.ressources,
}
},
......
......@@ -161,6 +161,12 @@ collections:
- { label: Titre, name: title }
- { name: url }
- { label: Icône, name: icon, required: false }
- label: Ressources
name: ressources
widget: object
summary: "{{fields.title}}"
fields:
- { label: Titre, name: title }
- name: general
label: Général
file: static/settings/globals.json
......
......@@ -23,8 +23,8 @@
"title": "Sections",
"menus": [
{
"title": "Blog",
"url": "/blog"
"title": "Ressources",
"url": "/ressources"
},
{
"title": "FAQ",
......@@ -37,22 +37,8 @@
]
},
{
"type": "column",
"title": "Ressources",
"menus": [
{
"title": "Sites web",
"url": "/ressources?cat=website"
},
{
"title": "Vidéos",
"url": "/ressources?cat=video"
},
{
"title": "Applications",
"url": "/ressources?cat=app"
}
]
"type": "ressources",
"title": "Ressources"
}
]
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment