-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
4,315 additions
and
2,848 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,66 @@ | ||
<script setup lang="ts"> | ||
import {usePageFrontmatter} from '@vuepress/client'; | ||
import {isArray} from '@vuepress/shared'; | ||
import {computed} from 'vue'; | ||
import type {DefaultThemeHomePageFrontmatter} from '@vuepress/theme-default/lib/client/components/../../shared/index.js'; | ||
import { computed } from 'vue'; | ||
import { usePageFrontmatter } from 'vuepress/client'; | ||
import type { DefaultThemeHomePageFrontmatter } from '../../shared/index.js'; | ||
const frontmatter = usePageFrontmatter<DefaultThemeHomePageFrontmatter>(); | ||
const features = computed(() => { | ||
if (isArray(frontmatter.value.features)) { | ||
return frontmatter.value.features; | ||
} | ||
return []; | ||
}); | ||
const features = computed(() => frontmatter.value.features ?? []); | ||
</script> | ||
|
||
<!-- eslint-disable-next-line vue/no-root-v-if --> | ||
<template> | ||
<div v-if="features.length" class="features"> | ||
<div v-for="feature in features" :key="feature.title" class="feature"> | ||
<div v-if="features.length" class="vp-features"> | ||
<div v-for="feature in features" :key="feature.title" class="vp-feature"> | ||
<h2>{{ feature.title }}</h2> | ||
<div v-html="feature.details"></div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss"> | ||
@use '@vuepress/theme-default/lib/client/styles/variables' as *; | ||
|
||
.vp-features { | ||
display: flex; | ||
flex-wrap: wrap; | ||
place-content: stretch space-between; | ||
align-items: flex-start; | ||
|
||
margin-top: 2.5rem; | ||
padding: 1.2rem 0; | ||
border-top: 1px solid var(--vp-c-gutter); | ||
|
||
transition: border-color var(--vp-t-color); | ||
|
||
@media (max-width: $MQMobile) { | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
.vp-feature { | ||
flex-grow: 1; | ||
flex-basis: 30%; | ||
max-width: 30%; | ||
|
||
@media (max-width: $MQMobile) { | ||
max-width: 100%; | ||
padding: 0 2.5rem; | ||
} | ||
|
||
h2 { | ||
padding-bottom: 0; | ||
border-bottom: none; | ||
font-weight: 500; | ||
font-size: 1.4rem; | ||
|
||
@media (max-width: $MQMobileNarrow) { | ||
font-size: 1.25rem; | ||
} | ||
} | ||
|
||
p { | ||
color: var(--vp-c-text-mute); | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ head: | |
--- | ||
|
||
<style> | ||
.home .hero img { | ||
.vp-home .vp-hero img { | ||
margin-top: 0; | ||
height: 100%; | ||
} | ||
|
Oops, something went wrong.