Skip to content

Commit 4de54df

Browse files
committed
feat: enhance layout with navigation and banner components
1 parent e5c1dd2 commit 4de54df

1 file changed

Lines changed: 25 additions & 6 deletions

File tree

theme/index.tsx

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,36 @@
1+
import { useLang } from '@rspress/core/runtime';
12
import {
2-
HomeLayout as BasicHomeLayout
3+
Banner,
4+
HomeLayout as BasicHomeLayout,
5+
Layout as BasicLayout,
36
} from '@rspress/core/theme-original';
7+
import { NavIcon } from '@rstack-dev/doc-ui/nav-icon';
48
import { Tag } from './components/Tag';
59
import { ToolStack } from './components/tool-stack';
610

711
function HomeLayout() {
12+
return <BasicHomeLayout afterFeatures={<ToolStack />} />;
13+
}
14+
15+
const Layout = () => {
16+
const lang = useLang();
17+
818
return (
9-
<BasicHomeLayout
10-
afterFeatures={<ToolStack />}
19+
<BasicLayout
20+
beforeNavTitle={<NavIcon />}
21+
beforeNav={
22+
<Banner
23+
href="/"
24+
message={
25+
lang === 'en'
26+
? '🚧 Bloque documentation is under development'
27+
: '🚧 La documentacion de Bloque está en desarrollo'
28+
}
29+
/>
30+
}
1131
/>
1232
);
13-
}
33+
};
1434

1535
export * from '@rspress/core/theme-original';
16-
export { HomeLayout, Tag };
17-
36+
export { HomeLayout, Layout, Tag };

0 commit comments

Comments
 (0)