mirror of
https://github.com/go-task/task.git
synced 2026-09-02 04:02:08 +02:00
docs(site): make homepage responsive and accessible
This commit is contained in:
@@ -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 }}
|
||||
|
||||
@@ -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%;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user