simple-content-site 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,8 +6,13 @@ const { data: footer } = await useSiteFooter()
|
|
|
6
6
|
|
|
7
7
|
<template>
|
|
8
8
|
<UFooter>
|
|
9
|
-
<template
|
|
10
|
-
|
|
9
|
+
<template
|
|
10
|
+
v-if="footer && footer.left"
|
|
11
|
+
#left
|
|
12
|
+
>
|
|
13
|
+
<AppFooterLeft
|
|
14
|
+
:parts="footer.left"
|
|
15
|
+
/>
|
|
11
16
|
</template>
|
|
12
17
|
<template
|
|
13
18
|
v-if="footer && footer.sections && footer.sections.length"
|
|
@@ -19,8 +24,11 @@ const { data: footer } = await useSiteFooter()
|
|
|
19
24
|
/>
|
|
20
25
|
</UContainer>
|
|
21
26
|
</template>
|
|
22
|
-
<template
|
|
23
|
-
|
|
27
|
+
<template
|
|
28
|
+
v-if="footer && footer.right"
|
|
29
|
+
#right
|
|
30
|
+
>
|
|
31
|
+
<AppFooterRight :links="footer && footer.right" />
|
|
24
32
|
</template>
|
|
25
33
|
</UFooter>
|
|
26
34
|
</template>
|
|
@@ -1,5 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defu } from 'defu'
|
|
3
|
+
|
|
4
|
+
const props = withDefaults(defineProps<{
|
|
5
|
+
parts?: string[]
|
|
6
|
+
replacements?: Record<string, string>
|
|
7
|
+
}>(), {
|
|
8
|
+
parts: () => ['Copyright ©', '{fullYear}'],
|
|
9
|
+
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
const replaceParams = (text: string, params: Record<string, string>) => text.replace(/\{([^}]+)\}/g, (_, key) => params[key] || '')
|
|
13
|
+
|
|
14
|
+
const rawItems = computed(() => {
|
|
15
|
+
if (!props.parts || props.parts.length === 0) return ['']
|
|
16
|
+
|
|
17
|
+
return props.parts
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const text = computed(() => {
|
|
21
|
+
return replaceParams([...toValue(rawItems)].join(' '), defu(props.replacements || {}, {
|
|
22
|
+
fullYear: new Date().getFullYear(),
|
|
23
|
+
}))
|
|
24
|
+
})
|
|
25
|
+
</script>
|
|
26
|
+
|
|
1
27
|
<template>
|
|
2
28
|
<div class="text-sm text-muted">
|
|
3
|
-
|
|
29
|
+
{{ text }}
|
|
4
30
|
</div>
|
|
5
31
|
</template>
|
|
@@ -13,9 +13,6 @@ const { locale, isEnabled, defaultLocale } = useSiteI18n()
|
|
|
13
13
|
const navigation = inject<Ref<ContentNavigationItem[]>>('navigation')
|
|
14
14
|
|
|
15
15
|
const collectionName = computed(() => {
|
|
16
|
-
console.log('isEnabled', isEnabled.value)
|
|
17
|
-
console.log('defaultLocale', defaultLocale.value)
|
|
18
|
-
console.log('locale', locale.value)
|
|
19
16
|
if (!isEnabled.value || !defaultLocale.value) {
|
|
20
17
|
return 'pages'
|
|
21
18
|
}
|
package/content.config.ts
CHANGED
|
@@ -76,7 +76,10 @@ const createFooterSchema = () => z.object({
|
|
|
76
76
|
label: z.string().nonempty(),
|
|
77
77
|
children: z.array(createLinkSchema()),
|
|
78
78
|
})),
|
|
79
|
+
left: z.array(z.string()).optional(),
|
|
80
|
+
// @deprecated Replaced by 'right'
|
|
79
81
|
socials: z.array(createLinkSchema()),
|
|
82
|
+
right: z.array(createLinkSchema()),
|
|
80
83
|
})
|
|
81
84
|
|
|
82
85
|
let collections: Record<string, DefinedCollection>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simple-content-site",
|
|
3
3
|
"description": "Nuxt layer for simple website with basic functions.",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
7
7
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@nuxt/content": "https://pkg.pr.new/@nuxt/content@dd854d5",
|
|
29
29
|
"@nuxt/image": "^1.11.0",
|
|
30
30
|
"@nuxt/kit": "^4.1.3",
|
|
31
|
-
"@nuxt/ui": "
|
|
31
|
+
"@nuxt/ui": "https://pkg.pr.new/@nuxt/ui@af197af",
|
|
32
32
|
"@nuxtjs/i18n": "^10.1.1",
|
|
33
33
|
"@nuxtjs/mdc": "^0.18.0",
|
|
34
34
|
"@nuxtjs/robots": "^5.5.5",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"exsolve": "^1.0.7",
|
|
38
38
|
"git-url-parse": "^16.1.0",
|
|
39
39
|
"minimark": "^0.2.0",
|
|
40
|
-
"motion-v": "^1.7.
|
|
40
|
+
"motion-v": "^1.7.4",
|
|
41
41
|
"nuxt-og-image": "^5.1.12",
|
|
42
|
-
"nuxt-studio": "^1.0.0-alpha.
|
|
42
|
+
"nuxt-studio": "^1.0.0-alpha.2",
|
|
43
43
|
"pkg-types": "^2.3.0",
|
|
44
44
|
"scule": "^1.3.0",
|
|
45
45
|
"tailwindcss": "^4.1.14",
|