@frontfactory/vitepress-theme 1.0.0
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/LICENSE.md +21 -0
- package/README.md +260 -0
- package/config.d.ts +6 -0
- package/config.js +54 -0
- package/dist/style.css +1709 -0
- package/package.json +84 -0
- package/src/components/FfBackToTop.vue +50 -0
- package/src/components/FfBanner.vue +74 -0
- package/src/components/FfDocMeta.vue +112 -0
- package/src/components/FfFeature.vue +44 -0
- package/src/components/FfFooter.vue +40 -0
- package/src/components/FfHero.vue +171 -0
- package/src/composables/options.ts +48 -0
- package/src/content/Api.vue +32 -0
- package/src/content/Card.vue +31 -0
- package/src/content/CardGrid.vue +9 -0
- package/src/content/Kbd.vue +3 -0
- package/src/content/Steps.vue +5 -0
- package/src/index.ts +52 -0
- package/src/internal.ts +10 -0
- package/src/layout/FfLayout.vue +41 -0
- package/src/styles/_base.scss +121 -0
- package/src/styles/_blocks.scss +103 -0
- package/src/styles/_code.scss +163 -0
- package/src/styles/_content.scss +374 -0
- package/src/styles/_doc.scss +416 -0
- package/src/styles/_home.scss +429 -0
- package/src/styles/_motion.scss +231 -0
- package/src/styles/_nav.scss +224 -0
- package/src/styles/_sidebar.scss +127 -0
- package/src/styles/_theme.scss +8 -0
- package/src/styles/_tokens.scss +235 -0
- package/src/styles/index.scss +19 -0
- package/src/types.ts +96 -0
package/src/types.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { DefaultTheme } from 'vitepress/theme'
|
|
2
|
+
|
|
3
|
+
export interface BannerConfig {
|
|
4
|
+
/** Stable id — changing it brings the banner back for readers who dismissed the previous one. */
|
|
5
|
+
id: string
|
|
6
|
+
/** Text shown in the banner. Inline HTML is allowed. */
|
|
7
|
+
text: string
|
|
8
|
+
/** Optional link the whole banner points to. */
|
|
9
|
+
link?: string
|
|
10
|
+
/** Label of the trailing call to action. Defaults to `Read more`. */
|
|
11
|
+
linkText?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface FooterLink {
|
|
15
|
+
text: string
|
|
16
|
+
link: string
|
|
17
|
+
rel?: string
|
|
18
|
+
target?: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface FooterColumn {
|
|
22
|
+
title: string
|
|
23
|
+
items: FooterLink[]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface MetaConfig {
|
|
27
|
+
/** Estimated reading time. Defaults to `true`. */
|
|
28
|
+
readingTime?: boolean
|
|
29
|
+
/** Words read per minute used by the estimate. Defaults to `200`. */
|
|
30
|
+
wordsPerMinute?: number
|
|
31
|
+
/** Section the page belongs to, taken from the sidebar. Defaults to `true`. */
|
|
32
|
+
section?: boolean
|
|
33
|
+
/** Relative last-updated stamp. Defaults to `true`, and needs `lastUpdated` in the site config. */
|
|
34
|
+
lastUpdated?: boolean
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Every user-facing string this theme adds on top of the default one. They sit in `themeConfig`,
|
|
39
|
+
* so a multi-language site declares them per locale like any other default-theme label.
|
|
40
|
+
*
|
|
41
|
+
* `{0}` in a label is replaced by the value it describes.
|
|
42
|
+
*/
|
|
43
|
+
export interface ThemeLabels {
|
|
44
|
+
/** Accessible name of the banner dismiss button. Defaults to `Dismiss announcement`. */
|
|
45
|
+
bannerDismiss?: string
|
|
46
|
+
/** Reading-time estimate; `{0}` is the number of minutes. Defaults to `{0} min read`. */
|
|
47
|
+
readingTime?: string
|
|
48
|
+
/** Last-updated stamp; `{0}` is the relative time. Defaults to `Updated {0}`. */
|
|
49
|
+
lastUpdated?: string
|
|
50
|
+
/** Heading of the hero install panel. Defaults to `Install`. */
|
|
51
|
+
heroInstall?: string
|
|
52
|
+
/** Hero copy button. Defaults to `Copy`. */
|
|
53
|
+
heroCopy?: string
|
|
54
|
+
/** Hero copy button once the command is on the clipboard. Defaults to `Copied`. */
|
|
55
|
+
heroCopied?: string
|
|
56
|
+
/** Accessible name of the hero copy button; `{0}` is the command. Defaults to `Copy {0}`. */
|
|
57
|
+
heroCopyLabel?: string
|
|
58
|
+
/** Visible text of the back-to-top control. Defaults to `Top`. */
|
|
59
|
+
backToTop?: string
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** One entry of the colophon strip printed under the hero. */
|
|
63
|
+
export interface HeroMetaItem {
|
|
64
|
+
label: string
|
|
65
|
+
value: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The two additions this theme makes to the standard `layout: home` hero frontmatter. Both are
|
|
70
|
+
* optional; everything else on `hero` stays the default theme's.
|
|
71
|
+
*/
|
|
72
|
+
export interface HeroExtras {
|
|
73
|
+
/** Install line, printed in a panel beside the headline when the hero carries no image. */
|
|
74
|
+
command?: string
|
|
75
|
+
/** Colophon strip under the hero. */
|
|
76
|
+
meta?: HeroMetaItem[]
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface ThemeOptions {
|
|
80
|
+
/** Dismissible announcement bar above the navigation. */
|
|
81
|
+
banner?: BannerConfig
|
|
82
|
+
/** Kicker line printed above every page title. */
|
|
83
|
+
meta?: MetaConfig | false
|
|
84
|
+
/** Link columns added to the site footer. */
|
|
85
|
+
footerColumns?: FooterColumn[]
|
|
86
|
+
/** Floating back-to-top control. Defaults to `true`. */
|
|
87
|
+
backToTop?: boolean
|
|
88
|
+
/** Overrides for the strings this theme adds. Declare them per locale to translate them. */
|
|
89
|
+
labels?: ThemeLabels
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface ThemeConfig extends DefaultTheme.Config {
|
|
93
|
+
ff?: ThemeOptions
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type { DefaultTheme }
|