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> <template>
<div <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="container">
<div class="flex flex-wrap mb-4 w-full"> <div class="flex flex-wrap mb-4 w-full">
...@@ -30,32 +40,24 @@ ...@@ -30,32 +40,24 @@
</div> </div>
<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> <div v-for="(column, index) of menuFooter" :key="index">
<h3 class="text-3xl py-4">Sections</h3> <h3 class="text-3xl py-4">{{ column.title }}</h3>
<ul> <ul v-if="column.type === 'column'">
<li> <li v-for="(menu, i) of column.menus" :key="i">
<nuxt-link class="hover:underline" to="/blog">Blog</nuxt-link> <nuxt-link class="hover:underline" :to="menu.url">{{
</li> menu.title
<li> }}</nuxt-link>
<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>
</li> </li>
</ul> </ul>
</div> <ul v-if="column.type === 'ressources'">
<div>
<h3 class="text-3xl py-4">Ressources</h3>
<ul>
<li v-for="category in categories" :key="category.title"> <li v-for="category in categories" :key="category.title">
<nuxt-link <nuxt-link
class="hover:underline" class="hover:underline"
...@@ -76,11 +78,13 @@ ...@@ -76,11 +78,13 @@
</template> </template>
<script> <script>
import menus from '~/static/settings/menus.json'
import categories from '~/static/settings/categories.json' import categories from '~/static/settings/categories.json'
export default { export default {
data() { data() {
return { return {
menuFooter: menus.menu_footer,
categories: categories.ressources, categories: categories.ressources,
} }
}, },
......
...@@ -161,6 +161,12 @@ collections: ...@@ -161,6 +161,12 @@ collections:
- { label: Titre, name: title } - { label: Titre, name: title }
- { name: url } - { name: url }
- { label: Icône, name: icon, required: false } - { label: Icône, name: icon, required: false }
- label: Ressources
name: ressources
widget: object
summary: "{{fields.title}}"
fields:
- { label: Titre, name: title }
- name: general - name: general
label: Général label: Général
file: static/settings/globals.json file: static/settings/globals.json
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
"title": "Sections", "title": "Sections",
"menus": [ "menus": [
{ {
"title": "Blog", "title": "Ressources",
"url": "/blog" "url": "/ressources"
}, },
{ {
"title": "FAQ", "title": "FAQ",
...@@ -37,22 +37,8 @@ ...@@ -37,22 +37,8 @@
] ]
}, },
{ {
"type": "column", "type": "ressources",
"title": "Ressources", "title": "Ressources"
"menus": [
{
"title": "Sites web",
"url": "/ressources?cat=website"
},
{
"title": "Vidéos",
"url": "/ressources?cat=video"
},
{
"title": "Applications",
"url": "/ressources?cat=app"
}
]
} }
] ]
} }
\ 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