-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #278156 Improve icmaa-blog headlines (#950) * #287061 Add new Components for Festival Landingpage (#951) * #288858 Add newsletter-subscription CMS block (#953)
- Loading branch information
Showing
13 changed files
with
241 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
src/modules/icmaa-cms/components/Storyblok/ImageTabs.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
<template> | ||
<div> | ||
<div | ||
class="t-flex t-w-full t-flex-col t-overflow-scroll t-hide-scrollbar t-scrolling-touch md:t-items-center" | ||
:class="[ tabBackgroundStyle ]" | ||
> | ||
<div | ||
class="t-flex t-items-center t-p-4 t-px-2" | ||
> | ||
<div | ||
v-for="(image, i) in images" | ||
:key="'tab-' + i" | ||
class="t-cursor-pointer t-px-2 t-text-sm t-font-light t-uppercase lg:t-px-4" | ||
:class="[ tabTextStyle, { 't-font-normal t-underline t-underline-offset-8': current === i } ]" | ||
@click="current = i" | ||
> | ||
{{ image.title }} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="images t-overflow-hidden"> | ||
<div | ||
class="scroller t-flex" | ||
:style="{'--index': current }" | ||
> | ||
<div | ||
v-for="(img, i) in images" | ||
:key="'image-' + i" | ||
class="t-flex-full" | ||
> | ||
<router-link | ||
:to="localizedRoute(img.link)" | ||
> | ||
<PictureComponent | ||
:key="img.src" | ||
:src="img.src" | ||
:width="size.width" | ||
:height="size.height" | ||
:sizes="getSizes(img.srcMobile)" | ||
:placeholder="true" | ||
:preload-in-header="true" | ||
:preload-in-header-prefix="'image-tab-' + i + '-'" | ||
:ratio="`${size.width}:${size.height}`" | ||
:alt="img.title | htmlDecode" | ||
/> | ||
</router-link> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mapGetters } from 'vuex' | ||
import PictureComponent from 'theme/components/core/blocks/Picture' | ||
export default { | ||
name: 'ImageTabsComponent', | ||
components: { | ||
PictureComponent | ||
}, | ||
props: { | ||
images: { | ||
type: Array, | ||
required: true | ||
}, | ||
tabTextStyle: { | ||
type: String, | ||
default: 't-text-white' | ||
}, | ||
tabBackgroundStyle: { | ||
type: String, | ||
default: 't-bg-primary' | ||
} | ||
}, | ||
data () { | ||
return { | ||
current: 0 | ||
} | ||
}, | ||
computed: { | ||
...mapGetters({ viewport: 'ui/getViewport' }), | ||
size () { | ||
if (['xs', 'sm', 'md'].includes(this.viewport)) { | ||
return { width: 768, height: 768 } | ||
} | ||
return { width: 1248, height: 755 } | ||
}, | ||
sizes () { | ||
return [ | ||
{ media: 'xl', width: 1248 }, | ||
{ media: 'lg', width: 1024 }, | ||
{ media: 'md', width: 768 }, | ||
{ width: 425 } | ||
] | ||
} | ||
}, | ||
methods: { | ||
getSizes (mobileImage) { | ||
return this.sizes.map(s => { | ||
if ((!s?.media || s?.media === 'md') && mobileImage) { | ||
s.src = mobileImage | ||
} | ||
return s | ||
}) | ||
} | ||
} | ||
} | ||
</script> | ||
<style lang="scss"> | ||
.scroller { | ||
transform: translateX(calc(var(--index) * -100%)); | ||
transition: transform 300ms ease-in-out; | ||
} | ||
</style> |
29 changes: 29 additions & 0 deletions
29
src/modules/icmaa-cms/components/Storyblok/NewsletterSubscription.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<template> | ||
<div class="t-mx-auto t-max-w-screen-md t-bg-white t-p-8"> | ||
<Newsletter | ||
:headline="headline" | ||
:description="description" | ||
/> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import Newsletter from 'theme/components/core/blocks/Footer/Newsletter' | ||
export default { | ||
name: 'NewsletterSubscription', | ||
components: { | ||
Newsletter | ||
}, | ||
props: { | ||
headline: { | ||
type: String, | ||
default: '' | ||
}, | ||
description: { | ||
type: String, | ||
default: '' | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.