diff --git a/website/.vitepress/components/HeroActions.vue b/website/.vitepress/components/HeroActions.vue deleted file mode 100644 index 02ca51d5..00000000 --- a/website/.vitepress/components/HeroActions.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - diff --git a/website/.vitepress/components/HeroStars.vue b/website/.vitepress/components/HeroStars.vue new file mode 100644 index 00000000..28f78dc7 --- /dev/null +++ b/website/.vitepress/components/HeroStars.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/website/.vitepress/theme/custom.css b/website/.vitepress/theme/custom.css index 57017abf..79590773 100644 --- a/website/.vitepress/theme/custom.css +++ b/website/.vitepress/theme/custom.css @@ -169,36 +169,6 @@ html:not(.dark) .vp-sponsor-grid-item .logo-dark { display: block; } -/* Mirrors the .actions/.action rules of VitePress' VPHero.vue, which are scoped - to that component and so do not reach the row in HeroActions.vue. */ -.hero-actions { - display: flex; - flex-wrap: wrap; - margin: -6px; - padding-top: 24px; -} - -.hero-action { - flex-shrink: 0; - padding: 6px; -} - -.VPHero.has-image .hero-actions { - justify-content: center; -} - -@media (min-width: 640px) { - .hero-actions { - padding-top: 32px; - } -} - -@media (min-width: 960px) { - .VPHero.has-image .hero-actions { - justify-content: flex-start; - } -} - @media (max-width: 639px) { .VPHomeHero { overflow: hidden; @@ -219,13 +189,13 @@ html:not(.dark) .vp-sponsor-grid-item .logo-dark { line-height: 36px; } - .VPHomeHero .hero-actions { + .VPHomeHero .actions { align-items: stretch; margin-right: 0; margin-left: 0; } - .VPHomeHero .hero-action { + .VPHomeHero .action { min-width: min(100%, 15rem); } diff --git a/website/.vitepress/theme/index.ts b/website/.vitepress/theme/index.ts index 9670930b..4e3a524a 100644 --- a/website/.vitepress/theme/index.ts +++ b/website/.vitepress/theme/index.ts @@ -2,7 +2,7 @@ import DefaultTheme from 'vitepress/theme'; import type { Theme } from 'vitepress'; import './custom.css'; import HomePage from '../components/HomePage.vue'; -import HeroActions from '../components/HeroActions.vue'; +import HeroStars from '../components/HeroStars.vue'; import AuthorCard from '../components/AuthorCard.vue'; import BlogPost from '../components/BlogPost.vue'; import Version from '../components/Version.vue'; @@ -16,7 +16,7 @@ export default { extends: DefaultTheme, Layout() { return h(DefaultTheme.Layout, null, { - 'home-hero-actions-after': () => h(HeroActions), + 'home-hero-actions-after': () => h(HeroStars), 'home-features-after': () => h(HomePage) }); }, diff --git a/website/src/index.md b/website/src/index.md index 70a900e5..491beb2b 100644 --- a/website/src/index.md +++ b/website/src/index.md @@ -5,8 +5,6 @@ description: YAML Taskfile. layout: home titleTemplate: false -# The hero buttons live in .vitepress/components/HeroActions.vue, which -# renders them next to the GitHub star count. hero: name: Task text: The Modern Task Runner @@ -16,6 +14,13 @@ hero: image: src: /img/logo.svg alt: Task logo + actions: + - theme: brand + text: Get Started + link: /docs/getting-started + - theme: alt + text: Browse the Reference + link: /docs/reference/schema features: - title: Readable by design