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
|
@@ -496,14 +496,12 @@ fragment {
|
|
|
496
496
|
scrollbar-width: none;
|
|
497
497
|
-webkit-overflow-scrolling: touch;
|
|
498
498
|
}
|
|
499
|
-
|
|
500
499
|
.no-scrollbar-container::-webkit-scrollbar {
|
|
501
500
|
display: none;
|
|
502
501
|
}
|
|
503
|
-
|
|
504
502
|
/* -------------------------- */
|
|
505
503
|
|
|
506
|
-
.row-box
|
|
504
|
+
.row-box > * {
|
|
507
505
|
display: inline-block;
|
|
508
506
|
align-self: center;
|
|
509
507
|
}
|
|
@@ -526,27 +524,21 @@ fragment {
|
|
|
526
524
|
.grid-gap {
|
|
527
525
|
gap: 0.5rem;
|
|
528
526
|
}
|
|
529
|
-
|
|
530
527
|
.grid-gap-0 {
|
|
531
528
|
gap: 0;
|
|
532
529
|
}
|
|
533
|
-
|
|
534
530
|
.grid-gap-ss {
|
|
535
531
|
gap: 0.15rem;
|
|
536
532
|
}
|
|
537
|
-
|
|
538
533
|
.grid-gap-s {
|
|
539
534
|
gap: 0.35rem;
|
|
540
535
|
}
|
|
541
|
-
|
|
542
536
|
.grid-gap-m {
|
|
543
537
|
gap: 0.75rem;
|
|
544
538
|
}
|
|
545
|
-
|
|
546
539
|
.grid-gap-l {
|
|
547
540
|
gap: 1rem;
|
|
548
541
|
}
|
|
549
|
-
|
|
550
542
|
.grid-gap-ll {
|
|
551
543
|
gap: 1.5rem;
|
|
552
544
|
}
|
|
@@ -577,7 +569,6 @@ fragment {
|
|
|
577
569
|
[class^='col-'] {
|
|
578
570
|
margin: calc(var(--grid-gutter) / 2) calc(var(--grid-gutter) / 2);
|
|
579
571
|
}
|
|
580
|
-
|
|
581
572
|
/* for a column with fixed width */
|
|
582
573
|
.col-0 {
|
|
583
574
|
width: auto;
|
|
@@ -783,7 +774,6 @@ fragment {
|
|
|
783
774
|
max-width: calc((100% / (12 / 12)) - var(--grid-gutter));
|
|
784
775
|
}
|
|
785
776
|
}
|
|
786
|
-
|
|
787
777
|
/* -------------------------- */
|
|
788
778
|
|
|
789
779
|
body {
|
|
@@ -939,11 +929,9 @@ input.input-base[type='checkbox'] {
|
|
|
939
929
|
border: 3px solid var(--primary-border-color);
|
|
940
930
|
border-radius: 6px;
|
|
941
931
|
}
|
|
942
|
-
|
|
943
932
|
input.input-base[type='checkbox']:checked {
|
|
944
933
|
background-color: var(--primary-accent-color);
|
|
945
934
|
}
|
|
946
|
-
|
|
947
935
|
input.input-base[type='checkbox']:checked::after {
|
|
948
936
|
content: '';
|
|
949
937
|
position: absolute;
|
|
@@ -955,11 +943,9 @@ input.input-base[type='checkbox']:checked::after {
|
|
|
955
943
|
width: 40%;
|
|
956
944
|
height: 70%;
|
|
957
945
|
}
|
|
958
|
-
|
|
959
946
|
input.input-base[type='radio'] {
|
|
960
947
|
border-radius: 50%;
|
|
961
948
|
}
|
|
962
|
-
|
|
963
949
|
input.input-base[type='radio']:checked::after {
|
|
964
950
|
content: '';
|
|
965
951
|
position: absolute;
|
|
@@ -1055,11 +1041,9 @@ input.input-base.input-ss[type='checkbox'] {
|
|
|
1055
1041
|
height: 1rem;
|
|
1056
1042
|
border-width: 1px;
|
|
1057
1043
|
}
|
|
1058
|
-
|
|
1059
1044
|
input.input-base.input-ss[type='checkbox']:checked::after {
|
|
1060
1045
|
border-width: 0 2px 2px 0;
|
|
1061
1046
|
}
|
|
1062
|
-
|
|
1063
1047
|
input.input-base.input-ss[type='radio']:checked::after {
|
|
1064
1048
|
left: 12%;
|
|
1065
1049
|
}
|
|
@@ -1070,7 +1054,6 @@ input.input-base.input-s[type='checkbox'] {
|
|
|
1070
1054
|
height: 1.4rem;
|
|
1071
1055
|
border-width: 2px;
|
|
1072
1056
|
}
|
|
1073
|
-
|
|
1074
1057
|
input.input-base.input-s[type='checkbox']:checked::after {
|
|
1075
1058
|
border-width: 0 3px 3px 0;
|
|
1076
1059
|
}
|
|
@@ -1152,10 +1135,10 @@ button.input-base[disabled='true'],
|
|
|
1152
1135
|
transition: 0.3s;
|
|
1153
1136
|
}
|
|
1154
1137
|
|
|
1155
|
-
.input-field input:focus+span,
|
|
1156
|
-
.input-field input:not(:placeholder-shown)+span,
|
|
1157
|
-
.input-field textarea:focus+span,
|
|
1158
|
-
.input-field textarea:not(:placeholder-shown)+span {
|
|
1138
|
+
.input-field input:focus + span,
|
|
1139
|
+
.input-field input:not(:placeholder-shown) + span,
|
|
1140
|
+
.input-field textarea:focus + span,
|
|
1141
|
+
.input-field textarea:not(:placeholder-shown) + span {
|
|
1159
1142
|
top: -6px;
|
|
1160
1143
|
left: 10px;
|
|
1161
1144
|
font-size: small;
|
|
@@ -1163,10 +1146,10 @@ button.input-base[disabled='true'],
|
|
|
1163
1146
|
padding: 0 5px 0 5px;
|
|
1164
1147
|
}
|
|
1165
1148
|
|
|
1166
|
-
.input-field input:focus:invalid+span,
|
|
1167
|
-
.input-field input:not(:placeholder-shown):invalid+span,
|
|
1168
|
-
.input-field textarea:focus:invalid+span,
|
|
1169
|
-
.input-field textarea:not(:placeholder-shown):invalid+span {
|
|
1149
|
+
.input-field input:focus:invalid + span,
|
|
1150
|
+
.input-field input:not(:placeholder-shown):invalid + span,
|
|
1151
|
+
.input-field textarea:focus:invalid + span,
|
|
1152
|
+
.input-field textarea:not(:placeholder-shown):invalid + span {
|
|
1170
1153
|
color: red;
|
|
1171
1154
|
}
|
|
1172
1155
|
|
|
@@ -1805,7 +1788,6 @@ h6,
|
|
|
1805
1788
|
.w-25p {
|
|
1806
1789
|
width: 25%;
|
|
1807
1790
|
}
|
|
1808
|
-
|
|
1809
1791
|
.w-75p {
|
|
1810
1792
|
width: 75%;
|
|
1811
1793
|
}
|
|
@@ -1813,7 +1795,6 @@ h6,
|
|
|
1813
1795
|
.w-33p {
|
|
1814
1796
|
width: 33.333%;
|
|
1815
1797
|
}
|
|
1816
|
-
|
|
1817
1798
|
.w-77p {
|
|
1818
1799
|
width: 77.777%;
|
|
1819
1800
|
}
|
|
@@ -1825,7 +1806,6 @@ h6,
|
|
|
1825
1806
|
.w-100p {
|
|
1826
1807
|
width: 100%;
|
|
1827
1808
|
}
|
|
1828
|
-
|
|
1829
1809
|
.w-auto {
|
|
1830
1810
|
width: auto;
|
|
1831
1811
|
}
|
|
@@ -1833,7 +1813,6 @@ h6,
|
|
|
1833
1813
|
.h-100p {
|
|
1834
1814
|
height: 100%;
|
|
1835
1815
|
}
|
|
1836
|
-
|
|
1837
1816
|
.h-auto {
|
|
1838
1817
|
height: auto;
|
|
1839
1818
|
}
|
|
@@ -1853,7 +1832,6 @@ h6,
|
|
|
1853
1832
|
.align-items-center {
|
|
1854
1833
|
align-items: center;
|
|
1855
1834
|
}
|
|
1856
|
-
|
|
1857
1835
|
.justify-content-center {
|
|
1858
1836
|
justify-content: center;
|
|
1859
1837
|
}
|
|
@@ -1869,7 +1847,6 @@ h6,
|
|
|
1869
1847
|
.flex-row {
|
|
1870
1848
|
flex-direction: row;
|
|
1871
1849
|
}
|
|
1872
|
-
|
|
1873
1850
|
.p-relative {
|
|
1874
1851
|
position: relative;
|
|
1875
1852
|
}
|
|
@@ -1984,12 +1961,10 @@ h6,
|
|
|
1984
1961
|
.setting-section-group {
|
|
1985
1962
|
padding-bottom: 16px;
|
|
1986
1963
|
}
|
|
1987
|
-
|
|
1988
1964
|
.setting-section-title {
|
|
1989
1965
|
font-size: 15px;
|
|
1990
1966
|
padding: 8px 0;
|
|
1991
1967
|
}
|
|
1992
|
-
|
|
1993
1968
|
.setting-section-block {
|
|
1994
1969
|
display: flex;
|
|
1995
1970
|
flex-direction: column;
|
|
@@ -1998,7 +1973,6 @@ h6,
|
|
|
1998
1973
|
border-radius: 8px;
|
|
1999
1974
|
padding: 4px 8px;
|
|
2000
1975
|
}
|
|
2001
|
-
|
|
2002
1976
|
.setting-section-item {
|
|
2003
1977
|
display: flex;
|
|
2004
1978
|
flex-direction: row;
|
|
@@ -2008,20 +1982,16 @@ h6,
|
|
|
2008
1982
|
border-bottom: 1px dotted var(--primary-border-color);
|
|
2009
1983
|
cursor: pointer;
|
|
2010
1984
|
}
|
|
2011
|
-
|
|
2012
1985
|
.setting-section-item:last-child {
|
|
2013
1986
|
border-bottom: none;
|
|
2014
1987
|
}
|
|
2015
|
-
|
|
2016
1988
|
.setting-section-item-text {
|
|
2017
1989
|
font-size: 15px;
|
|
2018
1990
|
}
|
|
2019
|
-
|
|
2020
1991
|
.setting-section-item-icon {
|
|
2021
1992
|
font-size: 20px;
|
|
2022
1993
|
margin-right: 8px;
|
|
2023
1994
|
}
|
|
2024
|
-
|
|
2025
1995
|
.setting-section-item-icon.text {
|
|
2026
1996
|
font-size: 11px;
|
|
2027
1997
|
}
|
|
@@ -2039,18 +2009,15 @@ h6,
|
|
|
2039
2009
|
justify-content: center;
|
|
2040
2010
|
cursor: pointer;
|
|
2041
2011
|
}
|
|
2042
|
-
|
|
2043
2012
|
.setting-section-row-btn i.ifc-icon {
|
|
2044
2013
|
margin: 0 8px;
|
|
2045
2014
|
color: var(--ss-row-btn-color);
|
|
2046
2015
|
font-size: 26px;
|
|
2047
2016
|
}
|
|
2048
|
-
|
|
2049
2017
|
.setting-section-row-btn.warning,
|
|
2050
2018
|
.setting-section-row-btn.warning i.ifc-icon {
|
|
2051
2019
|
color: var(--ss-row-btn-warn-color);
|
|
2052
2020
|
}
|
|
2053
|
-
|
|
2054
2021
|
/* tips inside button */
|
|
2055
2022
|
.setting-section-row-btn-tips {
|
|
2056
2023
|
color: var(--ss-row-btn-warn-color);
|
|
@@ -2064,31 +2031,24 @@ h6,
|
|
|
2064
2031
|
.color-inherit {
|
|
2065
2032
|
color: inherit;
|
|
2066
2033
|
}
|
|
2067
|
-
|
|
2068
2034
|
.color-red {
|
|
2069
2035
|
color: red;
|
|
2070
2036
|
}
|
|
2071
|
-
|
|
2072
2037
|
.color-green {
|
|
2073
2038
|
color: green;
|
|
2074
2039
|
}
|
|
2075
|
-
|
|
2076
2040
|
.color-blue {
|
|
2077
2041
|
color: blue;
|
|
2078
2042
|
}
|
|
2079
|
-
|
|
2080
2043
|
.color-yellow {
|
|
2081
2044
|
color: yellow;
|
|
2082
2045
|
}
|
|
2083
|
-
|
|
2084
2046
|
.color-gray {
|
|
2085
2047
|
color: gray;
|
|
2086
2048
|
}
|
|
2087
|
-
|
|
2088
2049
|
.color-black {
|
|
2089
2050
|
color: black;
|
|
2090
2051
|
}
|
|
2091
|
-
|
|
2092
2052
|
.color-white {
|
|
2093
2053
|
color: white;
|
|
2094
2054
|
}
|
|
@@ -2096,35 +2056,28 @@ h6,
|
|
|
2096
2056
|
.back-color-inherit {
|
|
2097
2057
|
background-color: inherit;
|
|
2098
2058
|
}
|
|
2099
|
-
|
|
2100
2059
|
.back-color-red {
|
|
2101
2060
|
background-color: red;
|
|
2102
2061
|
}
|
|
2103
|
-
|
|
2104
2062
|
.back-color-green {
|
|
2105
2063
|
background-color: green;
|
|
2106
2064
|
}
|
|
2107
|
-
|
|
2108
2065
|
.back-color-blue {
|
|
2109
2066
|
background-color: blue;
|
|
2110
2067
|
}
|
|
2111
|
-
|
|
2112
2068
|
.back-color-yellow {
|
|
2113
2069
|
background-color: yellow;
|
|
2114
2070
|
}
|
|
2115
|
-
|
|
2116
2071
|
.back-color-gray {
|
|
2117
2072
|
background-color: gray;
|
|
2118
2073
|
}
|
|
2119
|
-
|
|
2120
2074
|
.back-color-black {
|
|
2121
2075
|
background-color: black;
|
|
2122
2076
|
}
|
|
2123
|
-
|
|
2124
2077
|
.back-color-white {
|
|
2125
2078
|
background-color: white;
|
|
2126
2079
|
}
|
|
2127
2080
|
|
|
2128
2081
|
.cursor-pointer {
|
|
2129
2082
|
cursor: pointer;
|
|
2130
|
-
}
|
|
2083
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemesProps, baseThemes } from 'lupine.web';
|
|
2
2
|
|
|
3
3
|
const themesBase = {
|
|
4
4
|
// '--input-padding': '1.07rem .6rem',
|
|
@@ -13,4 +13,5 @@ export const themes: ThemesProps = {
|
|
|
13
13
|
...baseThemes.dark,
|
|
14
14
|
...themesBase,
|
|
15
15
|
},
|
|
16
|
+
lightGreen: baseThemes.light,
|
|
16
17
|
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Responsive Starter
|
|
2
|
+
|
|
3
|
+
An app that feels like a phone app and works on desktops, too: notes kept on the device with search, editing, colors and drag to sort, finance, tools, a "Mine" page with settings (themes, languages, the menu), about and premium pages. One code base for iOS, Android, macOS, Windows and the web (lupine.native), and a web site that serves it with the pages rendered on the server. A template of `npx create-lupine` (`responsive-starter-tabs`, `responsive-starter-sidemenu`).
|
|
4
|
+
|
|
5
|
+
[Live demo](https://uuware.github.io/lupine-template-responsive-starter/) · [Repository](https://github.com/uuware/lupine-template-responsive-starter)
|
|
6
|
+
|
|
7
|
+
<!-- screenshots macos=3 windows=8 web=/ ios=3,14 android=8,11 -->
|
|
8
|
+
<table>
|
|
9
|
+
<tr><th>macOS</th><th>Windows</th><th>Web</th></tr>
|
|
10
|
+
<tr><td><a href="docs/macos-3-notes.png"><img src="docs/macos-3-notes.png" width="253" alt="macOS"></a></td><td><a href="docs/windows-8-finance.png"><img src="docs/windows-8-finance.png" width="253" alt="Windows"></a></td><td><a href="docs/web-1.png"><img src="docs/web-1.png" width="253" alt="Web"></a></td></tr>
|
|
11
|
+
</table>
|
|
12
|
+
<table>
|
|
13
|
+
<tr><th colspan="2">iOS</th><th colspan="2">Android</th></tr>
|
|
14
|
+
<tr><td><a href="docs/ios-3-notes.png"><img src="docs/ios-3-notes.png" width="183" alt="iOS"></a></td><td><a href="docs/ios-14-drawer.png"><img src="docs/ios-14-drawer.png" width="183" alt="iOS"></a></td><td><a href="docs/android-8-finance.png"><img src="docs/android-8-finance.png" width="183" alt="Android"></a></td><td><a href="docs/android-11-dark.png"><img src="docs/android-11-dark.png" width="183" alt="Android"></a></td></tr>
|
|
15
|
+
</table>
|
|
16
|
+
<!-- /screenshots -->
|
|
17
|
+
|
|
18
|
+
| Folder | |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `app/` | the app (`app/package.json`: `lupineNative`): `src/app.tsx` the frame and the routes, `src/pages` the pages, `src/shell` the menu, the data on the device (`store.ts`), the texts (`texts.ts`, `locales/`) |
|
|
21
|
+
| `web/` | the page of the site: imports the web version of the app (one bundle) and keeps it in the frame of its router; `web/src/lupine-template-responsive-starter/` is the copy for GitHub Pages (the app alone, `404.html` sends other addresses back to it) |
|
|
22
|
+
| `lupine.json` | what `npm run dev` builds; `"nativeApp": "app"` gives the build the settings of lupine.native |
|
|
23
|
+
| no `api/` | the server is the default one of lupine-build: the web files and the pages rendered on the server. For routes of your own add `api/src/index.ts` and `"apiEntryPoint"` in `lupine.json` (as in the fullstack templates) |
|
|
24
|
+
|
|
25
|
+
## Two layouts
|
|
26
|
+
|
|
27
|
+
`const DEFAULT_LAYOUT = 'tabs';` in `app/src/app.tsx`, and Settings > Menu on the device:
|
|
28
|
+
|
|
29
|
+
- `tabs`: a tab bar at the bottom on phones, a column on the left on wide windows.
|
|
30
|
+
- `sidemenu`: a menu button in the header and a drawer on phones, the same menu as a column on wide windows.
|
|
31
|
+
|
|
32
|
+
## Commands
|
|
33
|
+
|
|
34
|
+
In a project of create-lupine (and in the repository of this template) the same is in the scripts: `npm run run-mac`, `run-ios`, `run-android`, `run-exe`; `build-android` (the apk for the store), `bump` (the next version), `icons` (the icons of the site from the icon of the app), `release` (a folder for the server).
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm run native -- macos --app=apps/lupine-template-responsive-starter --run
|
|
38
|
+
npm run native -- ios --app=apps/lupine-template-responsive-starter --run
|
|
39
|
+
npm run native -- android --app=apps/lupine-template-responsive-starter --run
|
|
40
|
+
npm run native -- windows --app=apps/lupine-template-responsive-starter --run
|
|
41
|
+
npm run native -- web --app=apps/lupine-template-responsive-starter --watch # a static page, without the server
|
|
42
|
+
npm run native -- test macos --app=apps/lupine-template-responsive-starter # its tests (app/src/index.test.tsx)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The builds go to `dist/native/<name of app/package.json>/<platform>` (`nativeOut` of `lupine.json`). Name and id of the app: `lupineNative` in `app/package.json`.
|
|
46
|
+
|
|
47
|
+
The site: `npm run dev` with `lupine-template-responsive-starter` in `APPS` of `.env`. The address bar follows the pages of the app (`/mine`, `/note/1`), and the back button of the browser goes back in it. The server renders the page of the address with the theme and the language of the cookies; the notes are in the browser, so they appear when the app starts there.
|
|
48
|
+
|
|
49
|
+
Texts: `t('notes.empty', 'No notes yet')` in the code, the other languages in `app/src/shell/locales`. Icons: `lupine.core/icons`, the app's own in `app/src/shell/icons.ts`.
|
|
50
|
+
|
|
51
|
+
See [Getting started](https://uuware.github.io/lupine.js/en/native/started). For a web site with sign-in and an admin area see `lupine-template-fullstack-starter`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lupine-template-responsive-starter-app",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Notes kept on the device with search and editing, finance, tools, settings with themes and languages; tabs or a side menu. One code base for iOS, Android, macOS, Windows and the web.",
|
|
6
|
+
"lupineNative": {
|
|
7
|
+
"name": "LupineResponsive",
|
|
8
|
+
"id": "com.uuware.lupine.responsive",
|
|
9
|
+
"entry": {
|
|
10
|
+
"native": "src/index.native.tsx",
|
|
11
|
+
"test": "src/index.test.tsx",
|
|
12
|
+
"web": "src/index.web.tsx"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"lupine.native.components": "^1.1.0",
|
|
17
|
+
"lupine.native.core": "^1.1.0"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import './shell/texts';
|
|
2
|
+
import { createEffect, insets, media, onBack, untrack, View } from 'lupine.native.core';
|
|
3
|
+
import { col, NavBar, OverlayHost, Pages, Route, router, syncAppearance, t, Toast } from 'lupine.native.components';
|
|
4
|
+
import { AppMenu, Brand, MenuContent } from './shell/menu';
|
|
5
|
+
import { layout, setDefaultLayout } from './shell/layout';
|
|
6
|
+
import { navItems } from './shell/nav';
|
|
7
|
+
import { About } from './pages/about';
|
|
8
|
+
import { Finance } from './pages/finance';
|
|
9
|
+
import { Mine, Premium } from './pages/mine';
|
|
10
|
+
import { NotFound } from './pages/not-found';
|
|
11
|
+
import { NoteDetail } from './pages/note-detail';
|
|
12
|
+
import { NoteEdit } from './pages/note-edit';
|
|
13
|
+
import { Notes } from './pages/notes';
|
|
14
|
+
import { NoteSearch } from './pages/note-search';
|
|
15
|
+
import { Settings } from './pages/settings';
|
|
16
|
+
import { CalendarTool, ColorsTool, Stopwatch, Tools } from './pages/tools';
|
|
17
|
+
|
|
18
|
+
// 'tabs' | 'sidemenu' (npx create-lupine sets it); Settings can change it on the device
|
|
19
|
+
const DEFAULT_LAYOUT = 'tabs';
|
|
20
|
+
setDefaultLayout(DEFAULT_LAYOUT);
|
|
21
|
+
|
|
22
|
+
/** the width of the menu column on wide windows */
|
|
23
|
+
const SIDE = 240;
|
|
24
|
+
|
|
25
|
+
const tabs = [
|
|
26
|
+
{ path: '/', page: Notes },
|
|
27
|
+
{ path: '/finance', page: Finance },
|
|
28
|
+
{ path: '/about', page: About },
|
|
29
|
+
{ path: '/tools', page: Tools },
|
|
30
|
+
{ path: '/mine', page: Mine },
|
|
31
|
+
];
|
|
32
|
+
const routes: Route[] = [
|
|
33
|
+
{ path: '/note/:id', page: ({ id }) => <NoteDetail id={id} /> },
|
|
34
|
+
{ path: '/edit', page: ({ id }) => <NoteEdit id={id} /> },
|
|
35
|
+
{ path: '/search', page: () => <NoteSearch /> },
|
|
36
|
+
{ path: '/settings', page: () => <Settings /> },
|
|
37
|
+
{ path: '/premium', page: () => <Premium /> },
|
|
38
|
+
{ path: '/tools/stopwatch', page: () => <Stopwatch /> },
|
|
39
|
+
{ path: '/tools/calendar', page: () => <CalendarTool /> },
|
|
40
|
+
{ path: '/tools/colors', page: () => <ColorsTool /> },
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
/** tabs: one NavBar, a tab bar at the bottom on phones and a column on the left on wide windows (css, also on the server). */
|
|
44
|
+
const TabsFrame = () => (
|
|
45
|
+
<Pages side={SIDE} tabs={tabs} routes={routes} notFound={() => <NotFound />}>
|
|
46
|
+
<NavBar items={navItems} active={router.tab} onPress={router.navigate} width={SIDE} header={<Brand />} />
|
|
47
|
+
</Pages>
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
/** sidemenu: the menu is a column on wide windows; on phones the menu button of the headers opens it as a drawer (AppMenu). */
|
|
51
|
+
const SideMenuFrame = () => (
|
|
52
|
+
<Pages side={SIDE} tabs={tabs} routes={routes} notFound={() => <NotFound />}>
|
|
53
|
+
<View testID='frame-side' style={{ display: media<'none' | 'flex'>({ base: 'none', mobileAbove: 'flex' }), width: SIDE, flexDirection: 'row', backgroundColor: col('sidebar') }}>
|
|
54
|
+
<View style={{ flex: 1, paddingTop: () => insets().top }}>
|
|
55
|
+
<MenuContent prefix='side' nav={() => true} />
|
|
56
|
+
</View>
|
|
57
|
+
<View style={{ width: 1, backgroundColor: col('separator') }} />
|
|
58
|
+
</View>
|
|
59
|
+
</Pages>
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
export const App = () => {
|
|
63
|
+
untrack(syncAppearance); // before the first control is created
|
|
64
|
+
createEffect(syncAppearance);
|
|
65
|
+
let last = 0;
|
|
66
|
+
onBack(() => {
|
|
67
|
+
if (Date.now() - last < 2000) return false;
|
|
68
|
+
last = Date.now();
|
|
69
|
+
Toast.info(t('ln.pressAgainToExit', 'Press back again to exit'));
|
|
70
|
+
});
|
|
71
|
+
return (
|
|
72
|
+
// the background of the tab pages: it shows in the space above the tab bar, where the raised tab is
|
|
73
|
+
<View style={{ flex: 1, backgroundColor: col('bgSecondary') }}>
|
|
74
|
+
{/* the pages stay where they are when the layout changes */}
|
|
75
|
+
{() => (layout() === 'sidemenu' ? <SideMenuFrame /> : <TabsFrame />)}
|
|
76
|
+
<AppMenu />
|
|
77
|
+
<OverlayHost />
|
|
78
|
+
</View>
|
|
79
|
+
);
|
|
80
|
+
};
|