docs(site): make homepage responsive and accessible

This commit is contained in:
Valentin Maerten
2026-08-30 13:34:11 +02:00
parent ce5df01577
commit e209766d52
2 changed files with 44 additions and 3 deletions

View File

@@ -25,6 +25,12 @@ const copyAnnouncement = computed(() => {
return '';
});
const copyAriaLabel = computed(() => {
if (copyState.value === 'copied') return 'Install command copied';
if (copyState.value === 'failed') return 'Copy install command again';
return 'Copy install command';
});
function resetCopyState() {
window.clearTimeout(copyResetTimer);
copyResetTimer = window.setTimeout(() => {
@@ -68,7 +74,7 @@ function track(event: string) {
<code>{{ installCommand }}</code>
<button
type="button"
:aria-label="`${copyLabel} install command`"
:aria-label="copyAriaLabel"
@click="copyInstallCommand"
>
{{ copyLabel }}

View File

@@ -141,9 +141,8 @@ img[src*='custom-icon-badges.demolab.com'] {
}
}
.VPTeamPage > .VPTeamPageTitle {
padding-top: 0
padding-top: 0;
}
/* VitePress greys out sponsor logos by default. Show them in their brand
@@ -169,3 +168,39 @@ html:not(.dark) .vp-sponsor-grid-item .logo-dark {
.dark .vp-sponsor-grid-item.has-dark-logo:hover .logo-light {
display: block;
}
@media (max-width: 639px) {
.VPHomeHero {
overflow: hidden;
}
.VPHomeHero .main,
.VPHomeHero .heading,
.VPHomeHero .text,
.VPHomeHero .tagline {
min-width: 0;
max-width: 100%;
}
.VPHomeHero .text {
width: 100%;
overflow-wrap: anywhere;
font-size: 28px;
line-height: 36px;
}
.VPHomeHero .actions {
align-items: stretch;
margin-right: 0;
margin-left: 0;
}
.VPHomeHero .action {
min-width: min(100%, 15rem);
}
.VPHomeHero .VPButton {
justify-content: center;
width: 100%;
}
}