Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Baroshem committed Sep 6, 2023
2 parents deeb7c1 + 9af8ae3 commit e06c590
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 31 deletions.
Binary file modified docs/public/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 15 additions & 30 deletions playground/app.vue
Original file line number Diff line number Diff line change
@@ -1,37 +1,20 @@
<script lang="ts" setup>
// Usage of `useCldImageUrl` composable
const { url } = useCldImageUrl({ options: { src: '/cld-sample-5.jpg' } })
console.log(url)
const { url } = useCldImageUrl({ options: { src: "/cld-sample-5.jpg" } });
console.log(url);
</script>

<template>
<!-- Usage of `CldOgImage.vue` component -->
<CldOgImage
src="cld-sample-2"
twitter-title="test"
/>
<CldOgImage src="cld-sample-2" twitter-title="test" />
<!-- Usage of `CldVideoPlayer.vue` component -->
<CldVideoPlayer
width="1620"
height="1080"
src="videos/mountain-stars"
/>
<CldVideoPlayer width="1620" height="1080" src="videos/mountain-stars" />
<!-- Usage of `CldUploadWidget.vue` component -->
<CldUploadWidget
v-slot="{ open }"
upload-preset="nuxt-cloudinary-unsigned"
>
<button
type="button"
@click="open"
>
Upload an Image
</button>
<CldUploadWidget v-slot="{ open }" upload-preset="nuxt-cloudinary-unsigned">
<button type="button" @click="open">Upload an Image</button>
</CldUploadWidget>
<!-- Usage of `CldUploadButton.vue` component -->
<CldUploadButton
upload-preset="nuxt-cloudinary-unsigned"
>
<CldUploadButton upload-preset="nuxt-cloudinary-unsigned">
Upload
</CldUploadButton>
<!-- Usage of `CldImage.vue` component -->
Expand All @@ -41,7 +24,9 @@ console.log(url)
height="987"
alt="Sample Product"
crop="fill"
sizes="sm:100vw md:50vw lg:400px"
loading="lazy"
sizes="(max-width: 600px) 480px,
800px"
/>
<CldImage
src="cld-sample-5"
Expand All @@ -53,7 +38,7 @@ console.log(url)
{
position: {
gravity: 'north',
y: 60
y: 60,
},
text: {
color: 'rgb:52a4ff80',
Expand All @@ -65,12 +50,12 @@ console.log(url)
lineSpacing: -100,
stroke: true,
border: '20px_solid_rgb:2d0eff99',
}
},
},
{
position: {
gravity: 'south',
y: 60
y: 60,
},
text: {
color: 'rgb:52a4ff80',
Expand All @@ -82,8 +67,8 @@ console.log(url)
lineSpacing: -100,
stroke: true,
border: '20px_solid_rgb:2d0eff99',
}
}
},
},
]"
/>
</template>
2 changes: 1 addition & 1 deletion src/runtime/components/CldOgImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const { url: twitterImageUrl } = useCldImageUrl({
});
const computedTwitterTitle = computed(
() => props.twitterTitle || currentRoute.meta?.title || " "
() => props.twitterTitle || currentRoute.value.meta?.title || " "
);
</script>

Expand Down

0 comments on commit e06c590

Please sign in to comment.