feat(theme): add site footer and marketing sections
- Add SiteFooter, rendered through the Layout bottom slot so it appears on every page type. themeConfig.footer is deliberately left unset: setting it would render the built-in HomeFooter as well, on the home page only. - Add a frontmatter-driven section system (advantages, contentGrid, techStack, cases and cta) with a single ordered array, so bands can be reordered or removed without touching code. - Bands render only when they have content, so an unfilled page degrades to its heading rather than showing empty boxes. - Add a SHOW_COPY_PLACEHOLDERS flag for drafting, false by default.
This commit is contained in:
14 files changed
+652
-3
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import type { Feature } from "@rspress/core"
|
||||
import { HomeFeature } from "@rspress/core/theme-original"
|
||||
import { arr } from "./types"
|
||||
|
||||
/**
|
||||
* Card grid used for both the homepage advantages and the products/services
|
||||
* grids. Delegates to the stock `HomeFeature`, which already handles `span`,
|
||||
* icons and the reveal animation — it accepts a `features` prop precisely so it
|
||||
* can be driven from somewhere other than page frontmatter.
|
||||
*/
|
||||
export function FeatureGrid({ items }: { items?: Feature[] }) {
|
||||
const features = arr<Feature>(items)
|
||||
if (!features) return null
|
||||
return <HomeFeature features={features} />
|
||||
}
|
||||
Reference in new issue
Block a user