151 lines
7.3 KiB
Plaintext
151 lines
7.3 KiB
Plaintext
component LogoCloud {
|
|
props {
|
|
class: string = ""
|
|
eyebrow = ""
|
|
title = "Trusted by teams building modern products"
|
|
description = ""
|
|
|
|
logos = []
|
|
|
|
centered = true
|
|
compact = false
|
|
|
|
variant = "strip"
|
|
grayscale = true
|
|
showNames = false
|
|
maxItems = 8
|
|
}
|
|
|
|
view {
|
|
<section
|
|
aria-labelledby="logo-cloud-title"
|
|
class="w-full px-5 sm:px-8 lg:px-10 xl:px-12 {class}"
|
|
class:py-10="compact"
|
|
class:sm:py-12="compact"
|
|
class:py-14="!compact"
|
|
class:sm:py-16="!compact"
|
|
class:lg:py-20="!compact"
|
|
class:hidden="logos.length === 0"
|
|
>
|
|
<div
|
|
class=" relative mx-auto w-full max-w-7xl overflow-hidden {variant === 'card' ? 'rounded-3xl border border-indigo-200/80 bg-linear-to-br from-indigo-50/80 via-white to-violet-50/70 shadow-xl shadow-indigo-950/5 dark:border-indigo-500/20 dark:from-indigo-500/10 dark:via-slate-900 dark:to-violet-500/10 dark:shadow-black/20' : '' } "
|
|
>
|
|
<!-- Decorative background -->
|
|
<div
|
|
aria-hidden="true"
|
|
class="pointer-events-none absolute inset-0 overflow-hidden"
|
|
class:hidden="variant !== 'card'"
|
|
>
|
|
<div class="absolute -right-24 -top-28 h-64 w-64 rounded-full bg-indigo-300/20 blur-3xl dark:bg-indigo-500/10"></div>
|
|
|
|
<div class="absolute -bottom-28 -left-24 h-64 w-64 rounded-full bg-violet-300/15 blur-3xl dark:bg-violet-500/5"></div>
|
|
|
|
<div class="absolute left-1/2 top-0 h-px w-2/3 -translate-x-1/2 bg-linear-to-r from-transparent via-indigo-400/60 to-transparent dark:via-indigo-400/20"></div>
|
|
</div>
|
|
|
|
<div
|
|
class="relative"
|
|
class:px-6="compact"
|
|
class:py-8="compact"
|
|
class:sm:px-8="compact"
|
|
class:sm:py-10="compact"
|
|
class:px-7="!compact"
|
|
class:py-10="!compact"
|
|
class:sm:px-10="!compact"
|
|
class:sm:py-12="!compact"
|
|
class:lg:px-12="!compact"
|
|
class:lg:py-14="!compact"
|
|
>
|
|
<!-- Heading -->
|
|
<div
|
|
class="max-w-3xl"
|
|
class:mx-auto="centered"
|
|
class:text-center="centered"
|
|
>
|
|
<p
|
|
class="text-xs font-bold uppercase tracking-[0.18em] text-indigo-600 dark:text-indigo-400"
|
|
class:hidden="eyebrow === ''"
|
|
>
|
|
{eyebrow}
|
|
</p>
|
|
|
|
<h2
|
|
id="logo-cloud-title"
|
|
class=" font-bold leading-tight tracking-tight text-slate-950 dark:text-white {eyebrow !== '' ? 'mt-3' : ''} {compact ? 'text-2xl sm:text-3xl' : 'text-3xl sm:text-4xl' } "
|
|
>
|
|
{title}
|
|
</h2>
|
|
|
|
<p
|
|
class=" mt-4 text-sm leading-7 text-slate-600 dark:text-slate-400 {centered ? 'mx-auto max-w-2xl' : 'max-w-2xl'} {!compact ? 'sm:text-base' : ''} "
|
|
class:hidden="description === ''"
|
|
>
|
|
{description}
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Dynamic logo list -->
|
|
<div
|
|
class=" mt-8 flex flex-wrap justify-center {variant === 'cards' ? 'gap-4 sm:mt-10' : 'items-center gap-x-10 gap-y-7 sm:mt-10 lg:gap-x-14' } "
|
|
>
|
|
{#each logos.slice(0, maxItems) as logo}
|
|
<a
|
|
href="{logo.href}"
|
|
target="{logo.external ? '_blank' : '_self'}"
|
|
rel="{logo.external ? 'noopener noreferrer' : ''}"
|
|
aria-label="{logo.name}"
|
|
class=" group min-w-0 transition duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 {variant === 'cards' ? 'flex w-full items-center gap-4 rounded-2xl border border-slate-200/80 bg-white/80 p-4 shadow-sm backdrop-blur-sm hover:-translate-y-1 hover:border-indigo-300 hover:bg-white hover:shadow-lg dark:border-white/10 dark:bg-white/5 dark:hover:border-indigo-500/30 dark:hover:bg-white/10 sm:w-[calc(50%-0.5rem)] lg:w-[calc(25%-0.75rem)]' : 'flex h-12 items-center justify-center px-2 opacity-70 hover:opacity-100' } "
|
|
>
|
|
<!-- Logo mark -->
|
|
<div
|
|
class=" flex shrink-0 items-center justify-center {variant === 'cards' ? 'h-12 w-12 rounded-xl bg-slate-50 ring-1 ring-inset ring-slate-200 dark:bg-white/5 dark:ring-white/10' : '' } "
|
|
>
|
|
<img
|
|
src="{logo.src}"
|
|
alt="{logo.alt !== '' ? logo.alt : logo.name}"
|
|
loading="lazy"
|
|
class=" block object-contain transition duration-200 {variant === 'cards' ? 'max-h-7 max-w-9' : 'max-h-8 max-w-36' } {grayscale ? 'grayscale group-hover:grayscale-0' : '' } "
|
|
/>
|
|
|
|
<!-- Fallback mark -->
|
|
<span
|
|
class=" hidden h-8 w-8 items-center justify-center rounded-lg bg-indigo-50 text-sm font-bold text-indigo-700 dark:bg-indigo-500/10 dark:text-indigo-300 "
|
|
>
|
|
{logo.name.slice(0, 1)}
|
|
</span>
|
|
</div>
|
|
|
|
<!-- Partner text -->
|
|
<div
|
|
class="min-w-0"
|
|
class:hidden="variant !== 'cards' && !showNames"
|
|
>
|
|
<p class="truncate text-sm font-semibold text-slate-800 dark:text-slate-200">
|
|
{logo.name}
|
|
</p>
|
|
|
|
<p
|
|
class="mt-0.5 truncate text-xs text-slate-500 dark:text-slate-400"
|
|
class:hidden="logo.description === ''"
|
|
>
|
|
{logo.description}
|
|
</p>
|
|
</div>
|
|
</a>
|
|
{/each}
|
|
</div>
|
|
|
|
<!-- Optional count -->
|
|
<p
|
|
class="mt-6 text-sm text-slate-500 dark:text-slate-400"
|
|
class:hidden="logos.length <= maxItems"
|
|
class:text-center="centered"
|
|
>
|
|
And {logos.length - maxItems} more teams using WrNexus.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
}
|
|
}
|