@dargmuesli/nuxt-vio 3.0.0-beta.15 → 3.0.0-beta.17
Sign up to get free protection for your applications and to get access to all the features.
- package/components/vio/layout/VioLayoutFooter.vue +1 -1
- package/components/vio/page/VioPageLegalNotice.vue +1 -1
- package/components/vio/page/VioPagePrivacyPolicy.vue +1 -1
- package/composables/useHeadDefault.ts +1 -1
- package/package.json +3 -3
- package/utils/constants.ts +45 -0
- package/components/vio/layout/VioLayoutHeader.vue +0 -101
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="flex flex-col gap-8">
|
4
4
|
<div class="flex items-center">
|
5
5
|
<VioLayoutHr />
|
6
|
-
<
|
6
|
+
<slot name="logo" />
|
7
7
|
<VioLayoutHr />
|
8
8
|
</div>
|
9
9
|
<!-- Justifying evenly, instead of "between", centers a single element. -->
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "3.0.0-beta.
|
3
|
+
"version": "3.0.0-beta.17",
|
4
4
|
"type": "module",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -42,7 +42,7 @@
|
|
42
42
|
"preview": "nuxt preview .playground"
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@dargmuesli/nuxt-cookie-control": "6.4.
|
45
|
+
"@dargmuesli/nuxt-cookie-control": "6.4.1",
|
46
46
|
"@http-util/status-i18n": "0.8.1",
|
47
47
|
"@nuxt/image": "1.0.0-rc.1",
|
48
48
|
"@nuxtjs/color-mode": "3.3.0",
|
@@ -50,7 +50,7 @@
|
|
50
50
|
"@nuxtjs/i18n": "8.0.0-rc.3",
|
51
51
|
"@nuxtjs/tailwindcss": "6.8.0",
|
52
52
|
"@pinia/nuxt": "0.4.11",
|
53
|
-
"@tailwindcss/forms": "0.5.
|
53
|
+
"@tailwindcss/forms": "0.5.5",
|
54
54
|
"@tailwindcss/typography": "0.5.9",
|
55
55
|
"@urql/core": "4.1.1",
|
56
56
|
"@urql/devtools": "2.0.3",
|
package/utils/constants.ts
CHANGED
@@ -30,3 +30,48 @@ export const I18N_VUE_CONFIG = {
|
|
30
30
|
export const TIMEZONE_COOKIE_NAME = [COOKIE_PREFIX, 'tz'].join(COOKIE_SEPARATOR)
|
31
31
|
export const TIMEZONE_HEADER_KEY = `X-${SITE_NAME}-Timezone`
|
32
32
|
export const VALIDATION_SUGGESTION_TITLE_LENGTH_MAXIMUM = 300
|
33
|
+
export const VIO_NUXT_BASE_CONFIG = ({
|
34
|
+
baseUrl,
|
35
|
+
siteName,
|
36
|
+
stagingHost,
|
37
|
+
}: {
|
38
|
+
baseUrl: string
|
39
|
+
siteName: string
|
40
|
+
stagingHost: string
|
41
|
+
}) => ({
|
42
|
+
app: {
|
43
|
+
head: {
|
44
|
+
title: SITE_NAME, // fallback data to prevent invalid html at generation
|
45
|
+
},
|
46
|
+
},
|
47
|
+
runtimeConfig: {
|
48
|
+
public: {
|
49
|
+
i18n: {
|
50
|
+
baseUrl,
|
51
|
+
},
|
52
|
+
vio: {
|
53
|
+
stagingHost:
|
54
|
+
process.env.NODE_ENV !== 'production' &&
|
55
|
+
!process.env.NUXT_PUBLIC_STACK_DOMAIN
|
56
|
+
? stagingHost
|
57
|
+
: undefined,
|
58
|
+
},
|
59
|
+
},
|
60
|
+
},
|
61
|
+
typescript: {
|
62
|
+
tsConfig: {
|
63
|
+
compilerOptions: {
|
64
|
+
esModuleInterop: true,
|
65
|
+
// moduleResolution: 'bundler',
|
66
|
+
// noErrorTruncation: true,
|
67
|
+
},
|
68
|
+
},
|
69
|
+
},
|
70
|
+
|
71
|
+
// modules
|
72
|
+
i18n: I18N_MODULE_CONFIG, // `langDir`, `lazy` and `locales` must be configured to extend a layer having lazy-loaded translations (https://v8.i18n.nuxtjs.org/guide/layers#locales)
|
73
|
+
site: {
|
74
|
+
name: siteName,
|
75
|
+
url: baseUrl,
|
76
|
+
},
|
77
|
+
})
|
@@ -1,101 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<header class="mb-8 flex items-center justify-between gap-4">
|
3
|
-
<VioButton :aria-label="t('creal')" :to="localePath('/')">
|
4
|
-
<span class="text-lg font-bold">{{ t('creal') }}</span>
|
5
|
-
<template #prefix>
|
6
|
-
<VioIconLogo class="h-10 w-10" />
|
7
|
-
</template>
|
8
|
-
</VioButton>
|
9
|
-
<VioLink
|
10
|
-
v-if="eventsCurrentCount"
|
11
|
-
class="flex items-center gap-2 rounded-full border px-4 py-2 font-bold focus:rounded-full sm:px-4"
|
12
|
-
:is-colored="false"
|
13
|
-
:to="localePath('/events')"
|
14
|
-
>
|
15
|
-
<VioLayoutLivePulse />
|
16
|
-
<span class="hidden whitespace-nowrap sm:inline">
|
17
|
-
{{ t('live') }}
|
18
|
-
</span>
|
19
|
-
</VioLink>
|
20
|
-
<VioLink
|
21
|
-
v-else-if="eventsFutureCount"
|
22
|
-
class="flex items-center gap-2 rounded-full border px-2 py-2 font-bold focus:rounded-full sm:px-4"
|
23
|
-
:is-colored="false"
|
24
|
-
:to="localePath('/events')"
|
25
|
-
>
|
26
|
-
<VioLayoutLivePulse />
|
27
|
-
<span class="hidden whitespace-nowrap sm:inline">
|
28
|
-
{{ t('eventsFuture') }}
|
29
|
-
</span>
|
30
|
-
</VioLink>
|
31
|
-
<VioButton
|
32
|
-
:aria-label="t('bookCreal')"
|
33
|
-
class="basis-0 text-lg font-bold"
|
34
|
-
:is-colored="false"
|
35
|
-
:to="`mailto:e-mail+creal@jonas-thelemann.de?subject=${encodeURIComponent(
|
36
|
-
t('bookingSubject'),
|
37
|
-
)}`"
|
38
|
-
>
|
39
|
-
<span class="basis-0 whitespace-nowrap">{{ t('bookCreal') }}</span>
|
40
|
-
<template #suffix>
|
41
|
-
<VioIconArrowRight />
|
42
|
-
</template>
|
43
|
-
</VioButton>
|
44
|
-
</header>
|
45
|
-
</template>
|
46
|
-
|
47
|
-
<script setup lang="ts">
|
48
|
-
const { t } = useI18n()
|
49
|
-
const localePath = useLocalePath()
|
50
|
-
const strapiFetch = useStrapiFetch()
|
51
|
-
const dateTime = useDateTime()
|
52
|
-
|
53
|
-
// async data
|
54
|
-
let eventsCurrentCount = 0
|
55
|
-
let eventsFutureCount = 0
|
56
|
-
|
57
|
-
// data
|
58
|
-
const now = dateTime()
|
59
|
-
|
60
|
-
// methods
|
61
|
-
const init = async () => {
|
62
|
-
eventsCurrentCount = (
|
63
|
-
(await strapiFetch('/events', {
|
64
|
-
query: {
|
65
|
-
'filters[$and][0][dateStart][$lte]': now.toISOString(),
|
66
|
-
'filters[$and][1][$or][0][dateEnd][$gt]': now.toISOString(),
|
67
|
-
'filters[$and][1][$or][1][dateStart][$gte]': now
|
68
|
-
.startOf('day')
|
69
|
-
.toISOString(),
|
70
|
-
},
|
71
|
-
})) as any
|
72
|
-
).meta.pagination.total
|
73
|
-
eventsFutureCount = (
|
74
|
-
(await strapiFetch('/events', {
|
75
|
-
query: {
|
76
|
-
'filters[dateStart][$gt]': now.toISOString(),
|
77
|
-
},
|
78
|
-
})) as any
|
79
|
-
).meta.pagination.total
|
80
|
-
}
|
81
|
-
|
82
|
-
// initialization
|
83
|
-
try {
|
84
|
-
await init()
|
85
|
-
} catch (error: any) {}
|
86
|
-
</script>
|
87
|
-
|
88
|
-
<i18n lang="yaml">
|
89
|
-
en:
|
90
|
-
bookCreal: Book cReal
|
91
|
-
bookingSubject: Booking Request
|
92
|
-
creal: cReal
|
93
|
-
eventsFuture: Upcoming events
|
94
|
-
live: Live
|
95
|
-
de:
|
96
|
-
bookCreal: cReal buchen
|
97
|
-
bookingSubject: Buchungsanfrage
|
98
|
-
creal: cReal
|
99
|
-
eventsFuture: Kommende Veranstaltungen
|
100
|
-
live: Live
|
101
|
-
</i18n>
|