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

Fix grid and liste

parent 466d0d7d
Branches v2-unpress
No related tags found
No related merge requests found
Pipeline #37907 failed
<script lang="ts" setup>
import type { VueNodeViewProps } from 'prosekit/vue'
const props = defineProps<VueNodeViewProps>()
const { getComponentProps } = useMdcEditor()
const { model, mdcAttrs } = getComponentProps(props, {
id: {
type: String,
},
class: {
type: String,
},
collection: {
type: String,
required: true,
},
items: {
type: [String, Number],
default: 3,
},
fullWidth: {
type: Boolean,
default: false,
},
})
// console.log(model)
onMounted(() => {
// console.log('mounted', model)
})
</script>
<template>
<div relative>
<UiEditorHorizontalControls>
<UiEditorInput v-model="mdcAttrs.collection" placeholder="Chemin de la collection" label="Chemin" />
<UiEditorInput v-model="mdcAttrs.items" type="number" placeholder="" label="Nbr de colonnes"
input-classes="INPUT w-12!" />
<UiEditorSwitch label="Pleine largeur" @click="mdcAttrs.fullWidth = !mdcAttrs.fullWidth"
:pressed="mdcAttrs.fullWidth || false" />
</UiEditorHorizontalControls>
<Grid :collection="model.collection" :items="model.items" :fullwidth="model.fullWidth" contenteditable="false" />
</div>
</template>
...@@ -44,9 +44,10 @@ const props = defineProps({ ...@@ -44,9 +44,10 @@ const props = defineProps({
default: undefined default: undefined
} }
}) })
const filterList = (list) => list.filter( const filterList = (list) => list.filter(
(item) => !item._file.includes('index.md') (item) => {
return !item._file.includes('index.md') && item._file !== props.path + '.md'
}
) )
const sortedList = (list) => { const sortedList = (list) => {
......
<script lang="ts" setup>
import type { VueNodeViewProps } from 'prosekit/vue'
const props = defineProps<VueNodeViewProps>()
const { getComponentProps } = useMdcEditor()
const { model, mdcAttrs } = getComponentProps(props, {
id: {
type: String,
},
class: {
type: String,
},
path: {
type: String,
}
})
// console.log(model)
onMounted(() => {
// console.log('mounted', model)
})
</script>
<template>
<div relative>
<UiEditorHorizontalControls>
<UiEditorInput v-model="mdcAttrs.path" flex-1 :focus placeholder="Path to folder" label="Chemin" />
</UiEditorHorizontalControls>
<Liste :path="model.path" contenteditable="false" />
</div>
</template>
...@@ -10,6 +10,10 @@ const props = defineProps({ ...@@ -10,6 +10,10 @@ const props = defineProps({
const { data } = await useAsyncData('menus', () => queryContent('menus').findOne()) const { data } = await useAsyncData('menus', () => queryContent('menus').findOne())
const menus = computed(() => data.value[props.menu]) const menus = computed(() => data.value[props.menu])
function openNetlifyCms() {
window.open('/admin/', '_blank').focus();
}
</script> </script>
<template> <template>
...@@ -42,12 +46,17 @@ const menus = computed(() => data.value[props.menu]) ...@@ -42,12 +46,17 @@ const menus = computed(() => data.value[props.menu])
</template> </template>
</CmsAuth> </CmsAuth>
</li> </li>
<li v-if="menu === 'footer'" class="flex items-center">
<a @click="openNetlifyCms()" class="menu-item cursor-pointer">
<span>Admin (old)</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
</template> </template>
<style lang="postcss" scoped> <style lang="postcss" scoped>
.menu-item { .menu-item {
@apply "flex items-center w-full py-2 pr-4 pl-3 text-gray-700 rounded hover:bg-primary hover:bg-opacity-25 md:hover:bg-transparent md:border-0 md:hover:text-primary md:p-0 dark:text-gray-400 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent transition"; --at-apply: "flex items-center w-full py-2 pr-4 pl-3 text-gray-700 rounded hover:bg-primary hover:bg-opacity-25 md:hover:bg-transparent md:border-0 md:hover:text-primary md:p-0 dark:text-gray-400 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent transition";
} }
</style> </style>
File moved
File moved
...@@ -4,19 +4,18 @@ logo_url: /uploads/logo-light.png ...@@ -4,19 +4,18 @@ logo_url: /uploads/logo-light.png
# gitlab backend configuration https://www.netlifycms.org/docs/gitlab-backend/ # gitlab backend configuration https://www.netlifycms.org/docs/gitlab-backend/
backend: backend:
# Local backend configuration # Local backend configuration
name: git-gateway # name: git-gateway
branch: main # branch: main
local_backend: # local_backend: true
true
# branch: main branch: main
# name: gitlab name: gitlab
# repo: websites/axiom-team-fr repo: websites/axiom-team-fr
# auth_type: pkce auth_type: pkce
# app_id: b2991917452860f1a25e24defebe0446fcc4eabd74b9f18f37338260c6b23058 # Application ID from https://git.duniter.org/groups/websites/-/settings/applications app_id: b2991917452860f1a25e24defebe0446fcc4eabd74b9f18f37338260c6b23058 # Application ID from https://git.duniter.org/groups/websites/-/settings/applications
# api_root: https://git.duniter.org/api/v4 api_root: https://git.duniter.org/api/v4
# base_url: https://git.duniter.org base_url: https://git.duniter.org
# auth_endpoint: oauth/authorize auth_endpoint: oauth/authorize
# publish_mode: editorial_workflow # publish_mode: editorial_workflow
......
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