Skip to content

Commit 9165731

Browse files
feat(website): address brand portal design feedback
Add click-to-copy on all four swatch values, swap the Icon card to the ink square / yellow C (brand page only), route the contact links to the support site, match the stacked hero CTA widths on mobile, and remove the halo ring from the background nodes.
1 parent 8771ca1 commit 9165731

8 files changed

Lines changed: 53 additions & 21 deletions

File tree

apps/website/src/pages/brand.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const locale = 'en' as const
2020
<BrandBackground client:idle />
2121
<BrandHeroSection />
2222
<BrandLogosSection />
23-
<BrandColorSection />
23+
<BrandColorSection client:visible />
2424
<BrandVoiceSection />
2525
<BrandTrademarkSection />
2626
<BrandQuestionsSection />

apps/website/src/pages/zh-CN/brand.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { t } from '../../i18n/translations'
1818
<BrandBackground client:idle />
1919
<BrandHeroSection locale="zh-CN" />
2020
<BrandLogosSection locale="zh-CN" />
21-
<BrandColorSection locale="zh-CN" />
21+
<BrandColorSection client:visible locale="zh-CN" />
2222
<BrandVoiceSection locale="zh-CN" />
2323
<BrandTrademarkSection locale="zh-CN" />
2424
<BrandQuestionsSection locale="zh-CN" />

apps/website/src/templates/brand/BrandBackground.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,11 @@ function draw() {
6565
}
6666
6767
ctx.globalAlpha = 1
68+
ctx.fillStyle = 'rgba(242, 255, 89, 0.9)'
6869
for (const n of nodes) {
69-
ctx.fillStyle = 'rgba(242, 255, 89, 0.9)'
7070
ctx.beginPath()
7171
ctx.arc(n.x * w, n.y * h, 2.5 * dpr, 0, Math.PI * 2)
7272
ctx.fill()
73-
74-
ctx.strokeStyle = 'rgba(242, 255, 89, 0.25)'
75-
ctx.beginPath()
76-
ctx.arc(n.x * w, n.y * h, 8 * dpr, 0, Math.PI * 2)
77-
ctx.stroke()
7873
}
7974
}
8075

apps/website/src/templates/brand/BrandColorSection.vue

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<script setup lang="ts">
22
import type { Locale } from '../../i18n/translations'
33
4+
import { Check } from '@lucide/vue'
45
import { cn } from '@comfyorg/tailwind-utils'
6+
import { useClipboard } from '@vueuse/core'
7+
import { ref } from 'vue'
58
69
import SectionHeader from '../../components/common/SectionHeader.vue'
710
import { brandColors } from '../../data/brandColors'
@@ -10,6 +13,14 @@ import { t } from '../../i18n/translations'
1013
const { locale = 'en' } = defineProps<{ locale?: Locale }>()
1114
1215
const specRows = ['hex', 'rgb', 'hsl', 'cmyk'] as const
16+
17+
const { copy, copied } = useClipboard({ copiedDuring: 1500 })
18+
const copiedId = ref<string | null>(null)
19+
20+
function copyValue(id: string, value: string) {
21+
copiedId.value = id
22+
void copy(value)
23+
}
1324
</script>
1425

1526
<template>
@@ -39,11 +50,25 @@ const specRows = ['hex', 'rgb', 'hsl', 'cmyk'] as const
3950
>
4051
<span class="text-xs font-semibold">{{ color.name }}</span>
4152
<dl
42-
class="mt-3 grid grid-cols-[auto_1fr] gap-x-4 text-xs leading-[1.4]"
53+
class="mt-3 grid grid-cols-[auto_1fr] gap-x-4 gap-y-0.5 text-xs leading-[1.4]"
4354
>
4455
<template v-for="row in specRows" :key="row">
4556
<dt class="uppercase opacity-50">{{ row }}</dt>
46-
<dd>{{ color[row] }}</dd>
57+
<dd>
58+
<button
59+
type="button"
60+
:aria-label="`Copy ${row} value ${color[row]}`"
61+
class="inline-flex cursor-pointer items-center gap-1 text-left hover:underline"
62+
@click="copyValue(`${color.hex}-${row}`, color[row])"
63+
>
64+
{{ color[row] }}
65+
<Check
66+
v-if="copied && copiedId === `${color.hex}-${row}`"
67+
class="size-3"
68+
aria-hidden="true"
69+
/>
70+
</button>
71+
</dd>
4772
</template>
4873
</dl>
4974
</li>

apps/website/src/templates/brand/BrandHeroSection.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const { locale = 'en' } = defineProps<{ locale?: Locale }>()
3636
:href="BRAND_GUIDELINES_PDF"
3737
download
3838
variant="default"
39-
class="h-12 px-5 text-sm font-extrabold"
39+
class="h-12 w-full px-5 text-sm font-extrabold sm:w-auto"
4040
>
4141
{{ t('brand.hero.viewGuidelines', locale) }}
4242
</Button>
@@ -45,7 +45,7 @@ const { locale = 'en' } = defineProps<{ locale?: Locale }>()
4545
:href="BRAND_ASSETS_ZIP"
4646
download
4747
variant="outline"
48-
class="h-12 px-5 text-sm font-extrabold"
48+
class="h-12 w-full px-5 text-sm font-extrabold sm:w-auto"
4949
>
5050
{{ t('brand.hero.downloadLogos', locale) }}
5151
</Button>

apps/website/src/templates/brand/BrandLogosSection.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import { BRAND_ASSETS_ZIP } from '../../data/brandAssets'
99
import { t } from '../../i18n/translations'
1010
1111
const { locale = 'en' } = defineProps<{ locale?: Locale }>()
12+
13+
const assets = affiliateBrandAssets.map((asset) =>
14+
asset.id === 'icon'
15+
? { ...asset, preview: '/affiliates/brand/comfy-color-combo-ink.svg' }
16+
: asset
17+
)
1218
</script>
1319

1420
<template>
@@ -33,7 +39,7 @@ const { locale = 'en' } = defineProps<{ locale?: Locale }>()
3339

3440
<ul class="mt-10 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4">
3541
<li
36-
v-for="asset in affiliateBrandAssets"
42+
v-for="asset in assets"
3743
:key="asset.id"
3844
class="flex min-h-60 flex-col rounded-[30px] border-[1.5px] border-white/8 lg:min-h-[285px]"
3945
>

apps/website/src/templates/brand/BrandQuestionsSection.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import type { Locale } from '../../i18n/translations'
33
44
import SectionHeader from '../../components/common/SectionHeader.vue'
5-
import { getRoutes } from '../../config/routes.ts'
5+
import { externalLinks } from '../../config/routes.ts'
66
import { t } from '../../i18n/translations'
77
88
const { locale = 'en' } = defineProps<{ locale?: Locale }>()
9-
10-
const routes = getRoutes(locale)
119
</script>
1210

1311
<template>
@@ -20,7 +18,12 @@ const routes = getRoutes(locale)
2018

2119
<p class="text-primary-warm-gray mt-6 max-w-2xl text-sm leading-[1.6]">
2220
{{ t('brand.questions.body', locale) }}
23-
<a :href="routes.contact" class="text-primary-comfy-yellow underline">
21+
<a
22+
:href="externalLinks.support"
23+
target="_blank"
24+
rel="noopener noreferrer"
25+
class="text-primary-comfy-yellow underline"
26+
>
2427
{{ t('brand.questions.contact', locale) }}
2528
</a>
2629
</p>

apps/website/src/templates/brand/BrandTrademarkSection.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import type { Locale } from '../../i18n/translations'
33
44
import SectionHeader from '../../components/common/SectionHeader.vue'
5-
import { getRoutes } from '../../config/routes.ts'
5+
import { externalLinks } from '../../config/routes.ts'
66
import { t } from '../../i18n/translations'
77
88
const { locale = 'en' } = defineProps<{ locale?: Locale }>()
9-
10-
const routes = getRoutes(locale)
119
</script>
1210

1311
<template>
@@ -23,7 +21,12 @@ const routes = getRoutes(locale)
2321
<p>{{ t('brand.trademark.body2', locale) }}</p>
2422
<p>
2523
{{ t('brand.trademark.body3', locale) }}
26-
<a :href="routes.contact" class="text-primary-comfy-yellow underline">
24+
<a
25+
:href="externalLinks.support"
26+
target="_blank"
27+
rel="noopener noreferrer"
28+
class="text-primary-comfy-yellow underline"
29+
>
2730
{{ t('brand.trademark.contact', locale) }}
2831
</a>
2932
</p>

0 commit comments

Comments
 (0)