Skip to content

Commit 30877bd

Browse files
Polish to OSS friends (#4648)
* Polish to OSS friends * Additional polish * Design polish
1 parent 4b42ce8 commit 30877bd

File tree

2 files changed

+35
-22
lines changed

2 files changed

+35
-22
lines changed

docs-starlight/src/components/dv-OpenSourceCard.astro

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,31 @@ import { Image } from 'astro:assets';
55
const { icon, title, description, href } = Astro.props;
66
---
77

8-
<a href={href}
9-
class="group relative flex w-full items-center border border-dashed border-[var(--color-gray-3)] px-8 py-6 bg-[#FAFAFA] hover:bg-white hover:cursor-pointer transition-colors duration-200"
10-
target="_blank"
11-
rel="noopener noreferrer"
8+
<a
129
aria-label={`Learn more about ${title}`}
10+
class="opensourcecard group relative flex w-full items-start border border-dashed border-[var(--color-gray-3)] px-4 py-4 lg:px-8 lg:py-8 bg-[#FAFAFA] no-underline hover:bg-white hover:cursor-pointer transition-colors duration-200"
11+
href={href}
12+
rel="noopener noreferrer"
13+
target="_blank"
1314
>
14-
<div class="flex flex-col items-start gap-3">
15-
<div class="flex gap-1.5 items-center">
16-
<Image
17-
src={icon}
18-
alt={`${title} Icon`}
19-
class="w-6 h-6"
20-
/>
21-
<p class="text-lg font-semibold text-[var(--color-dark-blue-1)]">{title}</p>
22-
</div>
23-
<p class="text-sm font-sans text-[var(--color-gray-1)]">{description}</p>
24-
</div>
25-
<div class="absolute right-8 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transform transition-opacity duration-200">
26-
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
27-
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"></path>
28-
</svg>
15+
<div class="grid grid-cols-[1fr_24px] gap-1 w-full">
16+
<div class="flex flex-col gap-4 items-start">
17+
<div class="flex gap-1.5 items-center">
18+
<Image
19+
alt={`${title} Icon`}
20+
class="w-6 h-6"
21+
src={icon}
22+
/>
23+
<p class="text-lg font-semibold text-[var(--color-dark-blue-1)] m-0">{title}</p>
24+
</div>
25+
<p class="text-sm font-sans text-[var(--color-gray-1)] m-0">{description}</p>
26+
</div>
27+
<div class="flex items-center justify-end">
28+
<div class="opacity-0 group-hover:opacity-100 transform transition-opacity duration-200">
29+
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
30+
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"></path>
31+
</svg>
32+
</div>
33+
</div>
2934
</div>
3035
</a>

docs-starlight/src/styles/global.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,15 +444,23 @@ p code {
444444
}
445445

446446
#starlight__sidebar ul li {
447-
margin: 0;
447+
margin: 0;
448448
padding-top: 0.5em;
449449
padding-bottom: 0.5em;
450450
}
451451

452452
#starlight__sidebar ul li ul li {
453-
padding-left: 1em;
453+
padding-left: 1em;
454454
}
455455

456456
#starlight__sidebar details summary {
457457
padding-left: 0;
458-
}
458+
}
459+
460+
.opensourcecard {
461+
border-left: 0;
462+
}
463+
464+
.opensourcecard:last-child {
465+
border-right: 0;
466+
}

0 commit comments

Comments
 (0)