@shopbite-de/storefront 1.31.2 → 2.0.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.
- package/.github/workflows/ci.yaml +54 -0
- package/.nuxtrc +1 -1
- package/CLAUDE.md +23 -8
- package/app/app.vue +10 -6
- package/app/assets/css/main.css +100 -61
- package/app/components/AddToWishlist.vue +15 -25
- package/app/components/Address/Card.vue +6 -11
- package/app/components/Address/Detail.vue +23 -23
- package/app/components/Address/Fields.vue +175 -73
- package/app/components/Address/Form.vue +107 -106
- package/app/components/Cart/Bar.vue +6 -9
- package/app/components/Cart/Item.vue +48 -63
- package/app/components/Cart/QuickView.vue +38 -25
- package/app/components/Cart/Upsell.vue +24 -62
- package/app/components/Category/Breadcrumb.vue +29 -3
- package/app/components/Category/FilterGroup.vue +20 -41
- package/app/components/Category/Listing.vue +100 -130
- package/app/components/Category/SearchInput.vue +22 -19
- package/app/components/Checkout/DeliveryTimeSelect.vue +55 -77
- package/app/components/Checkout/LoginOrRegister.vue +28 -29
- package/app/components/Checkout/PaymentAndDelivery.vue +114 -86
- package/app/components/Checkout/Summary.vue +90 -60
- package/app/components/Checkout/VoucherInput.vue +40 -27
- package/app/components/Contact/Form.vue +164 -192
- package/app/components/DemoBanner.vue +5 -5
- package/app/components/Footer/StoreStatus.vue +2 -2
- package/app/components/Footer.vue +125 -57
- package/app/components/Header.vue +283 -18
- package/app/components/Home/Categories.vue +116 -0
- package/app/components/Home/Facts.vue +71 -0
- package/app/components/Home/Faq.vue +34 -16
- package/app/components/Home/Hero.vue +172 -0
- package/app/components/Home/Highlights.vue +29 -37
- package/app/components/Home/Restaurant.vue +102 -0
- package/app/components/Menu/BonCard.vue +180 -0
- package/app/components/Menu/CartPanel.vue +24 -0
- package/app/components/Menu/CategoryIndex.vue +54 -0
- package/app/components/Menu/OrderMode.vue +20 -0
- package/app/components/Menu/SectionHeader.vue +38 -0
- package/app/components/Navigation/MobileTop.vue +23 -15
- package/app/components/Order/Confirmation.vue +119 -0
- package/app/components/Order/Detail.vue +80 -88
- package/app/components/Product/CardSkeleton.vue +8 -12
- package/app/components/Product/Configurator.vue +8 -16
- package/app/components/Product/CrossSelling.vue +75 -83
- package/app/components/Product/DeselectIngredient.vue +17 -22
- package/app/components/Product/Detail.vue +35 -27
- package/app/components/Product/QuickView.vue +80 -51
- package/app/components/SalesChannelSwitch.vue +14 -28
- package/app/components/Sb/Button.vue +70 -0
- package/app/components/Sb/Checkbox.vue +73 -0
- package/app/components/Sb/Chip.vue +51 -0
- package/app/components/Sb/ChoiceGroup.vue +82 -0
- package/app/components/Sb/ConfirmDialog.vue +60 -0
- package/app/components/Sb/Field.vue +77 -0
- package/app/components/Sb/Icon.vue +66 -0
- package/app/components/Sb/IconButton.vue +55 -0
- package/app/components/Sb/Input.vue +23 -0
- package/app/components/Sb/SegmentedControl.vue +34 -0
- package/app/components/Sb/Select.vue +49 -0
- package/app/components/Sb/Sheet.vue +83 -0
- package/app/components/Sb/Stars.vue +60 -0
- package/app/components/Sb/StatusPill.vue +38 -0
- package/app/components/Sb/Stepper.vue +72 -0
- package/app/components/User/AccountHeader.vue +16 -0
- package/app/components/User/AuthPanel.vue +41 -0
- package/app/components/User/Detail.vue +32 -29
- package/app/components/User/LoginForm.vue +92 -98
- package/app/components/User/RegistrationForm.vue +285 -249
- package/app/components/Wishlist.vue +55 -155
- package/app/composables/useCartMutations.ts +9 -27
- package/app/composables/useCheckoutMethodGuard.ts +2 -24
- package/app/composables/useContactForm.ts +66 -0
- package/app/composables/useHomeMenuCategories.ts +41 -0
- package/app/composables/useNavigation.ts +10 -2
- package/app/composables/useOrderMode.ts +65 -0
- package/app/composables/useRegistrationForm.ts +161 -0
- package/app/composables/useRestaurantSchema.ts +1 -1
- package/app/composables/useShareLink.ts +3 -13
- package/app/composables/useSortingSelection.ts +13 -0
- package/app/composables/useThemePreset.ts +15 -0
- package/app/composables/useVoucherCode.ts +7 -16
- package/app/composables/useWishlistActions.ts +0 -51
- package/app/error.vue +31 -9
- package/app/layouts/account.vue +45 -50
- package/app/layouts/default.vue +2 -3
- package/app/layouts/listing.vue +3 -5
- package/app/pages/[...all].vue +8 -4
- package/app/pages/account/recover/password/index.vue +113 -80
- package/app/pages/anmelden.vue +11 -10
- package/app/pages/bestellung/[id]/erfolg.vue +1 -15
- package/app/pages/bestellung/[id]/fehler.vue +63 -51
- package/app/pages/bestellung/[id]/index.vue +3 -85
- package/app/pages/bestellung/kasse.vue +29 -0
- package/app/pages/bestellung.vue +8 -60
- package/app/pages/index.vue +12 -52
- package/app/pages/kontakt.vue +27 -7
- package/app/pages/konto/adressen.vue +106 -102
- package/app/pages/konto/bestellung/[id].vue +9 -43
- package/app/pages/konto/bestellungen.vue +55 -33
- package/app/pages/konto/index.vue +47 -62
- package/app/pages/konto/profil.vue +162 -100
- package/app/pages/maintenance.vue +8 -6
- package/app/pages/merkliste.vue +7 -8
- package/app/pages/passwort-vergessen.vue +92 -75
- package/app/pages/registrierung/bestaetigen.vue +20 -48
- package/app/pages/registrierung/index.vue +16 -7
- package/app/pages/suche.vue +94 -95
- package/app/plugins/theme-preset.ts +9 -0
- package/app/utils/highlight.ts +25 -0
- package/app/utils/product.ts +9 -0
- package/app/validation/registrationSchema.ts +1 -1
- package/docs/notes/2026-10-07-issue-434-property-group-projection.md +27 -0
- package/docs/notes/2026-10-07-listing-payload.md +38 -0
- package/docs/notes/2026-10-07-nuxt-4.6-inline-error-rendering.md +31 -0
- package/modules/theme.ts +115 -0
- package/nuxt.config.ts +27 -15
- package/package.json +6 -8
- package/playwright.config.ts +11 -0
- package/server/api/listing/[categoryId].get.ts +10 -11
- package/server/api/product/[productId].get.ts +4 -2
- package/server/api/product/variant.get.ts +1 -2
- package/server/api/search.get.ts +7 -12
- package/shared/theme/presets.ts +303 -0
- package/test/a11y/presets.test.ts +225 -0
- package/test/nuxt/AccountPagesPreset.test.ts +191 -0
- package/test/nuxt/AuthPagesPreset.test.ts +87 -0
- package/test/nuxt/CartCheckoutPreset.test.ts +154 -0
- package/test/nuxt/CartItem.test.ts +18 -3
- package/test/nuxt/CartUpsell.test.ts +1 -2
- package/test/nuxt/CheckoutFormsPreset.test.ts +120 -0
- package/test/nuxt/CheckoutOnePage.test.ts +115 -0
- package/test/nuxt/CheckoutSummary.test.ts +6 -6
- package/test/nuxt/CheckoutVoucherInput.test.ts +20 -32
- package/test/nuxt/ContactFormPreset.test.ts +115 -0
- package/test/nuxt/FooterStoreStatus.test.ts +2 -2
- package/test/nuxt/HeaderFooterPreset.test.ts +134 -0
- package/test/nuxt/HomeFaq.test.ts +3 -2
- package/test/nuxt/MenuBonCard.test.ts +122 -0
- package/test/nuxt/OrderPagesPreset.test.ts +132 -0
- package/test/nuxt/PaymentAndDelivery.test.ts +0 -4
- package/test/nuxt/ProductCrossSelling.test.ts +2 -1
- package/test/nuxt/ProductDeselectIngredient.test.ts +5 -3
- package/test/nuxt/ProductSheetPreset.test.ts +105 -0
- package/test/nuxt/RegisterConfirmPage.test.ts +0 -8
- package/test/nuxt/RegistrationForm.test.ts +89 -270
- package/test/nuxt/SbBaseComponents.test.ts +170 -0
- package/test/nuxt/SbStars.test.ts +25 -0
- package/test/nuxt/useCartMutations.test.ts +3 -17
- package/test/nuxt/useCartUpsell.test.ts +1 -1
- package/test/nuxt/useCheckoutMethodGuard.test.ts +0 -27
- package/test/nuxt/useShareLink.test.ts +1 -9
- package/test/nuxt/useWishlistActions.test.ts +3 -26
- package/test/unit/highlight.spec.ts +31 -0
- package/test/unit/product.spec.ts +12 -0
- package/test/unit/themePresets.spec.ts +61 -0
- package/app/app.config.ts +0 -19
- package/app/components/AnimatedSection.vue +0 -74
- package/app/components/BottomNavi.vue +0 -70
- package/app/components/Category/Header.vue +0 -48
- package/app/components/Checkout/PaymentMethod.vue +0 -30
- package/app/components/Checkout/ShippingMethod.vue +0 -30
- package/app/components/Cta.vue +0 -30
- package/app/components/Feature/Card.vue +0 -121
- package/app/components/Features.vue +0 -42
- package/app/components/Footer/Contact.vue +0 -82
- package/app/components/Header/Body.vue +0 -82
- package/app/components/Header/Right.vue +0 -187
- package/app/components/Header/Title.vue +0 -10
- package/app/components/Hero.vue +0 -233
- package/app/components/Home/MenuCategories.vue +0 -148
- package/app/components/ImageGallery.vue +0 -63
- package/app/components/Loading.vue +0 -29
- package/app/components/Navigation/DesktopLeft.vue +0 -39
- package/app/components/Product/Card.vue +0 -177
- package/app/components/Product/CardCompact.vue +0 -72
- package/app/components/Product/CardDietBadges.vue +0 -43
- package/app/components/Product/CardIngredients.vue +0 -35
- package/app/components/Product/CardKitchen.vue +0 -34
- package/app/components/Product/Category.vue +0 -160
- package/app/components/Product/SearchBar.vue +0 -95
- package/app/components/PublicAnnouncement.vue +0 -17
- package/app/pages/bestellung/bestaetigen.vue +0 -16
- package/app/pages/bestellung/warenkorb.vue +0 -49
- package/app/pages/bestellung/zahlung-versand.vue +0 -25
- package/test/nuxt/AddressFields.test.ts +0 -222
- package/test/nuxt/AnimatedSection.test.ts +0 -67
- package/test/nuxt/ContactForm.test.ts +0 -207
- package/test/nuxt/FooterContact.test.ts +0 -102
- package/test/nuxt/HeaderRight.test.ts +0 -142
- package/test/nuxt/Hero.test.ts +0 -126
- package/test/nuxt/HomeMenuCategories.test.ts +0 -94
- package/test/nuxt/LoginForm.test.ts +0 -159
|
@@ -1,36 +1,21 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import type { FormSubmitEvent } from "#ui/types";
|
|
4
|
-
import { useSalutations } from "@shopware/composables";
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
const schema = z.object({
|
|
18
|
-
salutationId: z.string().optional(),
|
|
19
|
-
firstName: z.string().optional(),
|
|
20
|
-
lastName: z.string().optional(),
|
|
21
|
-
email: z.string().email("Ungültige E-Mail-Adresse"),
|
|
22
|
-
phone: z.string().optional(),
|
|
23
|
-
subject: z.string().min(3, "Bitte gib einen Betreff an"),
|
|
24
|
-
comment: z
|
|
25
|
-
.string()
|
|
26
|
-
.min(10, "Die Nachricht muss mindestens 10 Zeichen lang sein"),
|
|
27
|
-
hp: z.string().optional(),
|
|
4
|
+
/**
|
|
5
|
+
* Contact form of the presets (#445): the same call as Contact/Form.vue
|
|
6
|
+
* (useContactForm), checked on submit with errors at the fields; the
|
|
7
|
+
* first invalid field gets focus, the result shows in the page.
|
|
8
|
+
*/
|
|
9
|
+
const { send } = useContactForm();
|
|
10
|
+
|
|
11
|
+
const schema = contactFormSchema.extend({
|
|
12
|
+
email: z.string().email("Bitte geben Sie eine gültige E-Mail-Adresse ein."),
|
|
13
|
+
subject: z.string().min(3, "Bitte geben Sie einen Betreff an."),
|
|
14
|
+
comment: z.string().min(10, "Die Nachricht braucht mindestens 10 Zeichen."),
|
|
28
15
|
});
|
|
16
|
+
type Field = keyof z.output<typeof schema>;
|
|
29
17
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const state = reactive({
|
|
33
|
-
salutationId: "",
|
|
18
|
+
const empty = () => ({
|
|
34
19
|
firstName: "",
|
|
35
20
|
lastName: "",
|
|
36
21
|
email: "",
|
|
@@ -39,183 +24,170 @@ const state = reactive({
|
|
|
39
24
|
comment: "",
|
|
40
25
|
hp: "",
|
|
41
26
|
});
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
27
|
+
const state = reactive(empty());
|
|
28
|
+
const errors = ref<Partial<Record<Field, string>>>({});
|
|
29
|
+
const sending = ref(false);
|
|
30
|
+
const result = ref<{ ok: boolean; message: string } | null>(null);
|
|
31
|
+
const form = ref<HTMLFormElement | null>(null);
|
|
32
|
+
const resultBox = ref<HTMLElement | null>(null);
|
|
33
|
+
|
|
34
|
+
async function onSubmit() {
|
|
35
|
+
result.value = null;
|
|
36
|
+
const parsed = schema.safeParse(state);
|
|
37
|
+
if (!parsed.success) {
|
|
38
|
+
const next: typeof errors.value = {};
|
|
39
|
+
for (const issue of parsed.error.issues) {
|
|
40
|
+
next[issue.path[0] as Field] ??= issue.message;
|
|
41
|
+
}
|
|
42
|
+
errors.value = next;
|
|
43
|
+
await nextTick();
|
|
44
|
+
form.value?.querySelector<HTMLElement>('[aria-invalid="true"]')?.focus();
|
|
52
45
|
return;
|
|
53
46
|
}
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
errors.value = {};
|
|
48
|
+
sending.value = true;
|
|
56
49
|
try {
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
body: {
|
|
61
|
-
salutationId: salutation,
|
|
62
|
-
firstName: event.data.firstName,
|
|
63
|
-
lastName: event.data.lastName,
|
|
64
|
-
email: event.data.email,
|
|
65
|
-
phone: event.data.phone,
|
|
66
|
-
subject: event.data.subject,
|
|
67
|
-
comment: event.data.comment,
|
|
68
|
-
},
|
|
69
|
-
},
|
|
50
|
+
const message = await send(
|
|
51
|
+
parsed.data,
|
|
52
|
+
"Vielen Dank, Ihre Nachricht ist bei uns angekommen.",
|
|
70
53
|
);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const msg =
|
|
74
|
-
typeof resultData?.individualSuccessMessage === "string"
|
|
75
|
-
? (resultData.individualSuccessMessage as string).trim()
|
|
76
|
-
: "";
|
|
77
|
-
successMessage.value =
|
|
78
|
-
msg && msg.length > 0
|
|
79
|
-
? msg
|
|
80
|
-
: "Deine Nachricht wurde erfolgreich versendet.";
|
|
81
|
-
submitted.value = true;
|
|
82
|
-
|
|
83
|
-
toast.add({
|
|
84
|
-
title: "Erfolg!",
|
|
85
|
-
description: successMessage.value,
|
|
86
|
-
color: "success",
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
// Reset form
|
|
90
|
-
state.salutationId = "";
|
|
91
|
-
state.firstName = "";
|
|
92
|
-
state.lastName = "";
|
|
93
|
-
state.email = "";
|
|
94
|
-
state.phone = "";
|
|
95
|
-
state.subject = "";
|
|
96
|
-
state.comment = "";
|
|
97
|
-
state.hp = "";
|
|
54
|
+
result.value = { ok: true, message };
|
|
55
|
+
Object.assign(state, empty());
|
|
98
56
|
} catch (error) {
|
|
99
57
|
console.error("Error sending contact mail:", error);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
});
|
|
58
|
+
result.value = {
|
|
59
|
+
ok: false,
|
|
60
|
+
message:
|
|
61
|
+
"Die Nachricht konnte nicht gesendet werden. Bitte versuchen Sie es später noch einmal.",
|
|
62
|
+
};
|
|
106
63
|
} finally {
|
|
107
|
-
|
|
64
|
+
sending.value = false;
|
|
108
65
|
}
|
|
66
|
+
await nextTick();
|
|
67
|
+
resultBox.value?.focus();
|
|
109
68
|
}
|
|
110
69
|
</script>
|
|
111
70
|
|
|
112
71
|
<template>
|
|
113
|
-
<div
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
<
|
|
134
|
-
v-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
<
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
72
|
+
<div class="flex flex-col gap-4 font-body text-sb-ink">
|
|
73
|
+
<div
|
|
74
|
+
v-if="result?.ok"
|
|
75
|
+
ref="resultBox"
|
|
76
|
+
role="status"
|
|
77
|
+
tabindex="-1"
|
|
78
|
+
class="flex flex-col items-start gap-4 rounded-sb-card bg-sb-primary-tint p-6 text-sb-primary-ink"
|
|
79
|
+
>
|
|
80
|
+
<p class="font-semibold">{{ result.message }}</p>
|
|
81
|
+
<SbButton variant="secondary" @click="result = null"
|
|
82
|
+
>Weitere Nachricht schreiben</SbButton
|
|
83
|
+
>
|
|
84
|
+
</div>
|
|
85
|
+
<form
|
|
86
|
+
v-else
|
|
87
|
+
ref="form"
|
|
88
|
+
novalidate
|
|
89
|
+
class="relative flex flex-col gap-4"
|
|
90
|
+
@submit.prevent="onSubmit"
|
|
91
|
+
>
|
|
92
|
+
<p
|
|
93
|
+
v-if="result"
|
|
94
|
+
ref="resultBox"
|
|
95
|
+
role="alert"
|
|
96
|
+
tabindex="-1"
|
|
97
|
+
class="rounded-sb-control border-[1.5px] border-sb-danger p-4 text-sm"
|
|
98
|
+
>
|
|
99
|
+
{{ result.message }}
|
|
100
|
+
</p>
|
|
101
|
+
<div class="grid gap-4 sm:grid-cols-2">
|
|
102
|
+
<SbField v-slot="{ id, describedBy }" label="Vorname" optional>
|
|
103
|
+
<SbInput
|
|
104
|
+
:id="id"
|
|
105
|
+
v-model="state.firstName"
|
|
106
|
+
name="firstName"
|
|
107
|
+
autocomplete="given-name"
|
|
108
|
+
:aria-describedby="describedBy"
|
|
109
|
+
/>
|
|
110
|
+
</SbField>
|
|
111
|
+
<SbField v-slot="{ id, describedBy }" label="Nachname" optional>
|
|
112
|
+
<SbInput
|
|
113
|
+
:id="id"
|
|
114
|
+
v-model="state.lastName"
|
|
115
|
+
name="lastName"
|
|
116
|
+
autocomplete="family-name"
|
|
117
|
+
:aria-describedby="describedBy"
|
|
118
|
+
/>
|
|
119
|
+
</SbField>
|
|
120
|
+
</div>
|
|
121
|
+
<SbField
|
|
122
|
+
v-slot="{ id, describedBy, invalid }"
|
|
123
|
+
label="E-Mail"
|
|
124
|
+
hint="Für unsere Antwort"
|
|
125
|
+
:error="errors.email"
|
|
126
|
+
>
|
|
127
|
+
<SbInput
|
|
128
|
+
:id="id"
|
|
129
|
+
v-model="state.email"
|
|
130
|
+
name="email"
|
|
131
|
+
type="email"
|
|
132
|
+
autocomplete="email"
|
|
133
|
+
:aria-describedby="describedBy"
|
|
134
|
+
:invalid="invalid"
|
|
147
135
|
/>
|
|
148
|
-
</
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
v-model="state.
|
|
153
|
-
|
|
154
|
-
|
|
136
|
+
</SbField>
|
|
137
|
+
<SbField v-slot="{ id, describedBy }" label="Telefon" optional>
|
|
138
|
+
<SbInput
|
|
139
|
+
:id="id"
|
|
140
|
+
v-model="state.phone"
|
|
141
|
+
name="phone"
|
|
142
|
+
type="tel"
|
|
143
|
+
autocomplete="tel"
|
|
144
|
+
:aria-describedby="describedBy"
|
|
155
145
|
/>
|
|
156
|
-
</
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
<UFormField label="Telefon" name="phone">
|
|
169
|
-
<UInput
|
|
170
|
-
v-model="state.phone"
|
|
171
|
-
type="tel"
|
|
172
|
-
placeholder="Deine Telefonnummer"
|
|
173
|
-
class="w-full"
|
|
174
|
-
/>
|
|
175
|
-
</UFormField>
|
|
176
|
-
|
|
177
|
-
<UFormField label="Betreff" name="subject" required>
|
|
178
|
-
<UInput
|
|
179
|
-
v-model="state.subject"
|
|
180
|
-
placeholder="Worum geht es?"
|
|
181
|
-
class="w-full"
|
|
182
|
-
/>
|
|
183
|
-
</UFormField>
|
|
184
|
-
|
|
185
|
-
<UFormField label="Nachricht" name="comment" required>
|
|
186
|
-
<UTextarea
|
|
187
|
-
v-model="state.comment"
|
|
188
|
-
placeholder="Wie können wir dir helfen?"
|
|
189
|
-
class="w-full"
|
|
190
|
-
/>
|
|
191
|
-
</UFormField>
|
|
192
|
-
|
|
193
|
-
<!-- Honeypot field -->
|
|
194
|
-
<div class="hidden-field" aria-hidden="true">
|
|
195
|
-
<UFormField label="Address" name="hp">
|
|
196
|
-
<UInput
|
|
197
|
-
v-model="state.hp"
|
|
198
|
-
type="text"
|
|
199
|
-
placeholder="Address"
|
|
200
|
-
tabindex="-1"
|
|
201
|
-
autocomplete="off"
|
|
146
|
+
</SbField>
|
|
147
|
+
<SbField
|
|
148
|
+
v-slot="{ id, describedBy, invalid }"
|
|
149
|
+
label="Betreff"
|
|
150
|
+
:error="errors.subject"
|
|
151
|
+
>
|
|
152
|
+
<SbInput
|
|
153
|
+
:id="id"
|
|
154
|
+
v-model="state.subject"
|
|
155
|
+
name="subject"
|
|
156
|
+
:aria-describedby="describedBy"
|
|
157
|
+
:invalid="invalid"
|
|
202
158
|
/>
|
|
203
|
-
</
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
159
|
+
</SbField>
|
|
160
|
+
<SbField
|
|
161
|
+
v-slot="{ id, describedBy, invalid }"
|
|
162
|
+
label="Nachricht"
|
|
163
|
+
:error="errors.comment"
|
|
164
|
+
>
|
|
165
|
+
<textarea
|
|
166
|
+
:id="id"
|
|
167
|
+
v-model="state.comment"
|
|
168
|
+
name="comment"
|
|
169
|
+
rows="6"
|
|
170
|
+
:aria-describedby="describedBy"
|
|
171
|
+
:aria-invalid="invalid || undefined"
|
|
172
|
+
class="w-full rounded-sb-control border-[1.5px] border-sb-control bg-sb-surface px-3.5 py-3 font-body text-base text-sb-ink focus-visible:outline-3 focus-visible:outline-offset-1 focus-visible:outline-sb-focus aria-invalid:border-sb-danger"
|
|
173
|
+
/>
|
|
174
|
+
</SbField>
|
|
175
|
+
<!-- honeypot: hidden from people and assistive technology -->
|
|
176
|
+
<div class="absolute size-0 overflow-hidden opacity-0" aria-hidden="true">
|
|
177
|
+
<label>
|
|
178
|
+
Adresse
|
|
179
|
+
<input
|
|
180
|
+
v-model="state.hp"
|
|
181
|
+
name="hp"
|
|
182
|
+
type="text"
|
|
183
|
+
tabindex="-1"
|
|
184
|
+
autocomplete="off"
|
|
185
|
+
/>
|
|
186
|
+
</label>
|
|
187
|
+
</div>
|
|
188
|
+
<SbButton type="submit" size="lg" :loading="sending" class="self-start"
|
|
189
|
+
>Nachricht senden</SbButton
|
|
190
|
+
>
|
|
191
|
+
</form>
|
|
192
|
+
</div>
|
|
208
193
|
</template>
|
|
209
|
-
|
|
210
|
-
<style scoped>
|
|
211
|
-
.hidden-field {
|
|
212
|
-
opacity: 0;
|
|
213
|
-
position: absolute;
|
|
214
|
-
top: 0;
|
|
215
|
-
left: 0;
|
|
216
|
-
height: 0;
|
|
217
|
-
width: 0;
|
|
218
|
-
z-index: -1;
|
|
219
|
-
overflow: hidden;
|
|
220
|
-
}
|
|
221
|
-
</style>
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<template>
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
<div
|
|
9
|
+
class="bg-sb-ink px-4 py-2.5 text-center font-body text-sm font-semibold text-sb-bg"
|
|
10
|
+
>
|
|
11
|
+
Demo-Shop: Bestellungen werden nicht bearbeitet und nicht ausgeliefert.
|
|
12
|
+
</div>
|
|
13
13
|
</template>
|
|
@@ -18,10 +18,10 @@ const text = computed(() => {
|
|
|
18
18
|
<p v-if="status" role="status" class="flex items-center gap-2 text-sm">
|
|
19
19
|
<span
|
|
20
20
|
class="size-2 shrink-0 rounded-full"
|
|
21
|
-
:class="status.open ? 'bg-
|
|
21
|
+
:class="status.open ? 'bg-sb-primary' : 'bg-sb-danger'"
|
|
22
22
|
aria-hidden="true"
|
|
23
23
|
/>
|
|
24
|
-
<span class="text-
|
|
24
|
+
<span class="text-sb-ink">{{ text }}</span>
|
|
25
25
|
</p>
|
|
26
26
|
<template #fallback>
|
|
27
27
|
<p class="h-5" aria-hidden="true" />
|
|
@@ -1,72 +1,140 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
NavigationMenuItem,
|
|
7
|
-
} from "@nuxt/ui";
|
|
2
|
+
import {
|
|
3
|
+
useNavigation,
|
|
4
|
+
type NavigationMenuItem,
|
|
5
|
+
} from "~/composables/useNavigation";
|
|
8
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Footer of the presets (#455): shop name, address, phone, Google link,
|
|
9
|
+
* opening hours with today's status (in the SSR HTML, local SEO #290) and
|
|
10
|
+
* the footer navigation as link columns. No colour mode switch: the
|
|
11
|
+
* preset fixes light or dark.
|
|
12
|
+
*/
|
|
9
13
|
const { footerMenu } = useNavigation(true);
|
|
10
14
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
)
|
|
14
|
-
label: item.label ?? "",
|
|
15
|
-
to: item.to as string | undefined,
|
|
16
|
-
target: item.target as string | undefined,
|
|
17
|
-
icon: item.icon,
|
|
18
|
-
});
|
|
15
|
+
const { site } = useRuntimeConfig().public;
|
|
16
|
+
const { businessHours, refresh } = useBusinessHours();
|
|
17
|
+
onServerPrefetch(() => refresh());
|
|
19
18
|
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
const openingHours = computed(() =>
|
|
20
|
+
groupOpeningHours(businessHours.value ?? []),
|
|
21
|
+
);
|
|
22
|
+
const locality = [site.address.postalCode, site.address.city]
|
|
23
|
+
.filter(Boolean)
|
|
24
|
+
.join(" ");
|
|
25
|
+
const year = new Date().getFullYear();
|
|
26
|
+
|
|
27
|
+
function linkTarget(link: NavigationMenuItem): string | undefined {
|
|
28
|
+
return typeof link.target === "string" ? link.target : undefined;
|
|
29
|
+
}
|
|
27
30
|
|
|
28
|
-
const
|
|
29
|
-
|
|
31
|
+
const columns = computed(() =>
|
|
32
|
+
footerMenu.value.filter((column) => column.children?.length),
|
|
30
33
|
);
|
|
31
34
|
</script>
|
|
32
35
|
|
|
33
36
|
<template>
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<template #left>
|
|
45
|
-
<NuxtLink
|
|
46
|
-
to="https://shopbite.de"
|
|
47
|
-
class="text-sm text-muted"
|
|
48
|
-
target="_blank"
|
|
37
|
+
<footer
|
|
38
|
+
class="border-t border-sb-line bg-sb-bg font-body text-sb-ink"
|
|
39
|
+
aria-labelledby="footer-title"
|
|
40
|
+
>
|
|
41
|
+
<div
|
|
42
|
+
class="mx-auto flex w-full max-w-(--sb-container) flex-col gap-12 px-4 pt-14 pb-10 sm:px-6 lg:px-8"
|
|
43
|
+
>
|
|
44
|
+
<div
|
|
45
|
+
class="grid gap-10 md:grid-cols-2 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_minmax(0,1.4fr)]"
|
|
49
46
|
>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
<address class="flex flex-col gap-3 not-italic">
|
|
48
|
+
<h2 id="footer-title" class="font-display text-[28px] leading-none">
|
|
49
|
+
{{ site.name }}
|
|
50
|
+
</h2>
|
|
51
|
+
<p
|
|
52
|
+
v-if="site.address.street || locality"
|
|
53
|
+
class="text-[15px] leading-relaxed text-sb-ink-muted"
|
|
54
|
+
>
|
|
55
|
+
<template v-if="site.address.street"
|
|
56
|
+
>{{ site.address.street }}<br
|
|
57
|
+
/></template>
|
|
58
|
+
{{ locality }}
|
|
59
|
+
</p>
|
|
60
|
+
<a
|
|
61
|
+
v-if="site.telephone"
|
|
62
|
+
:href="toTelHref(site.telephone)"
|
|
63
|
+
class="inline-flex min-h-11 items-center gap-2 self-start font-bold text-sb-ink hover:text-sb-primary-ink focus-visible:outline-3 focus-visible:outline-sb-focus"
|
|
64
|
+
>
|
|
65
|
+
<SbIcon name="phone" :size="16" />
|
|
66
|
+
{{ site.telephone }}
|
|
67
|
+
</a>
|
|
68
|
+
<a
|
|
69
|
+
v-if="site.googleBusinessProfileUrl"
|
|
70
|
+
:href="site.googleBusinessProfileUrl"
|
|
71
|
+
target="_blank"
|
|
72
|
+
rel="noopener"
|
|
73
|
+
class="inline-flex min-h-11 items-center self-start text-[15px] text-sb-ink-muted underline underline-offset-4 hover:text-sb-ink focus-visible:outline-3 focus-visible:outline-sb-focus"
|
|
74
|
+
>
|
|
75
|
+
Auf Google ansehen
|
|
76
|
+
</a>
|
|
77
|
+
</address>
|
|
53
78
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
79
|
+
<section
|
|
80
|
+
v-if="openingHours.length"
|
|
81
|
+
id="oeffnungszeiten"
|
|
82
|
+
class="flex scroll-mt-24 flex-col gap-3"
|
|
83
|
+
aria-labelledby="footer-hours"
|
|
84
|
+
>
|
|
85
|
+
<h2 id="footer-hours" class="text-sm font-bold">Öffnungszeiten</h2>
|
|
86
|
+
<FooterStoreStatus />
|
|
87
|
+
<dl class="grid grid-cols-[auto_1fr] gap-x-6 gap-y-1.5 text-[15px]">
|
|
88
|
+
<template v-for="row in openingHours" :key="row.days">
|
|
89
|
+
<dt class="font-semibold">{{ row.days }}</dt>
|
|
90
|
+
<dd class="text-sb-ink-muted tabular-nums">
|
|
91
|
+
{{
|
|
92
|
+
row.intervals.length ? row.intervals.join(", ") : "Ruhetag"
|
|
93
|
+
}}
|
|
94
|
+
</dd>
|
|
95
|
+
</template>
|
|
96
|
+
</dl>
|
|
97
|
+
</section>
|
|
58
98
|
|
|
59
|
-
|
|
60
|
-
|
|
99
|
+
<div
|
|
100
|
+
v-if="columns.length"
|
|
101
|
+
class="grid grid-cols-2 gap-8 sm:grid-cols-3 md:col-span-2 lg:col-span-1"
|
|
102
|
+
>
|
|
103
|
+
<nav
|
|
104
|
+
v-for="column in columns"
|
|
105
|
+
:key="column.label"
|
|
106
|
+
:aria-label="column.label"
|
|
107
|
+
class="flex flex-col gap-1"
|
|
108
|
+
>
|
|
109
|
+
<h2 class="mb-1 text-sm font-bold">{{ column.label }}</h2>
|
|
110
|
+
<NuxtLink
|
|
111
|
+
v-for="link in column.children"
|
|
112
|
+
:key="String(link.to)"
|
|
113
|
+
:to="link.to"
|
|
114
|
+
:target="linkTarget(link)"
|
|
115
|
+
class="inline-flex min-h-9 items-center text-[15px] text-sb-ink-muted hover:text-sb-ink focus-visible:outline-3 focus-visible:outline-sb-focus"
|
|
116
|
+
>
|
|
117
|
+
{{ link.label }}
|
|
118
|
+
</NuxtLink>
|
|
119
|
+
</nav>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
61
122
|
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
123
|
+
<div
|
|
124
|
+
class="flex flex-col gap-3 border-t border-sb-line pt-6 text-[13px] text-sb-ink-muted sm:flex-row sm:items-center sm:justify-between"
|
|
125
|
+
>
|
|
126
|
+
<p>
|
|
127
|
+
© {{ year }} {{ site.name }} · Alle Preise inkl. MwSt., zzgl.
|
|
128
|
+
Liefergebühr, wenn nicht anders angegeben
|
|
129
|
+
</p>
|
|
130
|
+
<a
|
|
131
|
+
href="https://shopbite.de"
|
|
132
|
+
target="_blank"
|
|
133
|
+
rel="noopener"
|
|
134
|
+
class="inline-flex min-h-11 items-center hover:text-sb-ink focus-visible:outline-3 focus-visible:outline-sb-focus"
|
|
135
|
+
>Online bestellen mit ShopBite</a
|
|
136
|
+
>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</footer>
|
|
72
140
|
</template>
|