diff --git a/components/home/HomeSearch.vue b/components/home/HomeSearch.vue index c8018e8f514b1dd4349ec7166e4a5b75c3ce8a5f..3ab84f041996f82f9da79fb9b9a763dc14449b27 100644 --- a/components/home/HomeSearch.vue +++ b/components/home/HomeSearch.vue @@ -32,17 +32,6 @@ icon-class="text-2xl text-blue-100 dark:text-gray-600" @keyup.enter="$router.push(`/ressources?q=${queryRessources}`)" /> - - <TInputIcon - v-model="querySearch" - type="search" - :placeholder="$t('home.searchG1Placeholder')" - class="w-full" - input-class="text-xl rounded-full" - icon="search" - icon-class="text-2xl text-blue-100 dark:text-gray-600" - @keyup.enter="searchOnSite" - /> </div> </div> </section> @@ -54,7 +43,6 @@ export default { return { querySite: null, queryRessources: null, - querySearch: null, } }, methods: { diff --git a/content/ressources/axiom-team.json b/content/ressources/axiom-team.json index b3d8a8fc1f2df3d8222b9448bd0b84475a1b0721..c71802357eba42501631bd1fd6a5df9e7ee57bc4 100644 --- a/content/ressources/axiom-team.json +++ b/content/ressources/axiom-team.json @@ -2,7 +2,8 @@ "description": "Axiom Team a pour but de promouvoir la g1 dans ses antennes locales", "title": "Axiom Team", "url": "https://axiom-team.fr", - "categories": ["Site web", "Asso"], + "featured": 400, + "categories": ["Site web", "Asso", "Mises en avant"], "related": [ { "url": "https://forum.axiom-team.fr", diff --git a/content/ressources/cesium.json b/content/ressources/cesium.json index 170d48e606fa3482c4ad640df7461cb1f72a02e8..105a79567859b692466d0067e04b96e32e7f83a8 100644 --- a/content/ressources/cesium.json +++ b/content/ressources/cesium.json @@ -2,8 +2,7 @@ "url": "https://cesium.app", "description": "Cesium est le logiciel le plus simple pour gérer ses comptes g1", "title": "Cesium", - "categories": [ - "App" - ], + "categories": ["App", "Mises en avant"], + "featured": 100, "image": "/uploads/cesium.svg" -} \ No newline at end of file +} diff --git a/content/ressources/forum.json b/content/ressources/forum.json index 0e800106976087b52443cafd2356fa722bbf6cc5..7e83d950dde9270e4e0d7347bea59db41fac7c7c 100644 --- a/content/ressources/forum.json +++ b/content/ressources/forum.json @@ -1,9 +1,8 @@ { - "categories": [ - "Site web" - ], + "categories": ["Site web", "Mises en avant"], + "featured": 300, "url": "https://forum.monnaie-libre.fr", "title": "Forum", "description": "Forum de la monnaie libre", "image": "/uploads/ml-fr.png" -} \ No newline at end of file +} diff --git a/content/ressources/monnaie-libre-occitanie.json b/content/ressources/monnaie-libre-occitanie.json index 05f1ed152a6ac6f65631dba7906ca06b430eec1b..81dff80416f7bf90637e4fcc9b63dad5b1f661b7 100644 --- a/content/ressources/monnaie-libre-occitanie.json +++ b/content/ressources/monnaie-libre-occitanie.json @@ -16,6 +16,7 @@ "icon": "youtube" } ], - "categories": ["Groupe local"], - "image": "/uploads/mlo.png" + "categories": ["Groupe local", "Mises en avant"], + "image": "/uploads/mlo.png", + "featured": 200 } diff --git a/pages/ressources.vue b/pages/ressources.vue index 746665682ec0be189d971e36346e60251b9baf48..7bd56e90fc48983da393620a7d3bc35d6bbb0c8b 100644 --- a/pages/ressources.vue +++ b/pages/ressources.vue @@ -36,7 +36,8 @@ export default { name: 'RessourcesPage', async asyncData({ $content }) { const results = await $content('ressources') - .sortBy('createdAt', 'desc') + .where({ categories: { $containsAny: 'Mises en avant' } }) + .sortBy('featured', 'asc') .fetch() return { @@ -47,7 +48,7 @@ export default { const allCategories = categories.ressources.map((cat) => cat.title) return { categories: allCategories, - selectedCategories: allCategories, + selectedCategories: ['Mises en avant'], // allCategories, } }, watch: { @@ -60,6 +61,7 @@ export default { return await this.$content('ressources') .search(query) .where({ categories: { $containsAny: this.selectedCategories } }) + .sortBy('title', 'asc') .fetch() }, }, diff --git a/static/settings/categories.json b/static/settings/categories.json index d78121533e9528cd8e4063a4377fcfc3035c9c53..36c6f8c547dd6c0aabc970ab585cfb012bdb33bc 100644 --- a/static/settings/categories.json +++ b/static/settings/categories.json @@ -8,6 +8,9 @@ } ], "ressources": [ + { + "title": "Mises en avant" + }, { "title": "Vidéo" }, @@ -33,4 +36,4 @@ "title": "Groupe local" } ] -} \ No newline at end of file +} diff --git a/static/settings/menus.json b/static/settings/menus.json index 553d81efb4e81464771db3ac7c620769fd4fc85d..a973cd261c86e96e743138809ce9de9a87c03bff 100644 --- a/static/settings/menus.json +++ b/static/settings/menus.json @@ -5,8 +5,8 @@ "url": "/faq" }, { - "title": "Contribuer", - "url": "/contribuer" + "title": "Ressources", + "url": "/ressources" }, { "title": "Blog", @@ -55,4 +55,4 @@ ] } ] -} \ No newline at end of file +}