@iqual/nuxt-icms 1.0.2
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/app.config.ts +1 -0
- package/app.vue +50 -0
- package/assets/css/backend.css +82 -0
- package/assets/css/ckeditor.css +15 -0
- package/assets/css/components/carousel.css +91 -0
- package/assets/css/components/ck-content.css +65 -0
- package/assets/css/components/container.css +17 -0
- package/assets/css/components/dialog.css +9 -0
- package/assets/css/components/grid-container.css +296 -0
- package/assets/css/components/link.css +21 -0
- package/assets/css/fe-fixes.css +105 -0
- package/assets/css/tailwind.css +104 -0
- package/assets/css/typography.css +67 -0
- package/assets/symbols/chevron-down.svg +1 -0
- package/assets/symbols/chevron-right.svg +3 -0
- package/assets/symbols/close.svg +3 -0
- package/assets/symbols/facebook.svg +3 -0
- package/assets/symbols/instagram.svg +13 -0
- package/assets/symbols/linkedin.svg +4 -0
- package/assets/symbols/logo.svg +22 -0
- package/assets/symbols/magnifyingglass.svg +4 -0
- package/assets/symbols/pinterest.svg +4 -0
- package/assets/symbols/play.svg +6 -0
- package/assets/symbols/tiktok.svg +4 -0
- package/assets/symbols/x.svg +4 -0
- package/bundles.ts +50 -0
- package/components/Blokkli/Button/Element/icon.svg +4 -0
- package/components/Blokkli/Button/Element/index.vue +18 -0
- package/components/Blokkli/CallToAction/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/CallToAction/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/CallToAction/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/CallToAction/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/CallToAction/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/CallToAction/icon.svg +5 -0
- package/components/Blokkli/CallToAction/index.vue +15 -0
- package/components/Blokkli/Card/Element/icon.svg +6 -0
- package/components/Blokkli/Card/Element/index.vue +14 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-large-spacing.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-small-spacing.svg +1 -0
- package/components/Blokkli/Card/Layout/icon.svg +8 -0
- package/components/Blokkli/Card/Layout/index.vue +15 -0
- package/components/Blokkli/Contact/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Contact/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Contact/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Contact/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Contact/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Contact/icon.svg +5 -0
- package/components/Blokkli/Contact/index.vue +15 -0
- package/components/Blokkli/Downloads/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Downloads/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Downloads/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Downloads/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Downloads/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Downloads/icon.svg +5 -0
- package/components/Blokkli/Downloads/index.vue +16 -0
- package/components/Blokkli/FAQ/Element/icon-blokkli-option-large-spacing.svg +1 -0
- package/components/Blokkli/FAQ/Element/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/FAQ/Element/icon-blokkli-option-small-spacing.svg +1 -0
- package/components/Blokkli/FAQ/Element/icon.svg +3 -0
- package/components/Blokkli/FAQ/Element/index.vue +14 -0
- package/components/Blokkli/FAQ/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/FAQ/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/FAQ/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/FAQ/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/FAQ/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/FAQ/Layout/icon.svg +5 -0
- package/components/Blokkli/FAQ/Layout/index.vue +20 -0
- package/components/Blokkli/FlipTeasers/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/FlipTeasers/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/FlipTeasers/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/FlipTeasers/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/FlipTeasers/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/FlipTeasers/icon.svg +7 -0
- package/components/Blokkli/FlipTeasers/index.vue +15 -0
- package/components/Blokkli/Gallery/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Gallery/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Gallery/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Gallery/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Gallery/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Gallery/icon.svg +5 -0
- package/components/Blokkli/Gallery/index.vue +16 -0
- package/components/Blokkli/HeroImage/icon.svg +5 -0
- package/components/Blokkli/HeroImage/index.vue +15 -0
- package/components/Blokkli/IconText/Element/icon.svg +5 -0
- package/components/Blokkli/IconText/Element/index.vue +14 -0
- package/components/Blokkli/IconText/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/IconText/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/IconText/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/IconText/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/IconText/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/IconText/Layout/icon.svg +7 -0
- package/components/Blokkli/IconText/Layout/index.vue +20 -0
- package/components/Blokkli/Introduction/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Introduction/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Introduction/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Introduction/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Introduction/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Introduction/icon.svg +5 -0
- package/components/Blokkli/Introduction/index.vue +20 -0
- package/components/Blokkli/Logo/Element/icon.svg +6 -0
- package/components/Blokkli/Logo/Element/index.vue +14 -0
- package/components/Blokkli/Media/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Media/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Media/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Media/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Media/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Media/icon.svg +8 -0
- package/components/Blokkli/Media/index.vue +15 -0
- package/components/Blokkli/Partnerships/Element/icon.svg +3 -0
- package/components/Blokkli/Partnerships/Element/index.vue +13 -0
- package/components/Blokkli/Partnerships/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Partnerships/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Partnerships/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Partnerships/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Partnerships/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Partnerships/Layout/icon.svg +5 -0
- package/components/Blokkli/Partnerships/Layout/index.vue +15 -0
- package/components/Blokkli/SingleTestimonial/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/SingleTestimonial/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/SingleTestimonial/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/SingleTestimonial/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/SingleTestimonial/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/SingleTestimonial/icon.svg +5 -0
- package/components/Blokkli/SingleTestimonial/index.vue +20 -0
- package/components/Blokkli/Table/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Table/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Table/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Table/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Table/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Table/icon.svg +5 -0
- package/components/Blokkli/Table/index.vue +15 -0
- package/components/Blokkli/Tabs/Element/icon.svg +3 -0
- package/components/Blokkli/Tabs/Element/index.vue +14 -0
- package/components/Blokkli/Tabs/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Tabs/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Tabs/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Tabs/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Tabs/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Tabs/Layout/icon.svg +5 -0
- package/components/Blokkli/Tabs/Layout/index.vue +20 -0
- package/components/Blokkli/Team/Element/icon.svg +3 -0
- package/components/Blokkli/Team/Element/index.vue +14 -0
- package/components/Blokkli/Team/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Team/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Team/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Team/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Team/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Team/Layout/icon.svg +5 -0
- package/components/Blokkli/Team/Layout/index.vue +15 -0
- package/components/Blokkli/Teasers/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Teasers/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Teasers/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Teasers/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Teasers/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Teasers/icon.svg +6 -0
- package/components/Blokkli/Teasers/index.vue +15 -0
- package/components/Blokkli/Testimonial/Element/icon.svg +3 -0
- package/components/Blokkli/Testimonial/Element/index.vue +14 -0
- package/components/Blokkli/Testimonial/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Testimonial/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Testimonial/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Testimonial/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Testimonial/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Testimonial/Layout/icon.svg +5 -0
- package/components/Blokkli/Testimonial/Layout/index.vue +15 -0
- package/components/Blokkli/Text/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Text/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Text/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Text/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Text/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Text/icon.svg +7 -0
- package/components/Blokkli/Text/index.vue +21 -0
- package/components/Blokkli/TextMedia/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/TextMedia/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/TextMedia/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/TextMedia/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/TextMedia/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/TextMedia/icon.svg +5 -0
- package/components/Blokkli/TextMedia/index.vue +22 -0
- package/components/Blokkli/TwoColumnText/Element/icon.svg +8 -0
- package/components/Blokkli/TwoColumnText/Element/index.vue +15 -0
- package/components/Blokkli/TwoColumnText/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/TwoColumnText/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/TwoColumnText/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/TwoColumnText/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/TwoColumnText/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/TwoColumnText/Layout/icon.svg +10 -0
- package/components/Blokkli/TwoColumnText/Layout/index.vue +18 -0
- package/components/Blokkli/iFrame/Element/icon.svg +5 -0
- package/components/Blokkli/iFrame/Element/index.vue +14 -0
- package/components/Blokkli/iFrame/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/iFrame/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/iFrame/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/iFrame/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/iFrame/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/iFrame/Layout/icon.svg +7 -0
- package/components/Blokkli/iFrame/Layout/index.vue +18 -0
- package/components/DesignSystem/Atoms/Button.vue +144 -0
- package/components/DesignSystem/Atoms/Container.vue +54 -0
- package/components/DesignSystem/Atoms/GridRow.vue +13 -0
- package/components/DesignSystem/Molecules/ButtonGroup.vue +45 -0
- package/components/DesignSystem/Molecules/Card.vue +70 -0
- package/components/DesignSystem/Molecules/IconText.vue +62 -0
- package/components/DesignSystem/Molecules/MediaSlider.vue +72 -0
- package/components/DesignSystem/Molecules/Partnership.vue +40 -0
- package/components/DesignSystem/Molecules/Table.vue +170 -0
- package/components/DesignSystem/Molecules/TitleComposition.vue +66 -0
- package/components/DesignSystem/Molecules/iFrame.vue +22 -0
- package/components/DesignSystem/Organisms/ContentBlock.vue +82 -0
- package/components/DesignSystem/Organisms/FlipTeaser.vue +160 -0
- package/components/DesignSystem/Organisms/LogoElement.vue +37 -0
- package/components/DesignSystem/Organisms/TeamElement.vue +89 -0
- package/components/DesignSystem/Organisms/TeaserCard.vue +74 -0
- package/components/DesignSystem/Organisms/Testimonial.vue +53 -0
- package/components/DesignSystem/Organisms/TwoColumnTextElement.vue +42 -0
- package/components/Drupal/Breadcrumb/fragment.breadcrumb.graphql +6 -0
- package/components/Drupal/Breadcrumb/index.vue +88 -0
- package/components/Drupal/Messages/index.vue +29 -0
- package/components/Drupal/Webform/fragment.graphql +86 -0
- package/components/Drupal/Webform/index.vue +174 -0
- package/components/Drupal/Webform/mutation.graphql +8 -0
- package/components/Drupal/Webform/query.graphql +21 -0
- package/components/Form/CheckboxInput.vue +35 -0
- package/components/Form/CheckboxInputs.vue +44 -0
- package/components/Form/FileUploadInput.vue +34 -0
- package/components/Form/RadioButtonsInput.vue +44 -0
- package/components/Form/SelectInput.vue +54 -0
- package/components/Form/SubmitButton.vue +12 -0
- package/components/Form/TextAreaInput.vue +34 -0
- package/components/Form/TextEmailInput.vue +35 -0
- package/components/Form/TextInput.vue +35 -0
- package/components/Form/TextPhoneInput.vue +35 -0
- package/components/Form/WebformMarkup.vue +9 -0
- package/components/Form/composables/useFormElement.ts +84 -0
- package/components/Form/utils/types.ts +64 -0
- package/components/Media/Icon/fragment.mediaIcon.graphql +9 -0
- package/components/Media/Icon/index.vue +16 -0
- package/components/Media/Image/fragment.graphql +11 -0
- package/components/Media/Image/index.vue +215 -0
- package/components/Media/RemoteVideo/fragment.graphql +27 -0
- package/components/Media/RemoteVideo/index.vue +58 -0
- package/components/Media/Video/fragment.graphql +17 -0
- package/components/Media/Video/index.vue +44 -0
- package/components/Media/fragment.graphql +8 -0
- package/components/Media/index.vue +33 -0
- package/components/Node/Icms/Page/fragment.graphql +17 -0
- package/components/Node/Icms/Page/index.vue +14 -0
- package/components/Paragraph/Button/Element/fragment.graphql +14 -0
- package/components/Paragraph/Button/Element/index.vue +23 -0
- package/components/Paragraph/CallToAction/fragment.graphql +12 -0
- package/components/Paragraph/CallToAction/index.vue +60 -0
- package/components/Paragraph/Card/Element/fragment.graphql +10 -0
- package/components/Paragraph/Card/Element/index.vue +19 -0
- package/components/Paragraph/Card/Layout/fragment.graphql +14 -0
- package/components/Paragraph/Card/Layout/index.vue +58 -0
- package/components/Paragraph/Contact/fragment.graphql +20 -0
- package/components/Paragraph/Contact/index.vue +60 -0
- package/components/Paragraph/Downloads/fragment.graphql +15 -0
- package/components/Paragraph/Downloads/index.vue +104 -0
- package/components/Paragraph/FAQ/Element/fragment.graphql +10 -0
- package/components/Paragraph/FAQ/Element/index.vue +66 -0
- package/components/Paragraph/FAQ/Layout/fragment.graphql +23 -0
- package/components/Paragraph/FAQ/Layout/index.vue +84 -0
- package/components/Paragraph/FlipTeasers/fragment.graphql +25 -0
- package/components/Paragraph/FlipTeasers/index.vue +59 -0
- package/components/Paragraph/Gallery/fragment.graphql +11 -0
- package/components/Paragraph/Gallery/index.vue +223 -0
- package/components/Paragraph/HeroImage/fragment.graphql +17 -0
- package/components/Paragraph/HeroImage/index.vue +147 -0
- package/components/Paragraph/IconText/Element/fragment.graphql +8 -0
- package/components/Paragraph/IconText/Element/index.vue +18 -0
- package/components/Paragraph/IconText/Layout/fragment.graphql +23 -0
- package/components/Paragraph/IconText/Layout/index.vue +76 -0
- package/components/Paragraph/Introduction/fragment.graphql +20 -0
- package/components/Paragraph/Introduction/index.vue +94 -0
- package/components/Paragraph/Logo/Element/fragment.graphql +11 -0
- package/components/Paragraph/Logo/Element/index.vue +17 -0
- package/components/Paragraph/Media/fragment.graphql +5 -0
- package/components/Paragraph/Media/index.vue +83 -0
- package/components/Paragraph/Partnerships/Element/fragment.graphql +11 -0
- package/components/Paragraph/Partnerships/Element/index.vue +14 -0
- package/components/Paragraph/Partnerships/Layout/fragment.graphql +17 -0
- package/components/Paragraph/Partnerships/Layout/index.vue +119 -0
- package/components/Paragraph/SingleTestimonial/fragment.graphql +24 -0
- package/components/Paragraph/SingleTestimonial/index.vue +79 -0
- package/components/Paragraph/Table/fragment.graphql +11 -0
- package/components/Paragraph/Table/index.vue +43 -0
- package/components/Paragraph/Tabs/Element/fragment.graphql +17 -0
- package/components/Paragraph/Tabs/Element/index.vue +78 -0
- package/components/Paragraph/Tabs/Layout/fragment.graphql +11 -0
- package/components/Paragraph/Tabs/Layout/index.vue +191 -0
- package/components/Paragraph/Team/Element/fragment.graphql +17 -0
- package/components/Paragraph/Team/Element/index.vue +23 -0
- package/components/Paragraph/Team/Layout/fragment.graphql +14 -0
- package/components/Paragraph/Team/Layout/index.vue +51 -0
- package/components/Paragraph/Teasers/fragment.graphql +25 -0
- package/components/Paragraph/Teasers/index.vue +58 -0
- package/components/Paragraph/Testimonial/Element/fragment.graphql +13 -0
- package/components/Paragraph/Testimonial/Element/index.vue +29 -0
- package/components/Paragraph/Testimonial/Layout/fragment.graphql +13 -0
- package/components/Paragraph/Testimonial/Layout/index.vue +109 -0
- package/components/Paragraph/Text/fragment.graphql +14 -0
- package/components/Paragraph/Text/index.vue +66 -0
- package/components/Paragraph/TextMedia/fragment.graphql +17 -0
- package/components/Paragraph/TextMedia/index.vue +125 -0
- package/components/Paragraph/TwoColumnText/Element/fragment.graphql +8 -0
- package/components/Paragraph/TwoColumnText/Element/index.vue +31 -0
- package/components/Paragraph/TwoColumnText/Layout/fragment.graphql +8 -0
- package/components/Paragraph/TwoColumnText/Layout/index.vue +25 -0
- package/components/Paragraph/fragment.paragraphsFieldItem.graphql +6 -0
- package/components/Paragraph/iFrame/Element/fragment.graphql +9 -0
- package/components/Paragraph/iFrame/Element/index.vue +16 -0
- package/components/Paragraph/iFrame/Layout/fragment.graphql +13 -0
- package/components/Paragraph/iFrame/Layout/index.vue +161 -0
- package/components/Section/Footer/index.vue +144 -0
- package/components/Section/Header/GlobalMenu.vue +337 -0
- package/components/Section/Header/LanguageDropdown.vue +105 -0
- package/components/Section/Header/MenuIcon.vue +171 -0
- package/components/Section/Header/MetaMenu.vue +57 -0
- package/components/Section/Header/SearchLink.vue +26 -0
- package/components/Section/Header/index.vue +205 -0
- package/components/ui/accordion/Accordion.vue +19 -0
- package/components/ui/accordion/AccordionContent.vue +26 -0
- package/components/ui/accordion/AccordionItem.vue +27 -0
- package/components/ui/accordion/AccordionTrigger.vue +41 -0
- package/components/ui/accordion/index.ts +4 -0
- package/components/ui/button/Button.vue +26 -0
- package/components/ui/button/index.ts +36 -0
- package/components/ui/carousel/Carousel.vue +72 -0
- package/components/ui/carousel/CarouselContent.vue +30 -0
- package/components/ui/carousel/CarouselItem.vue +25 -0
- package/components/ui/carousel/CarouselNext.vue +33 -0
- package/components/ui/carousel/CarouselPrevious.vue +33 -0
- package/components/ui/carousel/index.ts +8 -0
- package/components/ui/carousel/interface.ts +24 -0
- package/components/ui/carousel/useCarousel.ts +66 -0
- package/components/ui/checkbox/Checkbox.vue +34 -0
- package/components/ui/checkbox/index.ts +1 -0
- package/components/ui/dialog/Dialog.vue +19 -0
- package/components/ui/dialog/DialogClose.vue +11 -0
- package/components/ui/dialog/DialogContent.vue +53 -0
- package/components/ui/dialog/DialogDescription.vue +30 -0
- package/components/ui/dialog/DialogFooter.vue +19 -0
- package/components/ui/dialog/DialogHeader.vue +16 -0
- package/components/ui/dialog/DialogScrollContent.vue +66 -0
- package/components/ui/dialog/DialogTitle.vue +28 -0
- package/components/ui/dialog/DialogTrigger.vue +11 -0
- package/components/ui/dialog/index.ts +9 -0
- package/components/ui/input/Input.vue +24 -0
- package/components/ui/input/index.ts +1 -0
- package/components/ui/label/Label.vue +29 -0
- package/components/ui/label/index.ts +1 -0
- package/components/ui/radio-group/RadioGroup.vue +27 -0
- package/components/ui/radio-group/RadioGroupItem.vue +41 -0
- package/components/ui/radio-group/index.ts +2 -0
- package/components/ui/select/Select.vue +15 -0
- package/components/ui/select/SelectContent.vue +54 -0
- package/components/ui/select/SelectGroup.vue +21 -0
- package/components/ui/select/SelectItem.vue +46 -0
- package/components/ui/select/SelectItemText.vue +12 -0
- package/components/ui/select/SelectLabel.vue +14 -0
- package/components/ui/select/SelectScrollDownButton.vue +26 -0
- package/components/ui/select/SelectScrollUpButton.vue +26 -0
- package/components/ui/select/SelectSeparator.vue +19 -0
- package/components/ui/select/SelectTrigger.vue +33 -0
- package/components/ui/select/SelectValue.vue +12 -0
- package/components/ui/select/index.ts +11 -0
- package/components/ui/tabs/Tabs.vue +15 -0
- package/components/ui/tabs/TabsContent.vue +29 -0
- package/components/ui/tabs/TabsList.vue +27 -0
- package/components/ui/tabs/TabsTrigger.vue +33 -0
- package/components/ui/tabs/index.ts +4 -0
- package/components/ui/textarea/Textarea.vue +24 -0
- package/components/ui/textarea/index.ts +1 -0
- package/components.json +18 -0
- package/composables/breadcrumb.ts +42 -0
- package/composables/languageLinks.ts +31 -0
- package/composables/query.initData.graphql +102 -0
- package/composables/useAccordionScroll.ts +30 -0
- package/composables/useChildTitleWeight.ts +13 -0
- package/composables/useCn.ts +7 -0
- package/composables/useCurrentLangcodeEnum.ts +18 -0
- package/composables/useDrupalMessages.ts +41 -0
- package/composables/useDrupalUser.ts +11 -0
- package/composables/useInitData.ts +118 -0
- package/composables/useIsMobile.ts +14 -0
- package/composables/useMainMenuLinks.ts +69 -0
- package/composables/useMetaMenuLinks.ts +44 -0
- package/composables/useNavigationOffset.ts +14 -0
- package/config/graphqlMiddleware/index.ts +41 -0
- package/config/multiCache/index.ts +28 -0
- package/config/postcss-drupal/postcss.config.cjs +14 -0
- package/config/runtimeConfig.ts +12 -0
- package/error.vue +39 -0
- package/eslint.config.mjs +111 -0
- package/formkit.config.ts +56 -0
- package/formkit.theme.ts +5000 -0
- package/layouts/default.vue +66 -0
- package/layouts/error.vue +98 -0
- package/layouts/library.vue +5 -0
- package/modules/dynamicNodeResolver.ts +95 -0
- package/modules/dynamicParagraphResolver.ts +69 -0
- package/nuxt.config.ts +551 -0
- package/package.json +64 -0
- package/pages/[...slug]/index.vue +27 -0
- package/pages/__tests__/index.ts +77 -0
- package/pages/blokkli/library-item/[uuid].vue +52 -0
- package/pages/blokkli/library-item/query.library.graphql +21 -0
- package/pages/index.vue +27 -0
- package/pages/node/[nid]/index.vue +25 -0
- package/pages/search/index.vue +69 -0
- package/pages/static-page/example.vue +40 -0
- package/plugins/clickaway.ts +12 -0
- package/plugins/drupalUser.ts +33 -0
- package/plugins/graphqlMiddleware.ts +115 -0
- package/queries/blokkli.graphql +5 -0
- package/queries/fragment.blokkliProps.graphql +8 -0
- package/queries/fragment.routeQuery.graphql +51 -0
- package/queries/query.drupalUser.graphql +10 -0
- package/server/api/content-search/index.ts +160 -0
- package/server/api/icon/[...params].ts +199 -0
- package/server/graphqlMiddleware.serverOptions.ts +87 -0
- package/server/helpers/index.ts +32 -0
- package/server/helpers/request.ts +44 -0
- package/server/middleware/spa.ts +45 -0
- package/server/multiCache.serverOptions.ts +32 -0
- package/server/tsconfig.json +3 -0
- package/server/utils/cacheability.ts +138 -0
- package/shims-vue.d.ts +5 -0
- package/tailwind.config.ts +228 -0
- package/vitest.config.mts +28 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { TextEmailInput } from './utils/types'
|
|
3
|
+
import { useFormElement } from './composables/useFormElement'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ formElement: TextEmailInput }>()
|
|
6
|
+
|
|
7
|
+
const { cleanDescription, getValidationData } = useFormElement(
|
|
8
|
+
props.formElement,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
const inputValue = ref<string | undefined>(undefined)
|
|
12
|
+
const isFocused = ref<boolean>(false)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<FormKit
|
|
17
|
+
type="email"
|
|
18
|
+
v-model="inputValue"
|
|
19
|
+
:name="formElement?.key"
|
|
20
|
+
:label="formElement?.title"
|
|
21
|
+
:help="cleanDescription"
|
|
22
|
+
:placeholder="isFocused && !inputValue ? formElement?.placeholder : ''"
|
|
23
|
+
:validation="getValidationData.rules"
|
|
24
|
+
:validationMessages="getValidationData.messages"
|
|
25
|
+
:inputClass="{
|
|
26
|
+
'pt-6 pb-2': inputValue || isFocused,
|
|
27
|
+
}"
|
|
28
|
+
:labelClass="{
|
|
29
|
+
'top-4 text-base': !inputValue && !isFocused,
|
|
30
|
+
'top-2 text-xs': inputValue || isFocused,
|
|
31
|
+
}"
|
|
32
|
+
@focus="isFocused = true"
|
|
33
|
+
@blur="isFocused = false"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { TextInput } from './utils/types'
|
|
3
|
+
import { useFormElement } from './composables/useFormElement'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ formElement: TextInput }>()
|
|
6
|
+
|
|
7
|
+
const { cleanDescription, getValidationData } = useFormElement(
|
|
8
|
+
props.formElement,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
const inputValue = ref<string | undefined>(undefined)
|
|
12
|
+
const isFocused = ref<boolean>(false)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<FormKit
|
|
17
|
+
type="text"
|
|
18
|
+
v-model="inputValue"
|
|
19
|
+
:name="formElement?.key"
|
|
20
|
+
:label="formElement?.title"
|
|
21
|
+
:help="cleanDescription"
|
|
22
|
+
:placeholder="isFocused && !inputValue ? formElement?.placeholder : ''"
|
|
23
|
+
:validation="getValidationData.rules"
|
|
24
|
+
:validationMessages="getValidationData.messages"
|
|
25
|
+
:inputClass="{
|
|
26
|
+
'pt-6 pb-2': inputValue || isFocused,
|
|
27
|
+
}"
|
|
28
|
+
:labelClass="{
|
|
29
|
+
'top-4 text-base': !inputValue && !isFocused,
|
|
30
|
+
'top-2 text-xs': inputValue || isFocused,
|
|
31
|
+
}"
|
|
32
|
+
@focus="isFocused = true"
|
|
33
|
+
@blur="isFocused = false"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { TextPhoneInput } from './utils/types'
|
|
3
|
+
import { useFormElement } from './composables/useFormElement'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ formElement: TextPhoneInput }>()
|
|
6
|
+
|
|
7
|
+
const { cleanDescription, getValidationData } = useFormElement(
|
|
8
|
+
props.formElement,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
const inputValue = ref<string | undefined>(undefined)
|
|
12
|
+
const isFocused = ref<boolean>(false)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<FormKit
|
|
17
|
+
type="tel"
|
|
18
|
+
v-model="inputValue"
|
|
19
|
+
:name="formElement?.key"
|
|
20
|
+
:label="formElement?.title"
|
|
21
|
+
:help="cleanDescription"
|
|
22
|
+
:placeholder="isFocused && !inputValue ? formElement?.placeholder : ''"
|
|
23
|
+
:validation="getValidationData.rules"
|
|
24
|
+
:validationMessages="getValidationData.messages"
|
|
25
|
+
:inputClass="{
|
|
26
|
+
'pt-6 pb-2': inputValue || isFocused,
|
|
27
|
+
}"
|
|
28
|
+
:labelClass="{
|
|
29
|
+
'top-4 text-base': !inputValue && !isFocused,
|
|
30
|
+
'top-2 text-xs': inputValue || isFocused,
|
|
31
|
+
}"
|
|
32
|
+
@focus="isFocused = true"
|
|
33
|
+
@blur="isFocused = false"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { FormElement, TextInput, SelectInput, InputOption, CheckboxInputs, CheckboxInput, FileUploadInput } from '../utils/types'
|
|
2
|
+
|
|
3
|
+
export function useFormElement(formElement: FormElement) {
|
|
4
|
+
const { $texts } = useNuxtApp()
|
|
5
|
+
const cleanDescription = computed(() => {
|
|
6
|
+
if (!formElement.description) return ''
|
|
7
|
+
|
|
8
|
+
return formElement.description.replace(/<[^>]*>/g, '')
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const getValidationData = computed(() => {
|
|
12
|
+
const rules: string[] = []
|
|
13
|
+
const messages: Record<string, string> = {}
|
|
14
|
+
|
|
15
|
+
if (formElement?.required) {
|
|
16
|
+
rules.push('required')
|
|
17
|
+
messages['required'] = formElement.required.message || $texts(
|
|
18
|
+
'webform.required_field_error',
|
|
19
|
+
'This field is required.',
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const checkboxInput = formElement as CheckboxInput;
|
|
24
|
+
if (checkboxInput?.type === 'checkbox' && checkboxInput?.required) {
|
|
25
|
+
rules.push('accepted')
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const textInput = formElement as TextInput;
|
|
29
|
+
if (textInput.minlength && textInput.maxlength) {
|
|
30
|
+
rules.push(`length:${textInput.minlength},${textInput.maxlength}`)
|
|
31
|
+
} else if (textInput.maxlength) {
|
|
32
|
+
rules.push(`length:0,${textInput.maxlength}`)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (textInput.pattern?.rule) {
|
|
36
|
+
rules.push(`matches:${textInput.pattern.rule}`)
|
|
37
|
+
messages['matches'] = textInput.pattern.message
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Return only if there are validation rules
|
|
41
|
+
return {
|
|
42
|
+
rules: rules.length ? rules.join('|') : undefined,
|
|
43
|
+
messages: Object.keys(messages).length ? messages : undefined
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
const getFormattedOptions = computed(() => {
|
|
48
|
+
if (!(formElement as SelectInput | CheckboxInputs).options) return []
|
|
49
|
+
|
|
50
|
+
return (formElement as SelectInput | CheckboxInputs).options.map((option: InputOption) => ({
|
|
51
|
+
label: option.title,
|
|
52
|
+
value: option.value,
|
|
53
|
+
}))
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const getFormattedFileExtensions = computed(() => {
|
|
57
|
+
if (!(formElement as FileUploadInput).fileExtensions) return ''
|
|
58
|
+
|
|
59
|
+
return (formElement as FileUploadInput).fileExtensions
|
|
60
|
+
.split(' ')
|
|
61
|
+
.map((ext: string) => { return '.' + ext })
|
|
62
|
+
.join(', ')
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
function validateFileExtensions(value: File | File[], element: FileUploadInput): boolean {
|
|
66
|
+
if (!element.fileExtensions) return true
|
|
67
|
+
|
|
68
|
+
const allowedExtensions = element.fileExtensions.split(' ')
|
|
69
|
+
const files = Array.isArray(value) ? value : [value]
|
|
70
|
+
|
|
71
|
+
return files.every((file) => {
|
|
72
|
+
const fileExtension = file.name.split('.').pop()
|
|
73
|
+
return allowedExtensions.includes(fileExtension || '')
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
cleanDescription,
|
|
79
|
+
getValidationData,
|
|
80
|
+
getFormattedOptions,
|
|
81
|
+
getFormattedFileExtensions,
|
|
82
|
+
validateFileExtensions
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export type FormKitTypes = 'text' | 'number' | 'meta' | 'url' | 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'form' | 'group' | 'hidden' | 'list' | 'month' | 'password'
|
|
2
|
+
|
|
3
|
+
export interface FormElement {
|
|
4
|
+
key: string
|
|
5
|
+
type: string
|
|
6
|
+
title: string
|
|
7
|
+
description?: string
|
|
8
|
+
multiple?: number
|
|
9
|
+
required?: {
|
|
10
|
+
message?: string
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type InputOption = {
|
|
15
|
+
title: string
|
|
16
|
+
value: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface TextInput extends FormElement {
|
|
20
|
+
size: number
|
|
21
|
+
minlength?: number
|
|
22
|
+
maxlength: number
|
|
23
|
+
placeholder?: string
|
|
24
|
+
pattern: {
|
|
25
|
+
message: string
|
|
26
|
+
rule: string
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface TextAreaInput extends TextInput {
|
|
31
|
+
rows: number
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface TextEmailInput extends TextInput { }
|
|
35
|
+
|
|
36
|
+
export interface TextPhoneInput extends TextInput { }
|
|
37
|
+
|
|
38
|
+
export interface SelectInput extends FormElement {
|
|
39
|
+
emptyOption: InputOption
|
|
40
|
+
options: InputOption[]
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface CheckboxInput extends FormElement { }
|
|
44
|
+
|
|
45
|
+
export interface CheckboxInputs extends FormElement {
|
|
46
|
+
options: InputOption[]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface RadioButtonsInput extends FormElement {
|
|
50
|
+
options: InputOption[]
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface FileUploadInput extends FormElement {
|
|
54
|
+
fileExtensions: string
|
|
55
|
+
maxFileSize: number
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface WebformMarkup extends FormElement {
|
|
59
|
+
markup: string
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface SubmitButton extends FormElement {
|
|
63
|
+
submitLabel?: string
|
|
64
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<img
|
|
3
|
+
:src="media?.url?.path"
|
|
4
|
+
:alt="media?.alt?.alt"
|
|
5
|
+
:title="media?.title"
|
|
6
|
+
:class="mediaClass"
|
|
7
|
+
/>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import type { MediaIconFragment } from '#graphql-operations'
|
|
12
|
+
const props = defineProps<{
|
|
13
|
+
media: MediaIconFragment
|
|
14
|
+
mediaClass?: string
|
|
15
|
+
}>()
|
|
16
|
+
</script>
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<picture :class="mediaClass">
|
|
3
|
+
<img v-if="imageSources.length === 1"
|
|
4
|
+
:class="elementClass"
|
|
5
|
+
:srcset="imageSources[0].srcset"
|
|
6
|
+
:sizes="imageSources[0].sizes"
|
|
7
|
+
:alt="media?.alt?.alt"
|
|
8
|
+
:title="media?.title"
|
|
9
|
+
:src="placeHolderImage"
|
|
10
|
+
:loading="imageLoading"
|
|
11
|
+
/>
|
|
12
|
+
<source v-if="imageSources.length > 1" v-for="(source, key) in imageSources" :key="key"
|
|
13
|
+
:srcset="source.srcset"
|
|
14
|
+
:media="source.media"
|
|
15
|
+
/>
|
|
16
|
+
<img v-if="imageSources.length > 1"
|
|
17
|
+
:src="placeHolderImage"
|
|
18
|
+
:alt="media?.alt?.alt"
|
|
19
|
+
:title="media?.title"
|
|
20
|
+
:class="elementClass"
|
|
21
|
+
:loading="imageLoading"
|
|
22
|
+
/>
|
|
23
|
+
|
|
24
|
+
<figcaption v-if="showCaption && media?.caption"
|
|
25
|
+
v-text="media?.caption"
|
|
26
|
+
:class="figcaptionClass" />
|
|
27
|
+
</picture>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script lang="ts" setup>
|
|
31
|
+
import cn from '@iqual/nuxt-icms/composables/useCn'
|
|
32
|
+
import { checkDensities, parseDensities, parseSize, parseSizes } from '/node_modules/@nuxt/image/dist/runtime/utils'
|
|
33
|
+
import type { ImageOptions, ImageSizesOptions, CreateImageOptions, ResolvedImage, ImageCTX, $Img, ImageSizes, ImageSizesVariant } from '/node_modules/@nuxt/image/dist/runtime/types'
|
|
34
|
+
import type { MediaImageFragment } from '#graphql-operations'
|
|
35
|
+
|
|
36
|
+
const props = withDefaults(
|
|
37
|
+
defineProps<{
|
|
38
|
+
media: MediaImageFragment
|
|
39
|
+
mediaClass?: string
|
|
40
|
+
imageAspectRatios?: string
|
|
41
|
+
imageSizes?: string
|
|
42
|
+
imageLoading?: "lazy" | "eager" | undefined
|
|
43
|
+
showCaption?: boolean
|
|
44
|
+
figcaptionClass?: string
|
|
45
|
+
elementClass?: string
|
|
46
|
+
}>(),
|
|
47
|
+
{
|
|
48
|
+
imageLoading: 'lazy',
|
|
49
|
+
figcaptionClass: 'pt-1 text-center',
|
|
50
|
+
elementClass: 'size-full object-cover object-center',
|
|
51
|
+
},
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
// Get the data.
|
|
55
|
+
const img = useImage()
|
|
56
|
+
const baseUrl = useRuntimeConfig().public.imageBaseUrl
|
|
57
|
+
const sourceImage = baseUrl + props?.media?.sourceUrl?.path
|
|
58
|
+
|
|
59
|
+
const placeHolderImage = computed(() => {
|
|
60
|
+
return img(sourceImage, {format: 'webp', width: 100, blur: 100})
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
const imageSources = computed(() => {
|
|
64
|
+
const sources = []
|
|
65
|
+
const imgSizes = props.imageSizes ?? Object.keys(img.options.screens).map(key => `${key}:100vw`).join(' ');
|
|
66
|
+
|
|
67
|
+
// No aspect ratios provided.
|
|
68
|
+
if (!props?.imageAspectRatios) {
|
|
69
|
+
sources.push(img.getSizes(sourceImage, {
|
|
70
|
+
sizes: imgSizes,
|
|
71
|
+
modifiers: {
|
|
72
|
+
format: 'webp'
|
|
73
|
+
}
|
|
74
|
+
}));
|
|
75
|
+
return sources
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Aspect ratios provided.
|
|
79
|
+
const parsedAspectRatios = parseSizes(props?.imageAspectRatios)
|
|
80
|
+
const parsedImageSizes = parseSizes(imgSizes)
|
|
81
|
+
const densities = img.options.densities
|
|
82
|
+
const keys = Object.keys(parsedImageSizes);
|
|
83
|
+
const lastKey = keys[keys.length - 1];
|
|
84
|
+
|
|
85
|
+
for (const keyAspectRatios in parsedAspectRatios) {
|
|
86
|
+
const [l, h] = parsedAspectRatios[keyAspectRatios].split('/').map(Number);
|
|
87
|
+
const hwRatio = (l && h) ? h / l : 0
|
|
88
|
+
const sizeVariants = []
|
|
89
|
+
const srcsetVariants = []
|
|
90
|
+
|
|
91
|
+
let screenSizes = Object.keys(parsedImageSizes)
|
|
92
|
+
if (Object.keys(parsedImageSizes).includes(keyAspectRatios)) {
|
|
93
|
+
const minSizeIndex = Object.keys(parsedImageSizes).indexOf(keyAspectRatios)
|
|
94
|
+
screenSizes = Object.keys(parsedImageSizes).slice(minSizeIndex)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
for (const index in screenSizes) {
|
|
98
|
+
const screenSize = screenSizes[index]
|
|
99
|
+
|
|
100
|
+
const variant = getSizesVariant(screenSize, String(parsedImageSizes[screenSize]), hwRatio)
|
|
101
|
+
if (variant === undefined) {
|
|
102
|
+
continue
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Add size variant with 'media'.
|
|
106
|
+
sizeVariants.push({
|
|
107
|
+
size: variant.size,
|
|
108
|
+
screenMaxWidth: variant.screenMaxWidth,
|
|
109
|
+
media: `(max-width: ${variant.screenMaxWidth}px)`,
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
// Add srcset variants and ignore densities (for current 'size' processed).
|
|
113
|
+
srcsetVariants.push({
|
|
114
|
+
width: variant._cWidth,
|
|
115
|
+
src: img(sourceImage, {
|
|
116
|
+
width: variant._cWidth ? variant._cWidth : undefined,
|
|
117
|
+
height: variant._cHeight ? variant._cHeight : undefined,
|
|
118
|
+
fit: 'cover',
|
|
119
|
+
format: 'webp'
|
|
120
|
+
}),
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
// Make sure to not create duplicate size variants for the same screen size.
|
|
124
|
+
if (keyAspectRatios != screenSize && Object.keys(parsedAspectRatios).includes(screenSize)) {
|
|
125
|
+
break
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const media = sizeVariants.slice(-1)[0]?.media
|
|
130
|
+
finaliseSizeVariants(sizeVariants)
|
|
131
|
+
finaliseSrcsetVariants(srcsetVariants)
|
|
132
|
+
|
|
133
|
+
const sizesVal = sizeVariants.length ? sizeVariants.map(v => `${v.media ? v.media + ' ' : ''}${v.size}`).join(', ') : undefined
|
|
134
|
+
const suffix = sizesVal ? 'w' : 'x'
|
|
135
|
+
const srcsetVal = srcsetVariants.map(v => `${v.src} ${v.width}${suffix}`).join(', ')
|
|
136
|
+
|
|
137
|
+
let source = {
|
|
138
|
+
sizes: sizesVal,
|
|
139
|
+
srcset: srcsetVal,
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (keyAspectRatios != Object.keys(parsedAspectRatios).slice(-1)[0]) {
|
|
143
|
+
source.media = media
|
|
144
|
+
}
|
|
145
|
+
sources.push(source)
|
|
146
|
+
}
|
|
147
|
+
return sources
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
// Helper function, copied from NuxtImage.
|
|
151
|
+
function getSizesVariant(key: string, size: string, hwRatio: number): ImageSizesVariant | undefined {
|
|
152
|
+
const screenMaxWidth = (img.options.screens && img.options.screens[key]) || Number.parseInt(key)
|
|
153
|
+
const isFluid = size.endsWith('vw')
|
|
154
|
+
if (!isFluid && /^\d+$/.test(size)) {
|
|
155
|
+
size = size + 'px'
|
|
156
|
+
}
|
|
157
|
+
if (!isFluid && !size.endsWith('px')) {
|
|
158
|
+
return undefined
|
|
159
|
+
}
|
|
160
|
+
let _cWidth = Number.parseInt(size)
|
|
161
|
+
if (!screenMaxWidth || !_cWidth) {
|
|
162
|
+
return undefined
|
|
163
|
+
}
|
|
164
|
+
if (isFluid) {
|
|
165
|
+
_cWidth = Math.round((_cWidth / 100) * screenMaxWidth)
|
|
166
|
+
}
|
|
167
|
+
const _cHeight = Math.round(_cWidth * hwRatio)
|
|
168
|
+
return {
|
|
169
|
+
size,
|
|
170
|
+
screenMaxWidth,
|
|
171
|
+
_cWidth,
|
|
172
|
+
_cHeight,
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Helper function, copied from NuxtImage.
|
|
177
|
+
function finaliseSizeVariants(sizeVariants: any[]) {
|
|
178
|
+
sizeVariants.sort((v1, v2) => v1.screenMaxWidth - v2.screenMaxWidth)
|
|
179
|
+
|
|
180
|
+
// de-duplicate size variants (by key `media`)
|
|
181
|
+
let previousMedia = null
|
|
182
|
+
for (let i = sizeVariants.length - 1; i >= 0; i--) {
|
|
183
|
+
const sizeVariant = sizeVariants[i]
|
|
184
|
+
if (sizeVariant.media === previousMedia) {
|
|
185
|
+
sizeVariants.splice(i, 1)
|
|
186
|
+
}
|
|
187
|
+
previousMedia = sizeVariant.media
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
for (let i = 0; i < sizeVariants.length; i++) {
|
|
191
|
+
sizeVariants[i].media = sizeVariants[i + 1]?.media || ''
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Helper function, copied from NuxtImage.
|
|
196
|
+
function finaliseSrcsetVariants(srcsetVariants: any[]) {
|
|
197
|
+
// sort by width
|
|
198
|
+
srcsetVariants.sort((v1, v2) => v1.width - v2.width)
|
|
199
|
+
|
|
200
|
+
// de-duplicate srcset variants (by key `width`)
|
|
201
|
+
let previousWidth = null
|
|
202
|
+
for (let i = srcsetVariants.length - 1; i >= 0; i--) {
|
|
203
|
+
const sizeVariant = srcsetVariants[i]
|
|
204
|
+
if (sizeVariant.width === previousWidth) {
|
|
205
|
+
srcsetVariants.splice(i, 1)
|
|
206
|
+
}
|
|
207
|
+
previousWidth = sizeVariant.width
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
</script>
|
|
212
|
+
|
|
213
|
+
<style scoped>
|
|
214
|
+
|
|
215
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
fragment mediaRemoteVideo on MediaRemoteVideo {
|
|
2
|
+
link: fieldMediaOembedVideo
|
|
3
|
+
title: name
|
|
4
|
+
thumbnailOverride: fieldThumbnailCustom {
|
|
5
|
+
entity {
|
|
6
|
+
__typename
|
|
7
|
+
uri: uriRawField {
|
|
8
|
+
first {
|
|
9
|
+
url
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
alt
|
|
14
|
+
}
|
|
15
|
+
thumbnail: thumbnail {
|
|
16
|
+
entity {
|
|
17
|
+
__typename
|
|
18
|
+
uri: uriRawField {
|
|
19
|
+
first {
|
|
20
|
+
url
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
alt
|
|
25
|
+
}
|
|
26
|
+
caption: fieldCaption
|
|
27
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VuepalRemoteVideo v-slot="{ embedUrl }" :url="media?.link">
|
|
3
|
+
<figure class="w-full max-w-[1920px]" :class="mediaClass">
|
|
4
|
+
<iframe
|
|
5
|
+
v-if="embedUrl && isPlaying"
|
|
6
|
+
:src="embedUrl"
|
|
7
|
+
:title="media?.title"
|
|
8
|
+
allow="autoplay; encrypted-media; picture-in-picture"
|
|
9
|
+
allowfullscreen
|
|
10
|
+
class="aspect-video w-full md:px-40 lg:px-0"
|
|
11
|
+
:class="elementClass"
|
|
12
|
+
/>
|
|
13
|
+
|
|
14
|
+
<button
|
|
15
|
+
v-if="!isPlaying"
|
|
16
|
+
class="relative flex aspect-video w-full cursor-pointer items-center justify-center md:px-40 lg:px-0"
|
|
17
|
+
@click.prevent="isPlaying = true"
|
|
18
|
+
>
|
|
19
|
+
<img
|
|
20
|
+
:src="thumbnailUrl"
|
|
21
|
+
class="absolute left-0 top-0 size-full object-cover aspect-video"
|
|
22
|
+
:class="elementClass"
|
|
23
|
+
:alt="thumbnailAlt"
|
|
24
|
+
/>
|
|
25
|
+
|
|
26
|
+
<SpriteSymbol name="play" class="z-10 size-[75px]" />
|
|
27
|
+
</button>
|
|
28
|
+
|
|
29
|
+
<figcaption v-if="showCaption && media?.caption"
|
|
30
|
+
v-text="media?.caption"
|
|
31
|
+
:class="figcaptionClass" />
|
|
32
|
+
</figure>
|
|
33
|
+
</VuepalRemoteVideo>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script lang="ts" setup>
|
|
37
|
+
import type { MediaRemoteVideoFragment } from '#graphql-operations'
|
|
38
|
+
|
|
39
|
+
const props = defineProps<{
|
|
40
|
+
media: MediaRemoteVideoFragment
|
|
41
|
+
mediaClass?: string
|
|
42
|
+
elementClass?: string
|
|
43
|
+
showCaption?: boolean
|
|
44
|
+
figcaptionClass?: string
|
|
45
|
+
}>()
|
|
46
|
+
|
|
47
|
+
const isPlaying = ref(false)
|
|
48
|
+
|
|
49
|
+
const thumbnailUrl = computed(() => {
|
|
50
|
+
const file = props.media?.thumbnailOverride || props.media?.thumbnail
|
|
51
|
+
return file?.entity?.uri?.first?.url
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const thumbnailAlt = computed(() => {
|
|
55
|
+
const file = props.media?.thumbnailOverride || props.media?.thumbnail
|
|
56
|
+
return file?.alt
|
|
57
|
+
})
|
|
58
|
+
</script>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<figure :class="mediaClass">
|
|
3
|
+
<video
|
|
4
|
+
:controls="videoControls"
|
|
5
|
+
:muted="videoMuted"
|
|
6
|
+
:autoplay="videoAutoplay"
|
|
7
|
+
:loop="videoLoop"
|
|
8
|
+
:poster="media?.thumbnail?.entity?.uri?.first?.url"
|
|
9
|
+
class="w-full"
|
|
10
|
+
:class="elementClass"
|
|
11
|
+
>
|
|
12
|
+
<source v-if="media?.url?.path" :src="media.url.path" type="video/mp4" />
|
|
13
|
+
Your browser does not support the video tag.
|
|
14
|
+
</video>
|
|
15
|
+
<figcaption v-if="showCaption && media?.caption"
|
|
16
|
+
v-text="media?.caption"
|
|
17
|
+
:class="figcaptionClass" />
|
|
18
|
+
</figure>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts" setup>
|
|
22
|
+
|
|
23
|
+
import type { MediaVideoFragment } from '#graphql-operations'
|
|
24
|
+
|
|
25
|
+
withDefaults(
|
|
26
|
+
defineProps<{
|
|
27
|
+
media: MediaVideoFragment
|
|
28
|
+
showCaption?: boolean
|
|
29
|
+
mediaClass?: string
|
|
30
|
+
figcaptionClass?: string
|
|
31
|
+
videoControls?: boolean
|
|
32
|
+
videoMuted?: boolean
|
|
33
|
+
videoAutoplay?: boolean
|
|
34
|
+
videoLoop?: boolean
|
|
35
|
+
elementClass?: string
|
|
36
|
+
}>(),
|
|
37
|
+
{
|
|
38
|
+
videoControls: true,
|
|
39
|
+
videoMuted: true,
|
|
40
|
+
videoAutoplay: true,
|
|
41
|
+
videoLoop: false,
|
|
42
|
+
},
|
|
43
|
+
)
|
|
44
|
+
</script>
|