create-lupine 1.0.31 → 1.3.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/README.md +31 -0
- package/index.js +238 -112
- package/package.json +1 -1
- package/templates/common/.agents/skills/lupine-framework/SKILL.md +63 -0
- package/templates/common/.agents/skills/lupine-framework/references/backend-api.md +113 -0
- package/templates/common/.agents/skills/lupine-framework/references/icon-handling.md +71 -0
- package/templates/common/.agents/skills/lupine-framework/references/mobile-interactions.md +29 -0
- package/templates/common/.agents/skills/lupine-framework/references/native-apps.md +190 -0
- package/templates/common/.agents/skills/lupine-framework/references/navigation-and-routing.md +55 -0
- package/templates/common/.agents/skills/lupine-framework/references/reactivity-and-state.md +108 -0
- package/templates/common/.agents/skills/lupine-framework/references/styling-and-themes.md +121 -0
- package/templates/common/.env.mobile +4 -3
- package/templates/common/_env +10 -4
- package/templates/common/apps/server/README.md +10 -0
- package/templates/common/dev/cp-folder.js +9 -4
- package/templates/lupine-template-cv-starter/README.md +37 -0
- package/templates/lupine-template-cv-starter/app/package.json +20 -0
- package/templates/lupine-template-cv-starter/app/src/app.tsx +6 -0
- package/templates/lupine-template-cv-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-cv-starter/app/src/index.test.tsx +71 -0
- package/templates/lupine-template-cv-starter/app/src/index.web.tsx +28 -0
- package/templates/lupine-template-cv-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-cv-starter/lupine.json +8 -7
- package/templates/lupine-template-cv-starter/web/src/index.html +9 -2
- package/templates/lupine-template-cv-starter/web/src/index.tsx +9 -23
- package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.html +9 -2
- package/templates/lupine-template-cv-starter/web/src/lupine-template-cv-starter/index.tsx +4 -29
- package/templates/lupine-template-doc-starter/README.md +37 -0
- package/templates/lupine-template-doc-starter/app/package.json +20 -0
- package/templates/lupine-template-doc-starter/app/src/app.tsx +6 -0
- package/templates/lupine-template-doc-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-doc-starter/app/src/index.test.tsx +78 -0
- package/templates/lupine-template-doc-starter/app/src/index.web.tsx +28 -0
- package/templates/lupine-template-doc-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-doc-starter/lupine.json +8 -7
- package/templates/lupine-template-doc-starter/web/src/index.html +9 -2
- package/templates/lupine-template-doc-starter/web/src/index.tsx +9 -23
- package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.html +9 -2
- package/templates/lupine-template-doc-starter/web/src/lupine-template-doc-starter/index.tsx +4 -29
- package/templates/lupine-template-fullstack-note/README.md +83 -0
- package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/api/package.json +1 -1
- package/templates/lupine-template-fullstack-note/api/resources/install.mysql.sql +32 -0
- package/templates/lupine-template-fullstack-note/api/resources/install.sqlite.sql +27 -0
- package/templates/lupine-template-fullstack-note/api/src/service/answer.ts +39 -0
- package/templates/lupine-template-fullstack-note/api/src/service/api.ts +52 -0
- package/templates/lupine-template-fullstack-note/api/src/service/db.ts +78 -0
- package/templates/lupine-template-fullstack-note/api/src/service/notes-api.ts +86 -0
- package/templates/lupine-template-fullstack-note/api/src/service/root-api.ts +19 -0
- package/templates/lupine-template-fullstack-note/api/src/service/user-api.ts +182 -0
- package/templates/lupine-template-fullstack-note/app/package.json +19 -0
- package/templates/lupine-template-fullstack-note/app/src/app.tsx +75 -0
- package/templates/lupine-template-fullstack-note/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-fullstack-note/app/src/index.test.tsx +373 -0
- package/templates/lupine-template-fullstack-note/app/src/index.web.tsx +20 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/components.tsx +65 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/details.tsx +38 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/discover.tsx +25 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/home.tsx +76 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/inbox.tsx +49 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/login.tsx +54 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/me.tsx +32 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/notes.tsx +128 -0
- package/templates/lupine-template-fullstack-note/app/src/pages/settings.tsx +45 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/AppMenu.tsx +44 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/api.ts +159 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/data.ts +20 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/locales/ja.ts +80 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/locales/zh-CN.ts +80 -0
- package/templates/lupine-template-fullstack-note/app/src/shell/texts.ts +14 -0
- package/templates/lupine-template-fullstack-note/app/tsconfig.json +17 -0
- package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/lupine.json +4 -2
- package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/web/package.json +1 -1
- package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/web/src/index.html +10 -3
- package/templates/lupine-template-fullstack-note/web/src/index.tsx +15 -0
- package/templates/lupine-template-fullstack-starter/README.md +70 -0
- package/templates/lupine-template-fullstack-starter/api/package.json +10 -0
- package/templates/lupine-template-fullstack-starter/api/resources/install.mysql.sql +107 -0
- package/templates/lupine-template-fullstack-starter/api/resources/install.sqlite.sql +75 -0
- package/templates/lupine-template-fullstack-starter/api/src/lang/api-lang-en.ts +39 -0
- package/templates/lupine-template-fullstack-starter/api/src/lang/api-lang-zh-cn.ts +37 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/admin-api.ts +139 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/api.ts +111 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/contact-api.ts +50 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/file-api-base.ts +30 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/root-api.ts +28 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/send-email.ts +47 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/setting-api.ts +60 -0
- package/templates/lupine-template-fullstack-starter/api/src/service/user-api.ts +1046 -0
- package/templates/lupine-template-fullstack-starter/app/assets/sample.png +0 -0
- package/templates/lupine-template-fullstack-starter/app/package.json +20 -0
- package/templates/lupine-template-fullstack-starter/app/src/app.tsx +76 -0
- package/templates/lupine-template-fullstack-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-fullstack-starter/app/src/index.test.tsx +276 -0
- package/templates/lupine-template-fullstack-starter/app/src/index.web.tsx +28 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/about.tsx +27 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/contact.tsx +41 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/favorite.tsx +27 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/home.tsx +63 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/login.tsx +63 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/mine.tsx +44 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/profile.tsx +58 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/register.tsx +48 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/reset-password.tsx +41 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/settings.tsx +33 -0
- package/templates/lupine-template-fullstack-starter/app/src/pages/story.tsx +46 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/api.ts +127 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/parts.tsx +100 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/stories.ts +65 -0
- package/templates/lupine-template-fullstack-starter/app/src/shell/texts.ts +79 -0
- package/templates/lupine-template-fullstack-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-fullstack-starter/lupine.json +31 -0
- package/templates/lupine-template-fullstack-starter/web/assets/android-chrome-192x192.png +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/apple-touch-icon.png +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/favicon-16x16.png +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/favicon-32x32.png +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/favicon.ico +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/icons-font/License-carbon-icons.txt +71 -0
- package/templates/lupine-template-fullstack-starter/web/assets/icons-font/License-material-design.txt +20 -0
- package/templates/lupine-template-fullstack-starter/web/assets/icons-font/i-font.woff2 +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/icons-font/sample.html +124 -0
- package/templates/lupine-template-fullstack-starter/web/assets/icons-font/style.css +103 -0
- package/templates/lupine-template-fullstack-starter/web/assets/lupine-flower.png +0 -0
- package/templates/lupine-template-fullstack-starter/web/assets/lupine.svg +71 -0
- package/templates/lupine-template-fullstack-starter/web/assets/site.webmanifest +14 -0
- package/templates/lupine-template-fullstack-starter/web/icons-font.config.js +129 -0
- package/templates/{lupine-template-responsive-starter/api → lupine-template-fullstack-starter/web}/package.json +1 -1
- package/templates/lupine-template-fullstack-starter/web/src/admin/admin-patch.tsx +34 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin/components/home-search-component.tsx +125 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin/components/story-card.tsx +105 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin/components/story-list.tsx +105 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin/components/story-props.ts +34 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin/index.html +23 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin/index.tsx +49 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-cfg.tsx +144 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-item-edit.tsx +20 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-item-list.tsx +23 -0
- package/templates/lupine-template-fullstack-starter/web/src/admin/pages/admin-user.tsx +145 -0
- package/templates/lupine-template-fullstack-starter/web/src/index.html +28 -0
- package/templates/lupine-template-fullstack-starter/web/src/index.tsx +16 -0
- package/templates/lupine-template-fullstack-starter/web/src/services/fetch-data.ts +37 -0
- package/templates/lupine-template-fullstack-starter/web/src/styles/base-css.ts +14 -0
- package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/global.css +10 -57
- package/templates/{lupine-template-hello-world → lupine-template-fullstack-starter}/web/src/styles/theme.ts +2 -1
- package/templates/lupine-template-responsive-starter/README.md +51 -0
- package/templates/lupine-template-responsive-starter/app/package.json +19 -0
- package/templates/lupine-template-responsive-starter/app/src/app.tsx +80 -0
- package/templates/lupine-template-responsive-starter/app/src/index.native.tsx +4 -0
- package/templates/lupine-template-responsive-starter/app/src/index.test.tsx +283 -0
- package/templates/lupine-template-responsive-starter/app/src/index.web.tsx +31 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/about.tsx +23 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/finance.tsx +48 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/mine.tsx +60 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/not-found.tsx +9 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/note-detail.tsx +43 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/note-edit.tsx +45 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/note-search.tsx +62 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/notes.tsx +71 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/settings.tsx +55 -0
- package/templates/lupine-template-responsive-starter/app/src/pages/tools.tsx +112 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/icons.ts +7 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/layout.ts +18 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/locales/zh-CN.ts +89 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/menu.tsx +81 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/nav.ts +12 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/store.ts +72 -0
- package/templates/lupine-template-responsive-starter/app/src/shell/texts.ts +11 -0
- package/templates/lupine-template-responsive-starter/app/tsconfig.json +17 -0
- package/templates/lupine-template-responsive-starter/lupine.json +7 -6
- package/templates/lupine-template-responsive-starter/web/src/index.html +9 -2
- package/templates/lupine-template-responsive-starter/web/src/index.tsx +9 -34
- package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.html +12 -6
- package/templates/lupine-template-responsive-starter/web/src/lupine-template-responsive-starter/index.tsx +12 -31
- package/templates/common/AI_CONTEXT.md +0 -1002
- package/templates/common/apps/server/src/app-loader.ts +0 -4
- package/templates/lupine-template-cv-starter/api/package.json +0 -6
- package/templates/lupine-template-cv-starter/api/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-cv-starter/api/src/index.ts +0 -15
- package/templates/lupine-template-cv-starter/web/src/styles/base-css.ts +0 -15
- package/templates/lupine-template-doc-starter/api/package.json +0 -6
- package/templates/lupine-template-doc-starter/api/resources/config_default.json +0 -6
- package/templates/lupine-template-doc-starter/api/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-doc-starter/api/src/index.ts +0 -15
- package/templates/lupine-template-doc-starter/api/src/resources/config_default.json +0 -6
- package/templates/lupine-template-doc-starter/api/src/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-doc-starter/web/src/client-env-keys.ts +0 -5
- package/templates/lupine-template-doc-starter/web/src/styles/base-css.ts +0 -15
- package/templates/lupine-template-hello-world/api/resources/config_default.json +0 -6
- package/templates/lupine-template-hello-world/api/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-hello-world/api/src/service/root-api.ts +0 -18
- package/templates/lupine-template-hello-world/web/src/index.tsx +0 -73
- package/templates/lupine-template-hello-world/web/src/styles/app.css +0 -0
- package/templates/lupine-template-hello-world/web/src/styles/base-css.ts +0 -1
- package/templates/lupine-template-responsive-starter/api/resources/config_default.json +0 -6
- package/templates/lupine-template-responsive-starter/api/resources/install.sqlite.sql +0 -4
- package/templates/lupine-template-responsive-starter/api/src/service/root-api.ts +0 -18
- package/templates/lupine-template-responsive-starter/web/src/app-icons.ts +0 -76
- package/templates/lupine-template-responsive-starter/web/src/components/input-history-component.tsx +0 -93
- package/templates/lupine-template-responsive-starter/web/src/components/mine-about-page.tsx +0 -86
- package/templates/lupine-template-responsive-starter/web/src/components/mine-premium-page.tsx +0 -80
- package/templates/lupine-template-responsive-starter/web/src/components/mine-settings-page.tsx +0 -220
- package/templates/lupine-template-responsive-starter/web/src/components/mobile-top-search-menu.tsx +0 -119
- package/templates/lupine-template-responsive-starter/web/src/components/note-detail.tsx +0 -116
- package/templates/lupine-template-responsive-starter/web/src/components/note-edit.tsx +0 -154
- package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx +0 -193
- package/templates/lupine-template-responsive-starter/web/src/components/search-input.tsx +0 -95
- package/templates/lupine-template-responsive-starter/web/src/components/side-menu-content.tsx +0 -182
- package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx +0 -52
- package/templates/lupine-template-responsive-starter/web/src/pages/about-page.tsx +0 -43
- package/templates/lupine-template-responsive-starter/web/src/pages/finance-page.tsx +0 -46
- package/templates/lupine-template-responsive-starter/web/src/pages/home-page.tsx +0 -452
- package/templates/lupine-template-responsive-starter/web/src/pages/mine-page.tsx +0 -325
- package/templates/lupine-template-responsive-starter/web/src/pages/tools-page.tsx +0 -46
- package/templates/lupine-template-responsive-starter/web/src/services/local-notes-service.ts +0 -87
- package/templates/lupine-template-responsive-starter/web/src/services/mine-service.ts +0 -45
- package/templates/lupine-template-responsive-starter/web/src/styles/app.css +0 -0
- package/templates/lupine-template-responsive-starter/web/src/styles/base-css.ts +0 -65
- package/templates/lupine-template-responsive-starter/web/src/styles/global.css +0 -2130
- package/templates/lupine-template-responsive-starter/web/src/styles/theme.ts +0 -16
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/01-experience/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/02-projects/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/03-skills/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/04-education/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/en/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/01-experience/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/02-projects/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/03-skills/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/04-education/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/markdown/zh/index.md +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/01-experience/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/02-projects/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/03-skills/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/04-education/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/en/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/markdown-config.ts +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/01-experience/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/02-projects/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/03-skills/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/04-education/index.html +0 -0
- /package/templates/lupine-template-cv-starter/{web → app}/src/markdown-built/zh/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/essentials/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/essentials/list.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/guide/install.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/guide/started.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/en/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/essentials/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/essentials/list.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/guide/install.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/guide/started.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/markdown/zh/index.md +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/essentials/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/essentials/list.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/guide/install.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/guide/started.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/en/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/markdown-config.ts +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/essentials/index.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/essentials/list.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/guide/install.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/guide/started.html +0 -0
- /package/templates/lupine-template-doc-starter/{web → app}/src/markdown-built/zh/index.html +0 -0
- /package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/api/src/index.ts +0 -0
- /package/templates/{lupine-template-hello-world → lupine-template-fullstack-note}/web/assets/favicon.ico +0 -0
- /package/templates/{lupine-template-cv-starter → lupine-template-fullstack-starter}/api/resources/config_default.json +0 -0
- /package/templates/{lupine-template-responsive-starter → lupine-template-fullstack-starter}/api/src/index.ts +0 -0
- /package/templates/{lupine-template-cv-starter/web/src → lupine-template-fullstack-starter/web/src/models}/client-env-keys.ts +0 -0
package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import { CssProps, HeaderWithBackFrame, HtmlVar, RefProps, SliderFrame, SliderFrameHookProps } from 'lupine.components';
|
|
2
|
-
import { SearchInput, SearchInputHookProps } from './search-input';
|
|
3
|
-
import { InputHistoryComponent, addHistoryItem } from './input-history-component';
|
|
4
|
-
import { LocalNoteProps, LocalNotesService } from '../services/local-notes-service';
|
|
5
|
-
import { NoteDetailComponent } from './note-detail';
|
|
6
|
-
import { clearHistoryList } from './input-history-component';
|
|
7
|
-
|
|
8
|
-
const extractText = (html: string) => {
|
|
9
|
-
const tmp = document.createElement('DIV');
|
|
10
|
-
tmp.innerHTML = html;
|
|
11
|
-
return tmp.textContent || tmp.innerText || '';
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const NoteSearchComponent = (props: { sliderFrameHook: SliderFrameHookProps }) => {
|
|
15
|
-
const listDom = new HtmlVar('');
|
|
16
|
-
const historyDom = new HtmlVar('');
|
|
17
|
-
|
|
18
|
-
const searchInputHook: SearchInputHookProps = {};
|
|
19
|
-
// this is the inner slide hook for editing from search results
|
|
20
|
-
const subSliderHook: SliderFrameHookProps = {};
|
|
21
|
-
|
|
22
|
-
const historyKey = 'note-search';
|
|
23
|
-
|
|
24
|
-
const onSearch = (value?: string) => {
|
|
25
|
-
const val = (value || '').trim();
|
|
26
|
-
if (val) {
|
|
27
|
-
addHistoryItem(historyKey, val);
|
|
28
|
-
hideHistory();
|
|
29
|
-
} else {
|
|
30
|
-
showHistory();
|
|
31
|
-
}
|
|
32
|
-
refreshList(val);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const onClearSearch = () => {
|
|
36
|
-
onSearch('');
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const showHistory = () => {
|
|
40
|
-
historyDom.value = (
|
|
41
|
-
<InputHistoryComponent
|
|
42
|
-
historyKey={historyKey}
|
|
43
|
-
onClearHistory={() => {
|
|
44
|
-
clearHistoryList(historyKey);
|
|
45
|
-
showHistory();
|
|
46
|
-
}}
|
|
47
|
-
onItemClick={(item) => {
|
|
48
|
-
searchInputHook.setValue!(item);
|
|
49
|
-
onSearch(item);
|
|
50
|
-
}}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const hideHistory = () => {
|
|
56
|
-
historyDom.value = '';
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const onViewNote = (note: LocalNoteProps) => {
|
|
60
|
-
subSliderHook.load!(
|
|
61
|
-
<NoteDetailComponent
|
|
62
|
-
note={note}
|
|
63
|
-
sliderFrameHook={subSliderHook}
|
|
64
|
-
onSaved={() => {
|
|
65
|
-
// We re-query the note values after saving. Easiest is to trigger search again.
|
|
66
|
-
const val = document.querySelector('.search-input .search-in-input') as HTMLInputElement;
|
|
67
|
-
if (val) onSearch(val.value);
|
|
68
|
-
}}
|
|
69
|
-
/>
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const refreshList = (query: string) => {
|
|
74
|
-
if (!query) {
|
|
75
|
-
listDom.value = '';
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const allNotes = LocalNotesService.getAllNotes();
|
|
80
|
-
const filteredNotes = allNotes.filter(
|
|
81
|
-
(n) =>
|
|
82
|
-
n.title.toLowerCase().includes(query.toLowerCase()) || n.content.toLowerCase().includes(query.toLowerCase())
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
if (filteredNotes.length === 0) {
|
|
86
|
-
listDom.value = (
|
|
87
|
-
<div
|
|
88
|
-
class='note-empty-state'
|
|
89
|
-
style={{ marginTop: '40px', textAlign: 'center', color: 'var(--secondary-color)' }}
|
|
90
|
-
>
|
|
91
|
-
No search results
|
|
92
|
-
</div>
|
|
93
|
-
);
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
listDom.value = (
|
|
98
|
-
<div class='note-list-container' style={{ paddingTop: '16px' }}>
|
|
99
|
-
{filteredNotes.map((note) => (
|
|
100
|
-
<div class='note-card-wrapper search-result-card-wrapper'>
|
|
101
|
-
<div class='note-card row-box search-result-card' onClick={() => onViewNote(note)}>
|
|
102
|
-
<div class='note-card-content flex-1'>
|
|
103
|
-
<div class='note-card-title'>{note.title}</div>
|
|
104
|
-
<div class='note-card-preview ellipsis'>{extractText(note.content)}</div>
|
|
105
|
-
<div class='note-card-date'>{new Date(note.updatedAt).toLocaleString()}</div>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
))}
|
|
110
|
-
</div>
|
|
111
|
-
);
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
const css: CssProps = {
|
|
115
|
-
height: '100%',
|
|
116
|
-
display: 'flex',
|
|
117
|
-
flexDirection: 'column',
|
|
118
|
-
overflowY: 'auto',
|
|
119
|
-
backgroundColor: 'var(--primary-bg-color)',
|
|
120
|
-
padding: '0 16px',
|
|
121
|
-
|
|
122
|
-
'.search-result-card-wrapper': {
|
|
123
|
-
marginBottom: '16px',
|
|
124
|
-
borderRadius: '12px',
|
|
125
|
-
overflow: 'hidden',
|
|
126
|
-
boxShadow: '0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05)',
|
|
127
|
-
backgroundColor: 'var(--secondary-bg-color)',
|
|
128
|
-
},
|
|
129
|
-
'.search-result-card': {
|
|
130
|
-
backgroundColor: 'var(--primary-bg-color)',
|
|
131
|
-
borderRadius: '12px',
|
|
132
|
-
padding: '16px',
|
|
133
|
-
cursor: 'pointer',
|
|
134
|
-
alignItems: 'center',
|
|
135
|
-
transition: 'transform 0.2s ease, box-shadow 0.2s ease',
|
|
136
|
-
'&:active': {
|
|
137
|
-
transform: 'scale(0.98)',
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
'.note-card-title': {
|
|
141
|
-
fontSize: '16px',
|
|
142
|
-
fontWeight: 'bold',
|
|
143
|
-
color: 'var(--primary-color)',
|
|
144
|
-
marginBottom: '4px',
|
|
145
|
-
},
|
|
146
|
-
'.note-card-preview': {
|
|
147
|
-
fontSize: '14px',
|
|
148
|
-
color: 'var(--secondary-color)',
|
|
149
|
-
marginBottom: '6px',
|
|
150
|
-
},
|
|
151
|
-
'.note-card-date': {
|
|
152
|
-
fontSize: '12px',
|
|
153
|
-
color: 'var(--secondary-color)',
|
|
154
|
-
opacity: 0.8,
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
const ref: RefProps = {
|
|
159
|
-
onLoad: async () => {
|
|
160
|
-
showHistory();
|
|
161
|
-
// focus input
|
|
162
|
-
const input = ref.$('.search-in-input') as HTMLInputElement;
|
|
163
|
-
if (input) {
|
|
164
|
-
requestAnimationFrame(() => input.focus());
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
const headerTitle = (
|
|
170
|
-
<SearchInput
|
|
171
|
-
placeholder='Search title or content...'
|
|
172
|
-
onSearch={onSearch}
|
|
173
|
-
onClear={onClearSearch}
|
|
174
|
-
onFocus={showHistory}
|
|
175
|
-
class='w-100p'
|
|
176
|
-
hook={searchInputHook}
|
|
177
|
-
/>
|
|
178
|
-
);
|
|
179
|
-
|
|
180
|
-
return (
|
|
181
|
-
<HeaderWithBackFrame
|
|
182
|
-
title={headerTitle}
|
|
183
|
-
right={<span></span>}
|
|
184
|
-
onBack={(event) => props.sliderFrameHook.close!(event)}
|
|
185
|
-
>
|
|
186
|
-
<div ref={ref} css={css} class='note-search-page'>
|
|
187
|
-
<SliderFrame hook={subSliderHook} />
|
|
188
|
-
{historyDom.node}
|
|
189
|
-
{listDom.node}
|
|
190
|
-
</div>
|
|
191
|
-
</HeaderWithBackFrame>
|
|
192
|
-
);
|
|
193
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { bindGlobalStyle, CssProps, RefProps } from 'lupine.components';
|
|
2
|
-
|
|
3
|
-
export interface SearchInputHookProps {
|
|
4
|
-
setValue?: (value: string) => void;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface InputWithClearProps {
|
|
8
|
-
placeholder?: string;
|
|
9
|
-
onSearch: (value: string) => void;
|
|
10
|
-
onClear?: () => void;
|
|
11
|
-
onFocus?: () => void;
|
|
12
|
-
onBlur?: () => void;
|
|
13
|
-
class?: string;
|
|
14
|
-
searchIcon?: string;
|
|
15
|
-
hook?: SearchInputHookProps;
|
|
16
|
-
}
|
|
17
|
-
export const SearchInput = (props: InputWithClearProps) => {
|
|
18
|
-
const css: CssProps = {
|
|
19
|
-
display: 'flex',
|
|
20
|
-
flex: 1,
|
|
21
|
-
position: 'relative',
|
|
22
|
-
fontSize: '16px',
|
|
23
|
-
'.search-in-input': {
|
|
24
|
-
flex: 1,
|
|
25
|
-
paddingRight: '30px',
|
|
26
|
-
height: '32px',
|
|
27
|
-
padding: '4px 30px 4px 12px',
|
|
28
|
-
borderRadius: '16px',
|
|
29
|
-
border: 'none',
|
|
30
|
-
backgroundColor: 'var(--secondary-bg-color)',
|
|
31
|
-
color: 'var(--primary-color)',
|
|
32
|
-
outline: 'none',
|
|
33
|
-
},
|
|
34
|
-
'.search-in-search, .search-in-clear': {
|
|
35
|
-
position: 'absolute',
|
|
36
|
-
top: '50%',
|
|
37
|
-
transform: 'translateY(-50%)',
|
|
38
|
-
cursor: 'pointer',
|
|
39
|
-
display: 'flex',
|
|
40
|
-
alignItems: 'center',
|
|
41
|
-
justifyContent: 'center',
|
|
42
|
-
color: 'var(--secondary-color)',
|
|
43
|
-
},
|
|
44
|
-
'.search-in-search': {
|
|
45
|
-
right: '12px',
|
|
46
|
-
},
|
|
47
|
-
'.search-in-clear': {
|
|
48
|
-
display: 'none',
|
|
49
|
-
right: '34px',
|
|
50
|
-
},
|
|
51
|
-
'input.search-in-input:not(:placeholder-shown) + .search-in-clear': {
|
|
52
|
-
display: 'flex',
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
bindGlobalStyle('search-input-component', css);
|
|
56
|
-
|
|
57
|
-
const ref: RefProps = {};
|
|
58
|
-
const onSearch = () => {
|
|
59
|
-
const value = ref.$('.search-in-input').value;
|
|
60
|
-
props.onSearch(value);
|
|
61
|
-
};
|
|
62
|
-
const onClear = () => {
|
|
63
|
-
ref.$('.search-in-input').value = '';
|
|
64
|
-
props.onClear?.();
|
|
65
|
-
};
|
|
66
|
-
if (props.hook) {
|
|
67
|
-
props.hook.setValue = (value: string) => {
|
|
68
|
-
ref.$('input.search-in-input').value = value;
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
return (
|
|
72
|
-
<div ref={ref} class={'search-input-component ' + (props.class || '')}>
|
|
73
|
-
<input
|
|
74
|
-
type='text'
|
|
75
|
-
maxLength={30}
|
|
76
|
-
spellcheck={false}
|
|
77
|
-
class='search-in-input input-base'
|
|
78
|
-
placeholder={props.placeholder}
|
|
79
|
-
onKeyDown={(e) => {
|
|
80
|
-
if (e.key === 'Enter') {
|
|
81
|
-
onSearch();
|
|
82
|
-
}
|
|
83
|
-
}}
|
|
84
|
-
onBlur={() => props.onBlur?.()}
|
|
85
|
-
onFocus={() => props.onFocus?.()}
|
|
86
|
-
/>
|
|
87
|
-
<div class='search-in-clear' onClick={onClear}>
|
|
88
|
-
<i class='ifc-icon ma-close' />
|
|
89
|
-
</div>
|
|
90
|
-
<div class='search-in-search' onClick={onSearch}>
|
|
91
|
-
<i class={'ifc-icon ' + (props.searchIcon || 'bs-search')} />
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
);
|
|
95
|
-
};
|
package/templates/lupine-template-responsive-starter/web/src/components/side-menu-content.tsx
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CssProps,
|
|
3
|
-
getGlobalStylesId,
|
|
4
|
-
bindGlobalStyle,
|
|
5
|
-
RefProps,
|
|
6
|
-
VNode,
|
|
7
|
-
MobileSideMenuHelper,
|
|
8
|
-
updateTheme,
|
|
9
|
-
} from 'lupine.components';
|
|
10
|
-
import { NotificationColor, NotificationMessage, SliderFrameHookProps } from 'lupine.components';
|
|
11
|
-
import { IconMenuItemProps } from 'lupine.components';
|
|
12
|
-
import { MineSettingsPage } from './mine-settings-page';
|
|
13
|
-
|
|
14
|
-
export type SideMenuContentProps = {
|
|
15
|
-
navItems?: IconMenuItemProps[];
|
|
16
|
-
menuItems?: string[];
|
|
17
|
-
title?: string;
|
|
18
|
-
footer?: string;
|
|
19
|
-
version?: string;
|
|
20
|
-
onAction?: (action: string) => void;
|
|
21
|
-
settingSliderHook: SliderFrameHookProps;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const sideMenuContentCss: CssProps = {
|
|
25
|
-
margin: '0 -12px',
|
|
26
|
-
display: 'flex',
|
|
27
|
-
flexDirection: 'column',
|
|
28
|
-
flex: 1,
|
|
29
|
-
height: '100%',
|
|
30
|
-
'.msm-header': {
|
|
31
|
-
display: 'flex',
|
|
32
|
-
alignItems: 'center',
|
|
33
|
-
padding: '16px',
|
|
34
|
-
borderBottom: '1px solid var(--primary-border-color)',
|
|
35
|
-
},
|
|
36
|
-
'.msm-header-icon': {
|
|
37
|
-
width: '32px',
|
|
38
|
-
height: '32px',
|
|
39
|
-
marginRight: '12px',
|
|
40
|
-
borderRadius: '4px',
|
|
41
|
-
backgroundColor: 'var(--primary-color)',
|
|
42
|
-
},
|
|
43
|
-
'.msm-header-title': {
|
|
44
|
-
fontSize: '18px',
|
|
45
|
-
fontWeight: 'bold',
|
|
46
|
-
color: 'var(--primary-color)',
|
|
47
|
-
},
|
|
48
|
-
'.msm-content': {
|
|
49
|
-
flex: '1',
|
|
50
|
-
overflowY: 'auto',
|
|
51
|
-
padding: '12px 0',
|
|
52
|
-
},
|
|
53
|
-
'.msm-item-link': {
|
|
54
|
-
textDecoration: 'none',
|
|
55
|
-
color: 'inherit',
|
|
56
|
-
display: 'block',
|
|
57
|
-
},
|
|
58
|
-
'.msm-separator': {
|
|
59
|
-
height: '1px',
|
|
60
|
-
backgroundColor: 'var(--primary-border-color)',
|
|
61
|
-
margin: '8px 12px',
|
|
62
|
-
},
|
|
63
|
-
'.msm-item': {
|
|
64
|
-
padding: '12px',
|
|
65
|
-
fontSize: '16px',
|
|
66
|
-
cursor: 'pointer',
|
|
67
|
-
transition: 'background-color 0.2s',
|
|
68
|
-
display: 'flex',
|
|
69
|
-
alignItems: 'center',
|
|
70
|
-
gap: '12px',
|
|
71
|
-
width: '100%',
|
|
72
|
-
'&:hover': {
|
|
73
|
-
backgroundColor: 'var(--activatable-bg-color-hover, rgba(0,0,0,0.04))',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
'.msm-footer': {
|
|
77
|
-
borderTop: '1px solid var(--primary-border-color)',
|
|
78
|
-
padding: '16px 0',
|
|
79
|
-
},
|
|
80
|
-
'.msm-footer-cfg': {
|
|
81
|
-
display: 'flex',
|
|
82
|
-
flexDirection: 'row',
|
|
83
|
-
justifyContent: 'space-between',
|
|
84
|
-
},
|
|
85
|
-
'.msm-footer-cfg .msm-item': {
|
|
86
|
-
padding: '12px',
|
|
87
|
-
},
|
|
88
|
-
'.msm-footer-version': {
|
|
89
|
-
textAlign: 'center',
|
|
90
|
-
fontSize: '12px',
|
|
91
|
-
color: 'var(--secondary-color, #999)',
|
|
92
|
-
marginTop: '2px',
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export const SideMenuContent = ({
|
|
97
|
-
navItems = [],
|
|
98
|
-
menuItems = ['Light Mode', 'Dark Mode'],
|
|
99
|
-
title = 'Function Menu',
|
|
100
|
-
footer,
|
|
101
|
-
onAction,
|
|
102
|
-
settingSliderHook,
|
|
103
|
-
}: SideMenuContentProps): VNode<any> => {
|
|
104
|
-
const globalCssId = getGlobalStylesId(sideMenuContentCss);
|
|
105
|
-
bindGlobalStyle(globalCssId, sideMenuContentCss);
|
|
106
|
-
|
|
107
|
-
const ref: RefProps = {
|
|
108
|
-
referToCssId: globalCssId,
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
const handleAction = (item: string) => {
|
|
112
|
-
if (onAction) {
|
|
113
|
-
onAction(item);
|
|
114
|
-
} else {
|
|
115
|
-
if (item === 'Light Mode') {
|
|
116
|
-
updateTheme('light');
|
|
117
|
-
MobileSideMenuHelper.hide();
|
|
118
|
-
} else if (item === 'Dark Mode') {
|
|
119
|
-
updateTheme('dark');
|
|
120
|
-
MobileSideMenuHelper.hide();
|
|
121
|
-
} else {
|
|
122
|
-
NotificationMessage.sendMessage(`Action: ${item}`, NotificationColor.Info);
|
|
123
|
-
MobileSideMenuHelper.hide();
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
return (
|
|
129
|
-
<div ref={ref} class={globalCssId}>
|
|
130
|
-
<div class='msm-header'>
|
|
131
|
-
{/* <div class='msm-header-icon'></div> */}
|
|
132
|
-
<div class='msm-header-title'>{title}</div>
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<div class='msm-content'>
|
|
136
|
-
{navItems &&
|
|
137
|
-
navItems.map((item, index) => {
|
|
138
|
-
const handleClick = (e: Event) => {
|
|
139
|
-
if (item.js) {
|
|
140
|
-
e.preventDefault();
|
|
141
|
-
item.js();
|
|
142
|
-
}
|
|
143
|
-
MobileSideMenuHelper.hide();
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
return (
|
|
147
|
-
<a href={item.url || 'javascript:void(0)'} class='msm-item-link' onClick={handleClick}>
|
|
148
|
-
<div class='msm-item'>
|
|
149
|
-
{item.icon && <i class={`ifc-icon ${item.icon}`}></i>}
|
|
150
|
-
{item.text}
|
|
151
|
-
</div>
|
|
152
|
-
</a>
|
|
153
|
-
);
|
|
154
|
-
})}
|
|
155
|
-
{navItems && navItems.length > 0 && menuItems.length > 0 && <div class='msm-separator'></div>}
|
|
156
|
-
{menuItems.map((item) => (
|
|
157
|
-
<div class='msm-item' onClick={() => handleAction(item)}>
|
|
158
|
-
{item}
|
|
159
|
-
</div>
|
|
160
|
-
))}
|
|
161
|
-
</div>
|
|
162
|
-
|
|
163
|
-
<div class='msm-footer'>
|
|
164
|
-
<div class='msm-footer-cfg'>
|
|
165
|
-
<div
|
|
166
|
-
class='msm-item'
|
|
167
|
-
onClick={() => {
|
|
168
|
-
settingSliderHook.load!(
|
|
169
|
-
<MineSettingsPage sliderFrameHook={settingSliderHook} onDataChanged={() => { }} />
|
|
170
|
-
);
|
|
171
|
-
MobileSideMenuHelper.hide();
|
|
172
|
-
}}
|
|
173
|
-
>
|
|
174
|
-
<i class='ifc-icon ma-cog-outline'></i>
|
|
175
|
-
Settings
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
{footer && <div class='msm-footer-version'>{footer}</div>}
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
);
|
|
182
|
-
};
|
package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { VNode } from 'lupine.web';
|
|
2
|
-
import { MediaQueryMaxWidth, ResponsiveFrame, SliderFrame, SliderFrameHookProps } from 'lupine.components';
|
|
3
|
-
import { SideMenuContent } from '../components/side-menu-content';
|
|
4
|
-
|
|
5
|
-
// Note: Replace with true site config loading if available
|
|
6
|
-
const getSiteTitle = async () => 'My Note App';
|
|
7
|
-
const getSiteFooter = async () => '© 2026 My Note App';
|
|
8
|
-
|
|
9
|
-
// 'sidemenu' | 'tabs', this will be replaced by create-lupine
|
|
10
|
-
const DEFAULT_LAYOUT = 'tabs';
|
|
11
|
-
export const AppResponsiveFrame = async (placeholderClassname: string, vnode: VNode<any>) => {
|
|
12
|
-
// special login for github pages
|
|
13
|
-
let subDir = '';
|
|
14
|
-
if (typeof window !== 'undefined' && window.location.hostname === 'uuware.github.io') {
|
|
15
|
-
// first section is subDir
|
|
16
|
-
subDir = '/' + window.location.pathname.split('/')[1];
|
|
17
|
-
}
|
|
18
|
-
const mobileBottomMenu = [
|
|
19
|
-
{ icon: 'ma-home-outline', url: subDir + '/', text: 'Notes' },
|
|
20
|
-
{ icon: 'icon-finance', url: subDir + '/finance', text: 'Finance' },
|
|
21
|
-
{ icon: 'ma-book-outline', url: subDir + '/about', text: 'About', topout: true },
|
|
22
|
-
{ icon: 'ma-tools', url: subDir + '/tools', text: 'Tools' },
|
|
23
|
-
{ icon: 'ma-account-cog-outline', url: subDir + '/mine', text: 'Mine' },
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
const layout: 'sidemenu' | 'tabs' = (localStorage.getItem('app-layout') as any) || DEFAULT_LAYOUT;
|
|
27
|
-
const sliderFrameHook: SliderFrameHookProps = {};
|
|
28
|
-
|
|
29
|
-
return ResponsiveFrame({
|
|
30
|
-
placeholderClassname,
|
|
31
|
-
mainContent: vnode,
|
|
32
|
-
desktopHeaderTitle: await getSiteTitle(),
|
|
33
|
-
desktopFooterTitle: await getSiteFooter(),
|
|
34
|
-
desktopTopMenu: layout === 'sidemenu' ? undefined : mobileBottomMenu,
|
|
35
|
-
mobileBottomMenu: layout === 'sidemenu' ? undefined : mobileBottomMenu,
|
|
36
|
-
sharedContents: (
|
|
37
|
-
<>
|
|
38
|
-
<SliderFrame hook={sliderFrameHook} />
|
|
39
|
-
</>
|
|
40
|
-
),
|
|
41
|
-
mobileSideMenuContent: (
|
|
42
|
-
<SideMenuContent
|
|
43
|
-
navItems={layout === 'sidemenu' ? mobileBottomMenu : undefined}
|
|
44
|
-
settingSliderHook={sliderFrameHook}
|
|
45
|
-
title='My Note App'
|
|
46
|
-
footer='Powered by Lupine.js'
|
|
47
|
-
/>
|
|
48
|
-
),
|
|
49
|
-
maxWidth: MediaQueryMaxWidth.DesktopMax,
|
|
50
|
-
autoExtendSidemenu: layout === 'sidemenu',
|
|
51
|
-
});
|
|
52
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CssProps,
|
|
3
|
-
MobileHeaderCenter,
|
|
4
|
-
MobileHeaderEmptyIcon,
|
|
5
|
-
MobileHeaderTitleIcon,
|
|
6
|
-
MobileTopSysIcon,
|
|
7
|
-
PageProps,
|
|
8
|
-
RefProps,
|
|
9
|
-
} from 'lupine.components';
|
|
10
|
-
import { MineAboutContent } from '../components/mine-about-page';
|
|
11
|
-
|
|
12
|
-
export const AboutPage = async (props: PageProps) => {
|
|
13
|
-
const css: CssProps = {
|
|
14
|
-
display: 'flex',
|
|
15
|
-
flexDirection: 'column',
|
|
16
|
-
height: '100%',
|
|
17
|
-
position: 'relative',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const ref: RefProps = {
|
|
21
|
-
onLoad: async () => {},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div css={css} ref={ref}>
|
|
26
|
-
<MobileHeaderCenter>
|
|
27
|
-
<MobileHeaderTitleIcon
|
|
28
|
-
title='About'
|
|
29
|
-
left={<MobileHeaderEmptyIcon />}
|
|
30
|
-
right={
|
|
31
|
-
<div class='flex-center-gap-12'>
|
|
32
|
-
<MobileTopSysIcon />
|
|
33
|
-
</div>
|
|
34
|
-
}
|
|
35
|
-
/>
|
|
36
|
-
</MobileHeaderCenter>
|
|
37
|
-
|
|
38
|
-
<div class='tools-scroll tools-list-container no-scrollbar-container'>
|
|
39
|
-
<MineAboutContent />
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CssProps,
|
|
3
|
-
MobileHeaderCenter,
|
|
4
|
-
MobileHeaderEmptyIcon,
|
|
5
|
-
MobileHeaderTitleIcon,
|
|
6
|
-
MobileTopSysIcon,
|
|
7
|
-
PageProps,
|
|
8
|
-
RefProps,
|
|
9
|
-
} from 'lupine.components';
|
|
10
|
-
|
|
11
|
-
export const FinancePage = async (props: PageProps) => {
|
|
12
|
-
const css: CssProps = {
|
|
13
|
-
display: 'flex',
|
|
14
|
-
flexDirection: 'column',
|
|
15
|
-
height: '100%',
|
|
16
|
-
position: 'relative',
|
|
17
|
-
'.finance-list-container': {
|
|
18
|
-
padding: '32px 24px',
|
|
19
|
-
display: 'flex',
|
|
20
|
-
flexDirection: 'column',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const ref: RefProps = {
|
|
26
|
-
onLoad: async () => {},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<div css={css} ref={ref}>
|
|
31
|
-
<MobileHeaderCenter>
|
|
32
|
-
<MobileHeaderTitleIcon
|
|
33
|
-
title='Finance'
|
|
34
|
-
left={<MobileHeaderEmptyIcon />}
|
|
35
|
-
right={
|
|
36
|
-
<div class='flex-center-gap-12'>
|
|
37
|
-
<MobileTopSysIcon />
|
|
38
|
-
</div>
|
|
39
|
-
}
|
|
40
|
-
/>
|
|
41
|
-
</MobileHeaderCenter>
|
|
42
|
-
|
|
43
|
-
<div class='finance-list-container no-scrollbar-container'>This is a finance demo page.</div>
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
};
|