-
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.
- Loading branch information
1 parent
0cf1f9e
commit 306c259
Showing
4 changed files
with
55 additions
and
3 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,48 @@ | ||
<script setup lang="ts"> | ||
import { BlockProps } from './types'; | ||
const { $directus, $readItem } = useNuxtApp(); | ||
const props = defineProps<BlockProps>(); | ||
const { data: block } = useAsyncData(props.uuid, () => | ||
$directus.request( | ||
$readItem('block_logocloud', props.uuid, { | ||
fields: ['type', { logos: ['id', { directus_files_id: ['id', 'description'] }] }], | ||
}) | ||
) | ||
); | ||
</script> | ||
|
||
<template> | ||
<div v-if="block" class="block-logocloud-container"> | ||
<div class="block-logocloud"> | ||
<BaseDirectusImage | ||
v-for="logo in block.logos" | ||
:key="logo.id" | ||
:uuid="logo.directus_files_id.id" | ||
:alt="logo.directus_files_id.description ?? ''" | ||
/> | ||
</div> | ||
</div> | ||
</template> | ||
<style scoped lang="scss"> | ||
.block-logocloud-container { | ||
container-type: inline-size; | ||
grid-column: narrow !important; | ||
} | ||
.block-logocloud { | ||
grid-template-columns: repeat(auto-fit, minmax(var(--space-28), 1fr)); | ||
justify-items: center; | ||
align-items: center; | ||
gap: var(--space-12); | ||
display: grid; | ||
} | ||
// For pink color override | ||
// .block-logocloud { | ||
// filter: invert(0.5) sepia(0.8) saturate(0.8) hue-rotate(269deg); | ||
// } | ||
</style> |
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