Skip to content

Commit

Permalink
feat: Content Logo ui refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
lfsigreja committed Sep 4, 2024
1 parent a7c52dc commit 0e0bad0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 45 deletions.
6 changes: 0 additions & 6 deletions src/stories/components-group/ContentLogo.stories.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

92 changes: 53 additions & 39 deletions src/templates/contentlogo/ContentLogo.vue
Original file line number Diff line number Diff line change
@@ -1,53 +1,67 @@
<template>
<div
class="flex"
:class="{'justify-center': isCentralized}">

<div class="flex flex-col gap-4 max-w-2xl">
<p
v-if="title"
class="text-color-secondary text-xs"
:class="{ 'text-center': isCentralized }">

{{ title }}
</p>
:class="{ 'justify-center': isCentralized }"
>
<div
class="flex flex-col"
:class="[
{ 'max-w-lg gap-5': !isCentralized },
{ 'max-w-sm md:max-w-xl lg:max-w-4xl gap-10': isCentralized }
]"
>
<template v-if="title">
<template v-if="!isCentralized">
<p
v-if="title"
class="text-color-secondary text-xs"
:class="{ 'text-center': isCentralized }"
>
{{ title }}
</p>
</template>
<template v-else-if="isCentralized">
<Overline class="text-center" :label="title" />
</template>
</template>
<div
class="flex flex-wrap m-0 gap-y-6 gap-x-8 text-color-secondary"
:class="{ 'justify-center': isCentralized }">
class="flex items-center flex-wrap m-0 text-color-secondary"
:class="[{ 'justify-center gap-y-8 md:gap-y-16 ': isCentralized }, { 'gap-5': !isCentralized }]"
>
<div
:class="[{ 'w-28 ': !isCentralized }, { 'w-36 lg:w-56': isCentralized }]"
:key="logo.imageSrc"
v-for="logo in logos">
<span class="block *:h-auto *:w-full *:aspect-[9/6] " :class="[
{ '*:max-h-8 max-h-8 w-20 *:max-w-20' : size === 'small'},
{ '*:max-h-12 max-h-12 w-24 *:max-w-24' : size === 'default'},
{ '*:max-h-16 max-h-16 w-28 *:max-w-28' : size === 'large'}
]" v-html="logo.imageSrc"></span>
v-for="logo in logos"
>
<span
class="*:h-10 max-h-10 flex justify-center"
:class="[
{ '*:max-w-28 ': !isCentralized },
{ '*:max-w-36 *:lg:max-w-56': isCentralized }
]"
v-html="logo.imageSrc"
></span>
</div>
</div>
</div>
</div>
</template>

<script setup>
defineProps({
isCentralized: {
type: Boolean,
required: false,
default: false
},
title: {
type: String,
required: false
},
logos: {
type: Array,
required: true,
},
size: {
type: String,
required: false,
options: ["small", "default", "large"],
default: "default"
}
})
import Overline from '../overline'
defineProps({
isCentralized: {
type: Boolean,
required: false,
default: false
},
title: {
type: String,
required: false
},
logos: {
type: Array,
required: true
}
})
</script>

0 comments on commit 0e0bad0

Please sign in to comment.