@frontfactory/vitepress-theme 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/config.d.ts +4 -4
- package/config.js +39 -17
- package/dist/style.css +1 -2011
- package/package.json +15 -6
- package/src/components/FfBackToTop.vue +37 -30
- package/src/components/FfBanner.vue +64 -50
- package/src/components/FfDocMeta.vue +107 -55
- package/src/components/FfFeature.vue +58 -26
- package/src/components/FfFooter.vue +97 -51
- package/src/components/FfHero.vue +168 -109
- package/src/components/FfHeroCommand.vue +66 -47
- package/src/components/FfHomeSponsors.vue +30 -14
- package/src/composables/options.ts +23 -14
- package/src/content/Api.vue +30 -13
- package/src/content/Card.vue +22 -16
- package/src/content/CardGrid.vue +9 -4
- package/src/content/Kbd.vue +1 -1
- package/src/content/Steps.vue +3 -3
- package/src/index.ts +25 -23
- package/src/internal.ts +5 -5
- package/src/layout/FfLayout.vue +45 -34
- package/src/styles/_blocks.scss +1 -0
- package/src/styles/_code.scss +1 -0
- package/src/styles/_content.scss +8 -2
- package/src/styles/_doc.scss +7 -6
- package/src/styles/_home.scss +13 -8
- package/src/styles/_motion.scss +1 -0
- package/src/styles/_nav.scss +5 -3
- package/src/styles/_sidebar.scss +1 -0
- package/src/styles/_tokens.scss +15 -26
- package/src/types.ts +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { VPSponsors } from '../internal'
|
|
3
|
-
import { useLabels } from '../composables/options'
|
|
2
|
+
import { VPSponsors } from '../internal';
|
|
3
|
+
import { useLabels } from '../composables/options';
|
|
4
4
|
|
|
5
5
|
export interface SponsorItem {
|
|
6
6
|
name: string
|
|
@@ -19,22 +19,38 @@ defineProps<{
|
|
|
19
19
|
actionText?: string
|
|
20
20
|
actionLink?: string
|
|
21
21
|
data: SponsorTier[] | SponsorItem[]
|
|
22
|
-
}>()
|
|
22
|
+
}>();
|
|
23
23
|
|
|
24
|
-
const labels = useLabels()
|
|
24
|
+
const labels = useLabels();
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<template>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
<section class="VPHomeSponsors ff-sponsors">
|
|
29
|
+
<div class="ff-sponsors-container">
|
|
30
|
+
<h2 class="ff-sponsors-title ff-display">
|
|
31
|
+
{{ labels.sponsors }}
|
|
32
|
+
</h2>
|
|
33
|
+
<p
|
|
34
|
+
v-if="message"
|
|
35
|
+
class="ff-sponsors-message"
|
|
36
|
+
>
|
|
37
|
+
{{ message }}
|
|
38
|
+
</p>
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
<VPSponsors
|
|
41
|
+
class="ff-sponsors-grid"
|
|
42
|
+
:data="data"
|
|
43
|
+
/>
|
|
34
44
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
<div
|
|
46
|
+
v-if="actionLink"
|
|
47
|
+
class="ff-sponsors-action"
|
|
48
|
+
>
|
|
49
|
+
<a
|
|
50
|
+
class="ff-btn ff-btn-alt no-icon"
|
|
51
|
+
:href="actionLink"
|
|
52
|
+
>{{ actionText ?? labels.sponsorsAction }}</a>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</section>
|
|
40
56
|
</template>
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { computed } from 'vue'
|
|
2
|
-
import { useData } from 'vitepress'
|
|
3
|
-
import type {
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import { useData } from 'vitepress';
|
|
3
|
+
import type {
|
|
4
|
+
ThemeConfig, ThemeLabels, ThemeOptions
|
|
5
|
+
} from '../types';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Theme options declared under `themeConfig.ff`, with an empty object as a fallback so callers
|
|
7
9
|
* never have to guard.
|
|
8
10
|
*/
|
|
9
11
|
export function useThemeOptions() {
|
|
10
|
-
const { theme } = useData()
|
|
12
|
+
const { theme } = useData();
|
|
11
13
|
|
|
12
|
-
return computed<ThemeOptions>(() => (theme.value as ThemeConfig).ff ?? {})
|
|
14
|
+
return computed<ThemeOptions>(() => (theme.value as ThemeConfig).ff ?? {});
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
/** English fallbacks for every string this theme adds. */
|
|
@@ -25,27 +27,34 @@ export const defaultLabels: Required<ThemeLabels> = {
|
|
|
25
27
|
footerSocial: 'Follow',
|
|
26
28
|
sponsors: 'Sponsors',
|
|
27
29
|
sponsorsAction: 'Become a sponsor'
|
|
28
|
-
}
|
|
30
|
+
};
|
|
29
31
|
|
|
30
32
|
/**
|
|
31
33
|
* Labels for the current locale. VitePress merges `themeConfig` per locale before it reaches the
|
|
32
34
|
* client, so a site translates the theme by declaring `ff.labels` under each locale.
|
|
33
35
|
*/
|
|
34
36
|
export function useLabels() {
|
|
35
|
-
const options = useThemeOptions()
|
|
37
|
+
const options = useThemeOptions();
|
|
36
38
|
|
|
37
39
|
return computed<Required<ThemeLabels>>(() => {
|
|
38
|
-
const labels = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const labels = {
|
|
41
|
+
...defaultLabels
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
for (const [
|
|
45
|
+
key,
|
|
46
|
+
value
|
|
47
|
+
] of Object.entries(options.value.labels ?? {})) {
|
|
48
|
+
if (value) {
|
|
49
|
+
labels[key as keyof ThemeLabels] = value;
|
|
50
|
+
}
|
|
42
51
|
}
|
|
43
52
|
|
|
44
|
-
return labels
|
|
45
|
-
})
|
|
53
|
+
return labels;
|
|
54
|
+
});
|
|
46
55
|
}
|
|
47
56
|
|
|
48
57
|
/** Fills the `{0}` placeholder of a label. */
|
|
49
58
|
export function format(label: string, value: string | number) {
|
|
50
|
-
return label.replace('{0}', String(value))
|
|
59
|
+
return label.replace('{0}', String(value));
|
|
51
60
|
}
|
package/src/content/Api.vue
CHANGED
|
@@ -10,23 +10,40 @@ defineProps<{
|
|
|
10
10
|
since?: string
|
|
11
11
|
/** Marks the symbol as deprecated. */
|
|
12
12
|
deprecated?: boolean
|
|
13
|
-
}>()
|
|
13
|
+
}>();
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
16
|
<template>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
<section
|
|
18
|
+
class="ff-api"
|
|
19
|
+
:class="{ 'is-deprecated': deprecated }"
|
|
20
|
+
>
|
|
21
|
+
<header class="ff-api-head">
|
|
22
|
+
<code class="ff-api-name">{{ name }}</code>
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
<span
|
|
25
|
+
v-if="kind"
|
|
26
|
+
class="ff-api-kind ff-label"
|
|
27
|
+
>{{ kind }}</span>
|
|
28
|
+
<span
|
|
29
|
+
v-if="since"
|
|
30
|
+
class="ff-api-tag ff-label"
|
|
31
|
+
>since {{ since }}</span>
|
|
32
|
+
<span
|
|
33
|
+
v-if="deprecated"
|
|
34
|
+
class="ff-api-tag ff-api-deprecated ff-label"
|
|
35
|
+
>deprecated</span>
|
|
36
|
+
</header>
|
|
25
37
|
|
|
26
|
-
|
|
38
|
+
<p
|
|
39
|
+
v-if="signature"
|
|
40
|
+
class="ff-api-signature"
|
|
41
|
+
>
|
|
42
|
+
<code>{{ signature }}</code>
|
|
43
|
+
</p>
|
|
27
44
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
45
|
+
<div class="ff-api-body">
|
|
46
|
+
<slot />
|
|
47
|
+
</div>
|
|
48
|
+
</section>
|
|
32
49
|
</template>
|
package/src/content/Card.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { VPLink } from '../internal'
|
|
2
|
+
import { VPLink } from '../internal';
|
|
3
3
|
|
|
4
4
|
defineProps<{
|
|
5
5
|
title: string
|
|
@@ -8,24 +8,30 @@ defineProps<{
|
|
|
8
8
|
link?: string
|
|
9
9
|
rel?: string
|
|
10
10
|
target?: string
|
|
11
|
-
}>()
|
|
11
|
+
}>();
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<template>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
<VPLink
|
|
16
|
+
class="ff-card"
|
|
17
|
+
:href="link"
|
|
18
|
+
:rel="rel"
|
|
19
|
+
:target="target"
|
|
20
|
+
:no-icon="true"
|
|
21
|
+
:tag="link ? 'a' : 'div'"
|
|
22
|
+
>
|
|
23
|
+
<span
|
|
24
|
+
v-if="icon"
|
|
25
|
+
class="ff-card-icon"
|
|
26
|
+
v-html="icon"
|
|
27
|
+
/>
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
<p class="ff-card-title">
|
|
30
|
+
{{ title }}
|
|
31
|
+
</p>
|
|
26
32
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
<div class="ff-card-body">
|
|
34
|
+
<slot />
|
|
35
|
+
</div>
|
|
36
|
+
</VPLink>
|
|
31
37
|
</template>
|
package/src/content/CardGrid.vue
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
withDefaults(defineProps<{ columns?: number | string }>(), {
|
|
2
|
+
withDefaults(defineProps<{ columns?: number | string }>(), {
|
|
3
|
+
columns: 2
|
|
4
|
+
});
|
|
3
5
|
</script>
|
|
4
6
|
|
|
5
7
|
<template>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
<div
|
|
9
|
+
class="ff-card-grid"
|
|
10
|
+
:style="{ '--ff-card-columns': columns }"
|
|
11
|
+
>
|
|
12
|
+
<slot />
|
|
13
|
+
</div>
|
|
9
14
|
</template>
|
package/src/content/Kbd.vue
CHANGED
package/src/content/Steps.vue
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { Theme } from 'vitepress'
|
|
2
|
-
import DefaultTheme from 'vitepress/theme'
|
|
1
|
+
import type { Theme } from 'vitepress';
|
|
2
|
+
import DefaultTheme from 'vitepress/theme';
|
|
3
3
|
|
|
4
|
-
import FfLayout from './layout/FfLayout.vue'
|
|
5
|
-
import Api from './content/Api.vue'
|
|
6
|
-
import Card from './content/Card.vue'
|
|
7
|
-
import CardGrid from './content/CardGrid.vue'
|
|
8
|
-
import Kbd from './content/Kbd.vue'
|
|
9
|
-
import Steps from './content/Steps.vue'
|
|
4
|
+
import FfLayout from './layout/FfLayout.vue';
|
|
5
|
+
import Api from './content/Api.vue';
|
|
6
|
+
import Card from './content/Card.vue';
|
|
7
|
+
import CardGrid from './content/CardGrid.vue';
|
|
8
|
+
import Kbd from './content/Kbd.vue';
|
|
9
|
+
import Steps from './content/Steps.vue';
|
|
10
10
|
|
|
11
|
-
import '../dist/style.css'
|
|
11
|
+
import '../dist/style.css';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Editorial VitePress theme.
|
|
@@ -21,23 +21,25 @@ const theme: Theme = {
|
|
|
21
21
|
extends: DefaultTheme,
|
|
22
22
|
Layout: FfLayout,
|
|
23
23
|
enhanceApp({ app }) {
|
|
24
|
-
app.component('Api', Api)
|
|
25
|
-
app.component('Card', Card)
|
|
26
|
-
app.component('CardGrid', CardGrid)
|
|
27
|
-
app.component('Kbd', Kbd)
|
|
28
|
-
app.component('Steps', Steps)
|
|
24
|
+
app.component('Api', Api);
|
|
25
|
+
app.component('Card', Card);
|
|
26
|
+
app.component('CardGrid', CardGrid);
|
|
27
|
+
app.component('Kbd', Kbd);
|
|
28
|
+
app.component('Steps', Steps);
|
|
29
29
|
}
|
|
30
|
-
}
|
|
30
|
+
};
|
|
31
31
|
|
|
32
|
-
export default theme
|
|
32
|
+
export default theme;
|
|
33
33
|
|
|
34
|
-
export { default as Api } from './content/Api.vue'
|
|
35
|
-
export { default as Card } from './content/Card.vue'
|
|
36
|
-
export { default as CardGrid } from './content/CardGrid.vue'
|
|
37
|
-
export { default as Kbd } from './content/Kbd.vue'
|
|
38
|
-
export { default as Steps } from './content/Steps.vue'
|
|
34
|
+
export { default as Api } from './content/Api.vue';
|
|
35
|
+
export { default as Card } from './content/Card.vue';
|
|
36
|
+
export { default as CardGrid } from './content/CardGrid.vue';
|
|
37
|
+
export { default as Kbd } from './content/Kbd.vue';
|
|
38
|
+
export { default as Steps } from './content/Steps.vue';
|
|
39
39
|
|
|
40
|
-
export {
|
|
40
|
+
export {
|
|
41
|
+
defaultLabels, useLabels, useThemeOptions
|
|
42
|
+
} from './composables/options';
|
|
41
43
|
|
|
42
44
|
export type {
|
|
43
45
|
BannerConfig,
|
|
@@ -50,4 +52,4 @@ export type {
|
|
|
50
52
|
ThemeConfig,
|
|
51
53
|
ThemeLabels,
|
|
52
54
|
ThemeOptions
|
|
53
|
-
} from './types'
|
|
55
|
+
} from './types';
|
package/src/internal.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// alias would otherwise import the theme index that imports them back. Nothing here reaches for an
|
|
6
6
|
// API the default theme does not export.
|
|
7
7
|
|
|
8
|
-
export { default as VPIcon } from 'vitepress/dist/client/theme-default/components/VPIcon.vue'
|
|
9
|
-
export { default as VPImage } from 'vitepress/dist/client/theme-default/components/VPImage.vue'
|
|
10
|
-
export { default as VPLink } from 'vitepress/dist/client/theme-default/components/VPLink.vue'
|
|
11
|
-
export { default as VPSponsors } from 'vitepress/dist/client/theme-default/components/VPSponsors.vue'
|
|
12
|
-
export { useLayout } from 'vitepress/dist/client/theme-default/composables/layout.js'
|
|
8
|
+
export { default as VPIcon } from 'vitepress/dist/client/theme-default/components/VPIcon.vue';
|
|
9
|
+
export { default as VPImage } from 'vitepress/dist/client/theme-default/components/VPImage.vue';
|
|
10
|
+
export { default as VPLink } from 'vitepress/dist/client/theme-default/components/VPLink.vue';
|
|
11
|
+
export { default as VPSponsors } from 'vitepress/dist/client/theme-default/components/VPSponsors.vue';
|
|
12
|
+
export { useLayout } from 'vitepress/dist/client/theme-default/composables/layout.js';
|
package/src/layout/FfLayout.vue
CHANGED
|
@@ -1,47 +1,58 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed, useSlots } from 'vue'
|
|
3
|
-
import DefaultTheme from 'vitepress/theme'
|
|
4
|
-
import FfBackToTop from '../components/FfBackToTop.vue'
|
|
5
|
-
import FfBanner from '../components/FfBanner.vue'
|
|
6
|
-
import FfDocMeta from '../components/FfDocMeta.vue'
|
|
7
|
-
import { useThemeOptions } from '../composables/options'
|
|
2
|
+
import { computed, useSlots } from 'vue';
|
|
3
|
+
import DefaultTheme from 'vitepress/theme';
|
|
4
|
+
import FfBackToTop from '../components/FfBackToTop.vue';
|
|
5
|
+
import FfBanner from '../components/FfBanner.vue';
|
|
6
|
+
import FfDocMeta from '../components/FfDocMeta.vue';
|
|
7
|
+
import { useThemeOptions } from '../composables/options';
|
|
8
8
|
|
|
9
|
-
const { Layout } = DefaultTheme
|
|
10
|
-
const options = useThemeOptions()
|
|
9
|
+
const { Layout } = DefaultTheme;
|
|
10
|
+
const options = useThemeOptions();
|
|
11
11
|
|
|
12
12
|
// Three slots carry the additions of this theme; every other slot the site passes in is forwarded
|
|
13
13
|
// untouched, so the whole default slot surface keeps working.
|
|
14
|
-
const owned = [
|
|
14
|
+
const owned = [
|
|
15
|
+
'layout-top',
|
|
16
|
+
'doc-before',
|
|
17
|
+
'layout-bottom'
|
|
18
|
+
];
|
|
15
19
|
|
|
16
|
-
const slots = useSlots()
|
|
17
|
-
const forwarded = computed(() => Object.keys(slots).filter((name) => !owned.includes(name)))
|
|
20
|
+
const slots = useSlots();
|
|
21
|
+
const forwarded = computed(() => Object.keys(slots).filter((name) => !owned.includes(name)));
|
|
18
22
|
</script>
|
|
19
23
|
|
|
20
24
|
<template>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
<div
|
|
26
|
+
class="ff-theme"
|
|
27
|
+
:data-nav-order="options.navOrder ?? 'search-first'"
|
|
28
|
+
:data-nav-sticky="options.navSticky === false ? 'false' : 'true'"
|
|
29
|
+
>
|
|
30
|
+
<Layout>
|
|
31
|
+
<template #layout-top>
|
|
32
|
+
<FfBanner />
|
|
33
|
+
<slot name="layout-top" />
|
|
34
|
+
</template>
|
|
31
35
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
<template #doc-before>
|
|
37
|
+
<FfDocMeta />
|
|
38
|
+
<slot name="doc-before" />
|
|
39
|
+
</template>
|
|
36
40
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
<template #layout-bottom>
|
|
42
|
+
<slot name="layout-bottom" />
|
|
43
|
+
<FfBackToTop />
|
|
44
|
+
</template>
|
|
41
45
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
<template
|
|
47
|
+
v-for="name in forwarded"
|
|
48
|
+
:key="name"
|
|
49
|
+
#[name]="data"
|
|
50
|
+
>
|
|
51
|
+
<slot
|
|
52
|
+
:name="name"
|
|
53
|
+
v-bind="data ?? {}"
|
|
54
|
+
/>
|
|
55
|
+
</template>
|
|
56
|
+
</Layout>
|
|
57
|
+
</div>
|
|
47
58
|
</template>
|
package/src/styles/_blocks.scss
CHANGED
package/src/styles/_code.scss
CHANGED
package/src/styles/_content.scss
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.ff-theme {
|
|
23
|
+
|
|
23
24
|
// ----------------------------------------------------------------------------------------- //
|
|
24
25
|
// Announcement bar
|
|
25
26
|
// ----------------------------------------------------------------------------------------- //
|
|
@@ -56,30 +57,35 @@
|
|
|
56
57
|
.ff-banner[data-variant="ink"] {
|
|
57
58
|
--ff-banner-from: #{mg.ref("color-ink")};
|
|
58
59
|
--ff-banner-to: #{mg.ref("color-ink-muted")};
|
|
60
|
+
|
|
59
61
|
color: #{mg.ref("color-paper")};
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
.ff-banner[data-variant="accent"] {
|
|
63
65
|
--ff-banner-from: #{mg.ref("color-accent")};
|
|
64
66
|
--ff-banner-to: #{mg.ref("color-accent-hover")};
|
|
67
|
+
|
|
65
68
|
color: #{mg.ref("color-accent-contrast")};
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
.ff-banner[data-variant="success"] {
|
|
69
72
|
--ff-banner-from: #{mg.ref("color-success")};
|
|
70
73
|
--ff-banner-to: #{mg.ref("color-ink")};
|
|
74
|
+
|
|
71
75
|
color: #{mg.ref("color-paper")};
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
.ff-banner[data-variant="warning"] {
|
|
75
79
|
--ff-banner-from: #{mg.ref("color-warning")};
|
|
76
80
|
--ff-banner-to: #{mg.ref("color-ink")};
|
|
81
|
+
|
|
77
82
|
color: #{mg.ref("color-paper")};
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
.ff-banner[data-variant="danger"] {
|
|
81
86
|
--ff-banner-from: #{mg.ref("color-danger")};
|
|
82
87
|
--ff-banner-to: #{mg.ref("color-ink")};
|
|
88
|
+
|
|
83
89
|
color: #{mg.ref("color-paper")};
|
|
84
90
|
}
|
|
85
91
|
|
|
@@ -283,7 +289,7 @@
|
|
|
283
289
|
margin: 0;
|
|
284
290
|
}
|
|
285
291
|
|
|
286
|
-
@media (
|
|
292
|
+
@media (width >= 768px) {
|
|
287
293
|
.ff-footer {
|
|
288
294
|
padding: 4rem 3rem 2.5rem;
|
|
289
295
|
}
|
|
@@ -348,7 +354,7 @@
|
|
|
348
354
|
color: #{mg.ref("color-ink-muted")};
|
|
349
355
|
}
|
|
350
356
|
|
|
351
|
-
@media (
|
|
357
|
+
@media (width <= 640px) {
|
|
352
358
|
.vp-doc .ff-card-grid {
|
|
353
359
|
grid-template-columns: minmax(0, 1fr);
|
|
354
360
|
}
|
package/src/styles/_doc.scss
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
.ff-theme {
|
|
16
|
-
@media (
|
|
16
|
+
@media (width >= 960px) {
|
|
17
17
|
.VPSidebar {
|
|
18
18
|
padding-left: var(--ff-frame);
|
|
19
19
|
width: calc(var(--ff-frame) + var(--vp-sidebar-width));
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
// The outline lives in a container of a fixed width, so the column that holds it must never be
|
|
40
40
|
// squeezed by the text: it would spill out of the band, past the bar above it.
|
|
41
41
|
|
|
42
|
-
@media (
|
|
42
|
+
@media (width >= 1280px) {
|
|
43
43
|
.VPDoc .aside {
|
|
44
44
|
flex: 0 0 auto;
|
|
45
45
|
width: 16rem;
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.vp-doc h2 {
|
|
92
|
+
|
|
92
93
|
// The gap between the section rule and the heading. The anchor hangs off the same value —
|
|
93
94
|
// the default theme sets its own `top` to match its own padding, and this theme changes
|
|
94
95
|
// that padding, so the two have to be declared once and read twice.
|
|
@@ -100,10 +101,10 @@
|
|
|
100
101
|
|
|
101
102
|
// The section rule fades out to the right rather than cutting the page in two.
|
|
102
103
|
border-image: linear-gradient(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
90deg,
|
|
105
|
+
#{mg.ref("color-rule-strong")},
|
|
106
|
+
transparent 85%
|
|
107
|
+
)
|
|
107
108
|
1;
|
|
108
109
|
font-size: #{mg.ref("size-h2")};
|
|
109
110
|
font-weight: 600;
|