This repository has been archived by the owner on Feb 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
345 changed files
with
24,579 additions
and
26,307 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export default function (_to, _from, savedPosition) { | ||
export default function scrollBehavior(_to, _from, savedPosition) { | ||
return savedPosition || { | ||
x: 0, | ||
y: 0, | ||
}; | ||
}; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
<template> | ||
<section class="sf-call-to-action"> | ||
<SfImage | ||
:image-tag="imageTag" | ||
:src="imageSrc" | ||
:alt="title" | ||
:width="imageWidth" | ||
:height="imageHeight" | ||
:nuxt-img-config="nuxtImgConfig" | ||
class="sf-call-to-action__image" | ||
/> | ||
<div class="sf-call-to-action__text-container"> | ||
<slot | ||
name="title" | ||
v-bind="{ title }" | ||
> | ||
<h2 | ||
v-if="title" | ||
class="sf-call-to-action__title" | ||
> | ||
{{ title }} | ||
</h2> | ||
</slot> | ||
<slot | ||
name="description" | ||
v-bind="{ description }" | ||
> | ||
<p | ||
v-if="description" | ||
class="sf-call-to-action__description" | ||
> | ||
{{ description }} | ||
</p> | ||
</slot> | ||
</div> | ||
<slot | ||
name="button" | ||
v-bind="{ buttonText, link }" | ||
> | ||
<SfButton | ||
v-if="buttonText" | ||
:link="link" | ||
class="sf-call-to-action__button" | ||
@click="$emit('click')" | ||
> | ||
{{ buttonText }} | ||
</SfButton> | ||
</slot> | ||
</section> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, PropType } from '@nuxtjs/composition-api'; | ||
import { SfButton, SfCallToAction, SfImage } from '@storefront-ui/vue'; | ||
import { ImageModifiers } from '@nuxt/image'; | ||
const ExtendedCallToAction = { | ||
...SfCallToAction, | ||
computed: undefined, | ||
}; | ||
export default defineComponent({ | ||
name: 'CallToAction', | ||
components: { | ||
SfButton, | ||
SfImage, | ||
}, | ||
extends: ExtendedCallToAction, | ||
props: { | ||
imageHeight: { | ||
type: [Number, String], | ||
default: '', | ||
}, | ||
imageSrc: { | ||
type: String, | ||
default: '', | ||
}, | ||
imageTag: { | ||
type: String, | ||
default: '', | ||
}, | ||
imageWidth: { | ||
type: [Number, String], | ||
default: '', | ||
}, | ||
nuxtImgConfig: { | ||
type: Object as PropType<ImageModifiers | {}>, | ||
default: () => ({}), | ||
}, | ||
}, | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.sf-call-to-action { | ||
position: relative; | ||
&__image { | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
::v-deep img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
} | ||
} | ||
&__text-container { | ||
position: relative; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.