Skip to content

Commit 3c3bfeb

Browse files
vladhuserquinalexdln
authored
fix: adjust logo sizing on about page (#1986)
Co-authored-by: Joaquín Sánchez <userquin@gmail.com> Co-authored-by: Vordgi <sasha2822222@gmail.com>
1 parent 8372d67 commit 3c3bfeb

4 files changed

Lines changed: 33 additions & 13 deletions

File tree

app/assets/logos/sponsors/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const SPONSORS = [
5454
dark: LogoNetlify,
5555
light: LogoNetlifyLight,
5656
},
57-
normalisingIndent: '0.125rem',
57+
normalisingIndent: '0.25rem',
5858
url: 'https://netlify.com/',
5959
},
6060
{

app/components/About/LogoImg.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@ const props = defineProps<{
1111
</script>
1212
<template>
1313
<div v-if="typeof src === 'string'" class="h-full">
14-
<img :src="src" loading="lazy" height="36" class="w-auto block h-full" :alt="alt" />
14+
<img
15+
:src="src"
16+
loading="lazy"
17+
height="36"
18+
class="h-full w-full object-contain block"
19+
:alt="alt"
20+
/>
1521
</div>
1622
<div v-else-if="src.light === 'auto'" class="h-full">
1723
<img
1824
:src="src.dark"
1925
loading="lazy"
2026
height="36"
21-
class="w-auto block light:invert light:grayscale h-full"
27+
class="h-full w-full object-contain block light:invert light:grayscale"
2228
:alt="alt"
2329
/>
2430
</div>
@@ -27,14 +33,14 @@ const props = defineProps<{
2733
:src="src.dark"
2834
loading="lazy"
2935
height="36"
30-
class="w-auto block light:hidden h-full"
36+
class="h-full w-full object-contain block light:hidden"
3137
:alt="alt"
3238
/>
3339
<img
3440
:src="src.light"
3541
loading="lazy"
3642
height="36"
37-
class="w-auto block hidden light:block h-full"
43+
class="h-full w-full object-contain block hidden light:block"
3844
:alt="alt"
3945
/>
4046
</div>

app/components/About/LogoList.vue

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,40 +22,50 @@ const props = defineProps<{
2222
</script>
2323

2424
<template>
25-
<ul class="flex flex-wrap gap-4 md:gap-x-6 md:gap-y-4 list-none">
26-
<li v-for="item in list" :key="item.name">
25+
<ul class="list-none">
26+
<li
27+
v-for="item in list"
28+
:key="item.name"
29+
:style="
30+
'items' in item && `grid-column: span ${item.items.length} / span ${item.items.length};`
31+
"
32+
>
2733
<a
2834
v-if="'logo' in item"
2935
:href="item.url"
3036
target="_blank"
3137
rel="noopener noreferrer"
32-
class="relative flex items-center justify-center h-14 min-w-14 rounded-md hover:bg-fg/10 transition-colors p-1"
38+
class="relative flex items-center justify-center h-16 rounded-md bg-bg-muted hover:bg-bg-subtle border border-border transition-colors py-1 px-3"
3339
:style="{ paddingBlock: item.normalisingIndent }"
3440
:aria-label="item.name"
3541
>
3642
<AboutLogoImg :src="item.logo" :alt="item.name" />
3743
</a>
38-
<div v-else-if="item.items" class="relative flex items-center justify-center">
44+
<div
45+
v-else-if="item.items"
46+
class="relative flex items-center justify-center h-full bg-bg-muted border border-border rounded-md py-1 px-2"
47+
>
3948
<svg
4049
width="11"
4150
height="38"
4251
viewBox="0 0 11 38"
4352
fill="none"
4453
xmlns="http://www.w3.org/2000/svg"
4554
aria-hidden="true"
55+
class="h-full w-auto"
4656
>
4757
<path
4858
d="M5.62151 0C-1.8519 10.6931 -1.89574 27.2683 5.62151 37.9997H10.6709C3.15538 27.2683 3.19922 10.6931 10.6709 0H5.62151Z"
4959
fill="currentColor"
5060
/>
5161
</svg>
5262
<ul class="flex items-center justify-center h-full gap-0.5 list-none">
53-
<li v-for="groupItem in item.items" :key="groupItem.name">
63+
<li v-for="groupItem in item.items" :key="groupItem.name" class="h-full">
5464
<a
5565
:href="groupItem.url"
5666
target="_blank"
5767
rel="noopener noreferrer"
58-
class="relative flex items-center justify-center h-10 min-w-10 rounded-md hover:bg-fg/10 transition-colors p-0.5"
68+
class="relative flex items-center justify-center h-full aspect-square rounded-md hover:bg-bg-subtle border border-transparent hover:border-border transition-colors p-1.5"
5969
:style="{ paddingBlock: groupItem.normalisingIndent }"
6070
:aria-label="groupItem.name"
6171
>
@@ -70,6 +80,7 @@ const props = defineProps<{
7080
fill="none"
7181
xmlns="http://www.w3.org/2000/svg"
7282
aria-hidden="true"
83+
class="h-full w-auto"
7384
>
7485
<path
7586
d="M5.04935 0H0C7.4734 10.6931 7.51725 27.2683 0 37.9997H5.04935C12.5648 27.2683 12.521 10.6931 5.04935 0Z"

app/pages/about.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const roleLabels = computed(
156156
</h2>
157157
<AboutLogoList
158158
:list="SPONSORS"
159-
class="grid grid-cols-2 md:flex md:flex-row md:items-center"
159+
class="grid grid-cols-[repeat(auto-fill,minmax(160px,1fr))] gap-4 grid-flow-row-dense"
160160
/>
161161
</div>
162162

@@ -165,7 +165,10 @@ const roleLabels = computed(
165165
<h2 class="text-lg text-fg uppercase tracking-wider mb-4">
166166
{{ $t('about.oss_partners.title') }}
167167
</h2>
168-
<AboutLogoList :list="OSS_PARTNERS" class="items-center" />
168+
<AboutLogoList
169+
:list="OSS_PARTNERS"
170+
class="grid grid-cols-[repeat(auto-fill,minmax(64px,1fr))] gap-4 grid-flow-row-dense"
171+
/>
169172
</div>
170173

171174
<div>

0 commit comments

Comments
 (0)