Files
Liu 718bd2d540 feat(doc-viewer): rebuild navigation and docs route
- split the root layout into navbar + docs shell with per-locale docs layouts
- serve docs pages under /{locale}/docs and add home/docs landing redirects
- rebuild the navbar with nova buttons, a language menu and a theme switch
- add the widgets index page and keep the sidebar in the docs layout
- include the nav/widgets-index design spec in docs/superpowers/specs/
2026-11-08 00:20:42 +08:00

59 lines
1.9 KiB
C

#include "page.tsx.h"
#include "page.h"
typedef struct {
zh_cn_docs_devtools_css_modules_page_react_t base;
// Add additional states to your component here
// ...
} zh_cn_docs_devtools_css_modules_page_t;
static void zh_cn_docs_devtools_css_modules_page_init(ui_widget_t *w)
{
ui_widget_add_data(w, zh_cn_docs_devtools_css_modules_page_proto,
sizeof(zh_cn_docs_devtools_css_modules_page_t));
zh_cn_docs_devtools_css_modules_page_react_init(w);
// Write the initialization code for your component here
// such as state initialization, event binding, etc
// ...
zh_cn_docs_devtools_css_modules_page_update(w);
}
static zh_cn_docs_devtools_css_modules_page_t *
zh_cn_docs_devtools_css_modules_page_get(ui_widget_t *w)
{
return ui_widget_get_data(w,
zh_cn_docs_devtools_css_modules_page_proto);
}
static void zh_cn_docs_devtools_css_modules_page_destroy(ui_widget_t *w)
{
// Write code here to destroy the relevant resources of the component
// ...
zh_cn_docs_devtools_css_modules_page_react_destroy(w);
}
void zh_cn_docs_devtools_css_modules_page_update(ui_widget_t *w)
{
zh_cn_docs_devtools_css_modules_page_react_update(w);
// Write code here to update other content of your component
// ...
}
ui_widget_t *ui_create_zh_cn_docs_devtools_css_modules_page(void)
{
return ui_create_widget_with_prototype(
zh_cn_docs_devtools_css_modules_page_proto);
}
void ui_register_zh_cn_docs_devtools_css_modules_page(void)
{
zh_cn_docs_devtools_css_modules_page_init_prototype();
zh_cn_docs_devtools_css_modules_page_proto->init =
zh_cn_docs_devtools_css_modules_page_init;
zh_cn_docs_devtools_css_modules_page_proto->destroy =
zh_cn_docs_devtools_css_modules_page_destroy;
}