-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Page Builder > Testimonial Slider (#39)
* slider types * testimonial comp * add comp to page builder * add button and company_name to compquote * fix type for slider item * fix fields for vue component --------- Co-authored-by: rijkvanzanten <[email protected]>
- Loading branch information
1 parent
5a0bc7e
commit a56ac14
Showing
7 changed files
with
66 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script setup lang="ts"> | ||
import { BlockProps } from './types'; | ||
const { $directus, $readItem } = useNuxtApp(); | ||
const props = defineProps<BlockProps>(); | ||
const { data: comp } = useAsyncData(() => | ||
$directus.request( | ||
$readItem('block_testimonial_slider', props.uuid, { | ||
fields: [ | ||
'id', | ||
{ | ||
items: [ | ||
'id', | ||
{ | ||
comp_quote_id: [ | ||
'id', | ||
'quote', | ||
'person_name', | ||
'person_image', | ||
'company_name', | ||
'company_logo', | ||
{ | ||
button: ['id', 'sort', 'label', 'variant', 'page', 'type', 'resource', 'external_url'], | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
], | ||
}) | ||
) | ||
); | ||
</script> | ||
|
||
<template> | ||
<div class="testimonial-slider"></div> | ||
</template> |
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,13 @@ | ||
import type { ComponentQuote } from '../components'; | ||
|
||
export interface BlockTestimonialSlider { | ||
id: string; | ||
items: BlockTestimonialSliderItem[]; | ||
} | ||
|
||
export interface BlockTestimonialSliderItem { | ||
id: string; | ||
sort: number; | ||
block_testimonial_slider_id: BlockTestimonialSlider; | ||
comp_quote_id: ComponentQuote; | ||
} |
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