Skip to content

Commit

Permalink
feat: adjust Textflow styles
Browse files Browse the repository at this point in the history
  • Loading branch information
janfrl committed Jan 6, 2025
1 parent 1eeaca7 commit 623a5d1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ h6 {
}
img.default {
@apply rounded-md border border-gray-200 dark:border-gray-800;
@apply rounded-lg border border-gray-200 dark:border-gray-800;
}
.icon {
Expand Down
17 changes: 15 additions & 2 deletions app/components/content/ImageCaption.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,27 @@ defineProps<{
src?: string
alt?: string
caption?: string
imgClass?: string
}>()
</script>

<template>
<figure>
<NuxtImg placeholder :src="src" :alt="alt" class="mb-1 border border-gray-200 dark:border-gray-800 w-96 lg:w-[28rem] rounded" />
<slot name="image">
<NuxtImg
placeholder
:src="src"
:alt="alt"
class="mb-1 border border-gray-200 dark:border-gray-800 w-96 lg:w-[28rem] default"
:class="imgClass"
/>
</slot>

<!-- Slot for customizable caption, defaults to the caption prop -->
<figcaption class="text-center">
{{ caption }}
<slot name="caption">
{{ caption }}
</slot>
</figcaption>
</figure>
</template>
6 changes: 3 additions & 3 deletions app/components/content/TextFlow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ const props = withDefaults(defineProps<Props>(), {
</script>

<template>
<div class="md:overflow-auto my-4 sm:my-6 lg:my-8" :class="props.side">
<div class="md:overflow-x-auto py-4 sm:py-6 lg:py-8" :class="props.side">
<slot />
</div>
</template>

<style>
.left > figure {
@apply md:float-left lg:mr-16 md:mr-8 md:my-5;
@apply md:float-left md:mr-8 lg:mr-16 my-6;
}
.right > figure {
@apply md:float-right lg:ml-16 md:ml-8 md:my-5;
@apply md:float-right md:ml-8 lg:ml-16 my-6;
}
.left > figure > img,
Expand Down
Binary file modified public/images/tombs-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 623a5d1

Please sign in to comment.