create-lupine 1.2.0 → 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 +13 -7
- package/index.js +232 -108
- package/package.json +1 -1
- package/templates/common/.agents/skills/lupine-framework/SKILL.md +3 -3
- package/templates/common/.agents/skills/lupine-framework/references/backend-api.md +16 -1
- package/templates/common/.agents/skills/lupine-framework/references/icon-handling.md +1 -1
- package/templates/common/.agents/skills/lupine-framework/references/mobile-interactions.md +17 -88
- package/templates/common/.agents/skills/lupine-framework/references/native-apps.md +47 -24
- package/templates/common/.agents/skills/lupine-framework/references/navigation-and-routing.md +1 -0
- package/templates/common/.agents/skills/lupine-framework/references/reactivity-and-state.md +2 -2
- package/templates/common/.agents/skills/lupine-framework/references/styling-and-themes.md +3 -1
- package/templates/common/.env.mobile +4 -3
- package/templates/common/_env +8 -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 +33 -1
- 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 -14
- 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 -20
- package/templates/lupine-template-doc-starter/README.md +33 -1
- 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 -14
- 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 -20
- package/templates/lupine-template-fullstack-note/README.md +83 -0
- package/templates/{lupine-template-cv-starter → lupine-template-fullstack-note}/api/package.json +2 -2
- 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-fullstack-note/lupine.json +25 -0
- package/templates/lupine-template-fullstack-note/web/assets/favicon.ico +0 -0
- package/templates/{lupine-template-doc-starter/api → lupine-template-fullstack-note/web}/package.json +2 -2
- package/templates/lupine-template-fullstack-note/web/src/index.html +23 -0
- package/templates/lupine-template-fullstack-note/web/src/index.tsx +15 -0
- package/templates/lupine-template-fullstack-starter/README.md +63 -14
- package/templates/lupine-template-fullstack-starter/api/src/service/user-api.ts +11 -6
- 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 +6 -7
- package/templates/lupine-template-fullstack-starter/web/src/admin/admin-patch.tsx +34 -0
- package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/home-search-component.tsx +18 -25
- package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/story-card.tsx +17 -8
- package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/story-list.tsx +1 -2
- package/templates/lupine-template-fullstack-starter/web/src/{admin_dev → admin}/index.html +1 -0
- package/templates/lupine-template-fullstack-starter/web/src/{admin_dev → admin}/index.tsx +13 -28
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-cfg.tsx +23 -19
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-item-edit.tsx +3 -4
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-item-list.tsx +2 -3
- package/templates/lupine-template-fullstack-starter/web/src/{pages → admin/pages}/admin-user.tsx +15 -20
- package/templates/lupine-template-fullstack-starter/web/src/index.html +8 -2
- package/templates/lupine-template-fullstack-starter/web/src/index.tsx +11 -150
- package/templates/lupine-template-fullstack-starter/web/src/services/fetch-data.ts +7 -25
- package/templates/lupine-template-fullstack-starter/web/src/styles/base-css.ts +0 -3
- package/templates/lupine-template-fullstack-starter/web/src/styles/theme.ts +1 -2
- package/templates/lupine-template-responsive-starter/README.md +46 -2
- 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 -25
- 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 -22
- package/templates/common/apps/server/src/app-loader.ts +0 -4
- package/templates/lupine-template-cv-starter/api/resources/config_default.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/client-env-keys.ts +0 -5
- package/templates/lupine-template-cv-starter/web/src/styles/base-css.ts +0 -15
- 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-fullstack-starter/web/src/admin_dev/admin-about.tsx +0 -16
- package/templates/lupine-template-fullstack-starter/web/src/admin_dev/admin-patch.ts +0 -22
- package/templates/lupine-template-fullstack-starter/web/src/components/footer-menu.tsx +0 -52
- package/templates/lupine-template-fullstack-starter/web/src/components/footer.tsx +0 -15
- package/templates/lupine-template-fullstack-starter/web/src/components/header.tsx +0 -75
- package/templates/lupine-template-fullstack-starter/web/src/components/login-code-zh.tsx +0 -162
- package/templates/lupine-template-fullstack-starter/web/src/components/login-code.tsx +0 -165
- package/templates/lupine-template-fullstack-starter/web/src/components/login-zh.tsx +0 -118
- package/templates/lupine-template-fullstack-starter/web/src/components/login.tsx +0 -122
- package/templates/lupine-template-fullstack-starter/web/src/components/not-found-page.tsx +0 -12
- package/templates/lupine-template-fullstack-starter/web/src/components/register-zh.tsx +0 -161
- package/templates/lupine-template-fullstack-starter/web/src/components/register.tsx +0 -163
- package/templates/lupine-template-fullstack-starter/web/src/components/reset-password-zh.tsx +0 -166
- package/templates/lupine-template-fullstack-starter/web/src/components/reset-password.tsx +0 -177
- package/templates/lupine-template-fullstack-starter/web/src/components/user-info.tsx +0 -84
- package/templates/lupine-template-fullstack-starter/web/src/frames/admin-page-frame.tsx +0 -48
- package/templates/lupine-template-fullstack-starter/web/src/frames/frame1-page-frame.tsx +0 -61
- package/templates/lupine-template-fullstack-starter/web/src/frames/frame2-page-frame.tsx +0 -61
- package/templates/lupine-template-fullstack-starter/web/src/frames/top-frame.tsx +0 -23
- package/templates/lupine-template-fullstack-starter/web/src/frames/user-page-frame.tsx +0 -90
- package/templates/lupine-template-fullstack-starter/web/src/models/index.ts +0 -15
- package/templates/lupine-template-fullstack-starter/web/src/pages/contact.tsx +0 -105
- package/templates/lupine-template-fullstack-starter/web/src/pages/page1-page.tsx +0 -38
- package/templates/lupine-template-fullstack-starter/web/src/pages/page2-page.tsx +0 -38
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-favorite-page.tsx +0 -58
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-home-page.tsx +0 -27
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-mine-page.tsx +0 -54
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-profile-page-zh.tsx +0 -112
- package/templates/lupine-template-fullstack-starter/web/src/pages/user-profile-page.tsx +0 -112
- package/templates/lupine-template-fullstack-starter/web/src/pages/user1-page.tsx +0 -57
- package/templates/lupine-template-fullstack-starter/web/src/services/shared-data.ts +0 -19
- package/templates/lupine-template-fullstack-starter/web/src/styles/app.css +0 -0
- package/templates/lupine-template-responsive-starter/api/package.json +0 -6
- 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 -87
- package/templates/lupine-template-responsive-starter/web/src/components/mine-premium-page.tsx +0 -81
- package/templates/lupine-template-responsive-starter/web/src/components/mine-settings-page.tsx +0 -211
- package/templates/lupine-template-responsive-starter/web/src/components/mobile-top-search-menu.tsx +0 -107
- package/templates/lupine-template-responsive-starter/web/src/components/note-detail.tsx +0 -110
- package/templates/lupine-template-responsive-starter/web/src/components/note-edit.tsx +0 -144
- package/templates/lupine-template-responsive-starter/web/src/components/note-search-page.tsx +0 -188
- 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 -169
- package/templates/lupine-template-responsive-starter/web/src/frames/app-responsive-frame.tsx +0 -53
- package/templates/lupine-template-responsive-starter/web/src/pages/about-page.tsx +0 -32
- package/templates/lupine-template-responsive-starter/web/src/pages/finance-page.tsx +0 -35
- package/templates/lupine-template-responsive-starter/web/src/pages/home-page.tsx +0 -444
- package/templates/lupine-template-responsive-starter/web/src/pages/mine-page.tsx +0 -318
- package/templates/lupine-template-responsive-starter/web/src/pages/tools-page.tsx +0 -35
- 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 -17
- /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-responsive-starter → lupine-template-fullstack-note}/api/src/index.ts +0 -0
- /package/templates/lupine-template-fullstack-starter/{web/assets/images → app/assets}/sample.png +0 -0
- /package/templates/lupine-template-fullstack-starter/web/src/{components → admin/components}/story-props.ts +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { createSignal, storage } from 'lupine.native.core';
|
|
2
|
+
|
|
3
|
+
// What the app keeps on the device (on the web: in the browser). storage is for small values; a big app would keep its
|
|
4
|
+
// notes in files (lupine.native.core: writeFile) or on a server (fetch).
|
|
5
|
+
|
|
6
|
+
export interface Note {
|
|
7
|
+
id: number;
|
|
8
|
+
title: string;
|
|
9
|
+
content: string;
|
|
10
|
+
/** '' or '#e53935' */
|
|
11
|
+
color: string;
|
|
12
|
+
updatedAt: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const read = <T>(key: string, fallback: T): T => {
|
|
16
|
+
try {
|
|
17
|
+
return (JSON.parse(storage.get(key) || 'null') as T) ?? fallback;
|
|
18
|
+
} catch {
|
|
19
|
+
return fallback;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const [list, setList] = createSignal<Note[]>(read<Note[]>('notes', []));
|
|
24
|
+
const keep = (next: Note[]) => {
|
|
25
|
+
setList(next);
|
|
26
|
+
storage.set('notes', JSON.stringify(next));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** The notes, the newest (or the one dragged up) first. Changed notes are new objects, the others stay: lists keep their rows. */
|
|
30
|
+
export const notes = {
|
|
31
|
+
list,
|
|
32
|
+
get: (id: number) => list().find((n) => n.id === id),
|
|
33
|
+
/** a new one without id; returns its id */
|
|
34
|
+
save: (note: { id?: number; title: string; content: string; color: string }): number => {
|
|
35
|
+
const now = Date.now();
|
|
36
|
+
if (note.id) {
|
|
37
|
+
keep(list().map((n) => (n.id === note.id ? { ...n, ...note, id: n.id, updatedAt: now } : n)));
|
|
38
|
+
return note.id;
|
|
39
|
+
}
|
|
40
|
+
const id = list().reduce((max, n) => Math.max(max, n.id + 1), now);
|
|
41
|
+
keep([{ id, title: note.title, content: note.content, color: note.color, updatedAt: now }, ...list()]);
|
|
42
|
+
return id;
|
|
43
|
+
},
|
|
44
|
+
remove: (id: number) => keep(list().filter((n) => n.id !== id)),
|
|
45
|
+
/** after dragging */
|
|
46
|
+
reorder: (next: Note[]) => keep(next),
|
|
47
|
+
search: (query: string) => {
|
|
48
|
+
const q = query.trim().toLowerCase();
|
|
49
|
+
return q ? list().filter((n) => n.title.toLowerCase().includes(q) || n.content.toLowerCase().includes(q)) : [];
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const [history, setHistory] = createSignal<string[]>(read<string[]>('search-history', []));
|
|
54
|
+
const keepHistory = (next: string[]) => {
|
|
55
|
+
setHistory(next);
|
|
56
|
+
storage.set('search-history', next.length ? JSON.stringify(next) : null);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** What was searched for, the last one first. */
|
|
60
|
+
export const searchHistory = {
|
|
61
|
+
list: history,
|
|
62
|
+
add: (query: string) => {
|
|
63
|
+
const q = query.trim();
|
|
64
|
+
if (q) keepHistory([q, ...history().filter((h) => h !== q)].slice(0, 10));
|
|
65
|
+
},
|
|
66
|
+
clear: () => keepHistory([]),
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const clearAllData = () => {
|
|
70
|
+
keep([]);
|
|
71
|
+
keepHistory([]);
|
|
72
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { addLnTexts, addTexts, lnZhHans, setLanguages } from 'lupine.native.components';
|
|
2
|
+
import { zhCN } from './locales/zh-CN';
|
|
3
|
+
|
|
4
|
+
// English is in the code: t('notes.empty', 'No notes yet'); here the other languages
|
|
5
|
+
addTexts('zh-CN', zhCN);
|
|
6
|
+
// and those of the controls (OK, Cancel, the months ...)
|
|
7
|
+
addLnTexts({ 'zh-Hans': lnZhHans });
|
|
8
|
+
setLanguages([
|
|
9
|
+
{ code: 'en', name: 'English' },
|
|
10
|
+
{ code: 'zh-CN', name: '简体中文' },
|
|
11
|
+
]);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2020",
|
|
4
|
+
"lib": ["es2020"],
|
|
5
|
+
"types": [],
|
|
6
|
+
"jsx": "react-jsx",
|
|
7
|
+
"jsxImportSource": "lupine.native.core",
|
|
8
|
+
"module": "esnext",
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
|
+
"strict": true,
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"skipLibCheck": true
|
|
13
|
+
},
|
|
14
|
+
// the web entry is the only file that may use the DOM, so it isn't checked with these settings
|
|
15
|
+
"include": ["src"],
|
|
16
|
+
"exclude": ["src/index.web.tsx"]
|
|
17
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lupine-template-responsive-starter",
|
|
3
|
+
"nativeOut": "dist/native",
|
|
4
|
+
"nativeApp": "app",
|
|
3
5
|
"webEntryPoints": [
|
|
4
6
|
{
|
|
5
7
|
"index": "web/src/index.tsx",
|
|
@@ -12,7 +14,6 @@
|
|
|
12
14
|
"outdir": "/lupine-template-responsive-starter"
|
|
13
15
|
}
|
|
14
16
|
],
|
|
15
|
-
"apiEntryPoint": "api/src/index.ts",
|
|
16
17
|
"copyFiles": [
|
|
17
18
|
{
|
|
18
19
|
"env": "all",
|
|
@@ -21,13 +22,13 @@
|
|
|
21
22
|
},
|
|
22
23
|
{
|
|
23
24
|
"env": "all",
|
|
24
|
-
"from": "web/src/lupine-template-responsive-starter/
|
|
25
|
-
"to": "web/lupine-template-responsive-starter/
|
|
25
|
+
"from": "web/src/lupine-template-responsive-starter/assets",
|
|
26
|
+
"to": "web/lupine-template-responsive-starter/assets"
|
|
26
27
|
},
|
|
27
28
|
{
|
|
28
29
|
"env": "all",
|
|
29
|
-
"from": "
|
|
30
|
-
"to": "
|
|
30
|
+
"from": "web/src/lupine-template-responsive-starter/404.html",
|
|
31
|
+
"to": "web/lupine-template-responsive-starter/404.html"
|
|
31
32
|
}
|
|
32
33
|
]
|
|
33
|
-
}
|
|
34
|
+
}
|
|
@@ -3,11 +3,18 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<title><!--META-TITLE--></title>
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
7
7
|
<!--META-ENV-START-->
|
|
8
8
|
<!--META-ENV-END-->
|
|
9
9
|
<link rel="shortcut icon" href="{SUBDIR}/assets/favicon.ico?t={hash}" type="image/x-icon" />
|
|
10
|
-
<
|
|
10
|
+
<style>
|
|
11
|
+
html,
|
|
12
|
+
body,
|
|
13
|
+
.lupine-root {
|
|
14
|
+
height: 100%;
|
|
15
|
+
margin: 0;
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
11
18
|
<script defer src="{SUBDIR}/index.js?t={hash}"></script>
|
|
12
19
|
</head>
|
|
13
20
|
<body>
|
|
@@ -1,30 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
3
|
-
|
|
1
|
+
import { bindRouter, PageRouter, setDefaultPageTitle } from 'lupine.web';
|
|
2
|
+
import { AppPage } from '../../app/src/index.web';
|
|
3
|
+
// the primitives of the app in the page that the server renders
|
|
4
|
+
import 'lupine.native.core/web/server';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { AppResponsiveFrame } from './frames/app-responsive-frame';
|
|
9
|
-
import { HomePage } from './pages/home-page';
|
|
10
|
-
import { FinancePage } from './pages/finance-page';
|
|
11
|
-
import { AboutPage } from './pages/about-page';
|
|
12
|
-
import { MinePage } from './pages/mine-page';
|
|
13
|
-
import { ToolsPage } from './pages/tools-page';
|
|
14
|
-
bindTheme('light', themes);
|
|
15
|
-
bindAppGlobalStyle('comm-css', baseCss, false, true);
|
|
16
|
-
setDefaultPageTitle('Lupine.js Note Starter');
|
|
6
|
+
// The page of the site is the app (app/), in the same bundle: the server renders the page of the address (search
|
|
7
|
+
// engines see the text). keep: the app is made once and stays; when the address changes (its own pages, the back
|
|
8
|
+
// button) it follows the address itself. Pages of the site itself go into pageRouter before it.
|
|
17
9
|
|
|
18
|
-
|
|
19
|
-
debugWatch(webEnv('API_PORT', 0));
|
|
20
|
-
}
|
|
10
|
+
setDefaultPageTitle('Lupine Responsive Starter');
|
|
21
11
|
|
|
22
12
|
const pageRouter = new PageRouter();
|
|
23
|
-
pageRouter.
|
|
24
|
-
pageRouter.use('/finance', FinancePage);
|
|
25
|
-
pageRouter.use('/about', AboutPage);
|
|
26
|
-
pageRouter.use('/mine', MinePage);
|
|
27
|
-
pageRouter.use('/tools', ToolsPage);
|
|
28
|
-
pageRouter.use('*', HomePage);
|
|
29
|
-
|
|
13
|
+
pageRouter.use('*', AppPage, { keep: true });
|
|
30
14
|
bindRouter(pageRouter);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html
|
|
2
|
+
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
|
-
<title
|
|
5
|
+
<title>Lupine Template Responsive Starter</title>
|
|
6
6
|
<meta
|
|
7
7
|
name="description"
|
|
8
|
-
content="Lupine
|
|
8
|
+
content="Lupine Template Responsive Starter - one code base for iOS, Android, macOS, Windows and the web: notes kept on the device with search and editing, finance, tools, settings with themes and languages. Powered by Lupine.js."
|
|
9
9
|
/>
|
|
10
10
|
|
|
11
11
|
<!-- Open Graph / Facebook -->
|
|
@@ -28,12 +28,18 @@
|
|
|
28
28
|
content="https://uuware.github.io/lupine-template-responsive-starter/assets/og-image.png"
|
|
29
29
|
/>
|
|
30
30
|
|
|
31
|
-
<
|
|
32
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
31
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
33
32
|
<!--META-ENV-START-->
|
|
34
33
|
<!--META-ENV-END-->
|
|
35
34
|
<link rel="shortcut icon" href="{SUBDIR}/assets/favicon.ico?t={hash}" type="image/x-icon" />
|
|
36
|
-
<
|
|
35
|
+
<style>
|
|
36
|
+
html,
|
|
37
|
+
body,
|
|
38
|
+
.lupine-root {
|
|
39
|
+
height: 100%;
|
|
40
|
+
margin: 0;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
37
43
|
<script defer src="{SUBDIR}/index.js?t={hash}"></script>
|
|
38
44
|
<!-- Remove Cloudflare Web Analytics if you clone this project -->
|
|
39
45
|
<script
|
|
@@ -1,23 +1,13 @@
|
|
|
1
|
-
//
|
|
2
|
-
import '
|
|
3
|
-
import '
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
// lupine.native.core/web first: the storage of the browser, which the controls read when they start
|
|
2
|
+
import { runApp } from 'lupine.native.core/web';
|
|
3
|
+
import { router } from 'lupine.native.components';
|
|
4
|
+
import { App } from '../../../app/src/index.web';
|
|
5
|
+
|
|
6
|
+
// The copy for GitHub Pages (https://uuware.github.io/lupine-template-responsive-starter/): the app alone, without a
|
|
7
|
+
// server. The address bar follows its pages under the folder of the project; 404.html sends an address that GitHub
|
|
8
|
+
// doesn't have back to this page (?redirect=), and the router opens it. The server of the site only loads this file,
|
|
9
|
+
// so the app starts in the browser.
|
|
10
|
+
if (typeof document === 'object') {
|
|
11
|
+
router.followUrl({ paths: true, base: '/lupine-template-responsive-starter' });
|
|
12
|
+
runApp(App, document.querySelector('.lupine-root') as HTMLElement);
|
|
13
13
|
}
|
|
14
|
-
bindTheme('light', themes);
|
|
15
|
-
bindGlobalStyle('comm-css', baseCss, false, true);
|
|
16
|
-
setDefaultPageTitle('Lupine Template Responsive Starter');
|
|
17
|
-
|
|
18
|
-
const pageRouter = new PageRouter();
|
|
19
|
-
pageRouter.setFramePage({ component: AppResponsiveFrame, placeholderClassname: 'user-page-placeholder' });
|
|
20
|
-
pageRouter.setSubDir('/lupine-template-responsive-starter');
|
|
21
|
-
pageRouter.use('*', HomePage);
|
|
22
|
-
|
|
23
|
-
bindRouter(pageRouter);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IApiBase, ApiRouter, StaticServer, ApiModule } from 'lupine.api';
|
|
2
|
-
|
|
3
|
-
class DocApi implements IApiBase {
|
|
4
|
-
protected router = new ApiRouter();
|
|
5
|
-
|
|
6
|
-
constructor() {
|
|
7
|
-
this.router.use('*', new StaticServer().processRequest.bind(new StaticServer()));
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
public getRouter(): ApiRouter {
|
|
11
|
-
return this.router;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const apiModule = new ApiModule(new DocApi());
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const baseCss = {
|
|
2
|
-
a: {
|
|
3
|
-
textDecoration: 'none',
|
|
4
|
-
color: 'inherit',
|
|
5
|
-
'&:hover': { color: 'var(--press-brand-color)' },
|
|
6
|
-
},
|
|
7
|
-
body: {
|
|
8
|
-
backgroundColor: 'var(--primary-bg-color)',
|
|
9
|
-
color: 'var(--primary-color)',
|
|
10
|
-
fontSize: 'var(--font-size-base)',
|
|
11
|
-
lineHeight: 'var(--line-height-base)',
|
|
12
|
-
fontFamily: 'var(--font-family-base)',
|
|
13
|
-
fontWeight: 'var(--font-weight-base)',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IApiBase, ApiRouter, StaticServer, ApiModule } from 'lupine.api';
|
|
2
|
-
|
|
3
|
-
class DocApi implements IApiBase {
|
|
4
|
-
protected router = new ApiRouter();
|
|
5
|
-
|
|
6
|
-
constructor() {
|
|
7
|
-
this.router.use('*', new StaticServer().processRequest.bind(new StaticServer()));
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
public getRouter(): ApiRouter {
|
|
11
|
-
return this.router;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const apiModule = new ApiModule(new DocApi());
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const baseCss = {
|
|
2
|
-
a: {
|
|
3
|
-
textDecoration: 'none',
|
|
4
|
-
color: 'inherit',
|
|
5
|
-
'&:hover': { color: 'var(--press-brand-color)' },
|
|
6
|
-
},
|
|
7
|
-
body: {
|
|
8
|
-
backgroundColor: 'var(--primary-bg-color)',
|
|
9
|
-
color: 'var(--primary-color)',
|
|
10
|
-
fontSize: 'var(--font-size-base)',
|
|
11
|
-
lineHeight: 'var(--line-height-base)',
|
|
12
|
-
fontFamily: 'var(--font-family-base)',
|
|
13
|
-
fontWeight: 'var(--font-weight-base)',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { CssProps } from 'lupine.web';
|
|
2
|
-
|
|
3
|
-
export const AdminAboutPage = () => {
|
|
4
|
-
const css: CssProps = {};
|
|
5
|
-
|
|
6
|
-
return (
|
|
7
|
-
<div css={css} class='admin-about-top'>
|
|
8
|
-
<div class='row-box h2'>About this application</div>
|
|
9
|
-
<div class=''>
|
|
10
|
-
<li>lupine.web</li>
|
|
11
|
-
<li>lupine.web.components</li>
|
|
12
|
-
<li>lupine.api</li>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { adminFrameHelper } from 'lupine.api/admin';
|
|
2
|
-
import { AdminAboutPage } from './admin-about';
|
|
3
|
-
import { clearCookie } from 'lupine.web';
|
|
4
|
-
import { userCookieName } from '../models';
|
|
5
|
-
|
|
6
|
-
export const patchAdminFrame = () => {
|
|
7
|
-
const aboutItem = adminFrameHelper.getSubMenuItem('help', 'about');
|
|
8
|
-
if (aboutItem) {
|
|
9
|
-
aboutItem.js = () => adminFrameHelper.addPanel('About', AdminAboutPage());
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
adminFrameHelper.setAppAdminHookCheckLogin(async (authResponse: any) => {
|
|
13
|
-
if (authResponse && authResponse.user && authResponse.user.admin === '1') {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
return false;
|
|
17
|
-
});
|
|
18
|
-
adminFrameHelper.setAppAdminHookLogout(async () => {
|
|
19
|
-
clearCookie(userCookieName, '/');
|
|
20
|
-
clearCookie('_token', '/');
|
|
21
|
-
});
|
|
22
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { CssProps } from 'lupine.web';
|
|
2
|
-
import { MediaQueryRange } from 'lupine.web.components';
|
|
3
|
-
|
|
4
|
-
export const FooterMenu = (props: any) => {
|
|
5
|
-
const css: CssProps = {
|
|
6
|
-
'.footer-menu': {
|
|
7
|
-
display: 'none',
|
|
8
|
-
position: 'fixed',
|
|
9
|
-
left: 0,
|
|
10
|
-
right: 0,
|
|
11
|
-
bottom: 0,
|
|
12
|
-
width: '100%',
|
|
13
|
-
background: 'var(--sidebar-bg-color)',
|
|
14
|
-
paddingBottom: 'env(safe-area-inset-bottom)',
|
|
15
|
-
zIndex: 'var(--layer-menu)',
|
|
16
|
-
height: '50px',
|
|
17
|
-
justifyContent: 'space-around',
|
|
18
|
-
alignItems: 'center',
|
|
19
|
-
borderTop: '1px solid #ccc',
|
|
20
|
-
},
|
|
21
|
-
'.footer-menu, .footer-menu a': {
|
|
22
|
-
textDecoration: 'none',
|
|
23
|
-
color: 'var(--sidebar-color)',
|
|
24
|
-
},
|
|
25
|
-
'.footer-menu .footer-menu-item': {
|
|
26
|
-
padding: '0 16px',
|
|
27
|
-
},
|
|
28
|
-
[MediaQueryRange.TabletBelow]: {
|
|
29
|
-
'.footer-menu': {
|
|
30
|
-
display: 'flex',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
return (
|
|
35
|
-
<div css={css} class='footer-menu-box'>
|
|
36
|
-
<div class='footer-menu'>
|
|
37
|
-
<div class='footer-menu-item'>
|
|
38
|
-
<a href='/'>List</a>
|
|
39
|
-
</div>
|
|
40
|
-
<div class='footer-menu-item'>
|
|
41
|
-
<a href='/user/favorite'>Favorite</a>
|
|
42
|
-
</div>
|
|
43
|
-
<div class='footer-menu-item'>
|
|
44
|
-
<a href='/user/page1/parameter1/fixed-section/parameter2/option1'>Page1</a>
|
|
45
|
-
</div>
|
|
46
|
-
<div class='footer-menu-item'>
|
|
47
|
-
<a href='/user/mine'>Mine</a>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const Footer = (props?: any) => {
|
|
2
|
-
const css: any = {
|
|
3
|
-
display: 'flex',
|
|
4
|
-
padding: '0 32px 16px',
|
|
5
|
-
'.footer-cp': {
|
|
6
|
-
padding: '1px 15px',
|
|
7
|
-
margin: 'auto',
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
return (
|
|
11
|
-
<div css={css} class={['footer-box', props.className].join(' ')}>
|
|
12
|
-
<div class='footer-cp'>{props.title}</div>
|
|
13
|
-
</div>
|
|
14
|
-
);
|
|
15
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { WebConfig } from 'lupine.web';
|
|
2
|
-
import { MediaQueryRange, MediaQueryMaxWidth, HtmlLoad } from 'lupine.web.components';
|
|
3
|
-
import { UserInfo } from './user-info';
|
|
4
|
-
|
|
5
|
-
export const Header = (props: { title: string; subtitle?: string }) => {
|
|
6
|
-
const css: any = {
|
|
7
|
-
display: 'flex',
|
|
8
|
-
width: '100%',
|
|
9
|
-
maxWidth: MediaQueryMaxWidth.DesktopMax,
|
|
10
|
-
margin: 'auto',
|
|
11
|
-
position: 'relative',
|
|
12
|
-
'.header-user': {
|
|
13
|
-
position: 'absolute',
|
|
14
|
-
right: '10px',
|
|
15
|
-
zIndex: 10,
|
|
16
|
-
},
|
|
17
|
-
'.logo-box': {
|
|
18
|
-
height: '100px',
|
|
19
|
-
width: '100px',
|
|
20
|
-
display: 'flex',
|
|
21
|
-
alignSelf: 'center',
|
|
22
|
-
},
|
|
23
|
-
'.logo': {
|
|
24
|
-
height: '100%',
|
|
25
|
-
padding: '1px',
|
|
26
|
-
margin: 'auto',
|
|
27
|
-
},
|
|
28
|
-
'.header-title': {
|
|
29
|
-
flex: '1',
|
|
30
|
-
fontSize: '38px',
|
|
31
|
-
textAlign: 'center',
|
|
32
|
-
// margin: '25px 0',
|
|
33
|
-
textShadow: '-3px -3px 10px white, 3px 3px 10px black',
|
|
34
|
-
color: 'darkblue',
|
|
35
|
-
},
|
|
36
|
-
'.header-subtitle': {
|
|
37
|
-
fontSize: '11px',
|
|
38
|
-
textAlign: 'center',
|
|
39
|
-
// margin: '25px 0',
|
|
40
|
-
// textShadow: '-3px -3px 10px white, 3px 3px 10px black',
|
|
41
|
-
// color: 'darkblue',
|
|
42
|
-
},
|
|
43
|
-
[MediaQueryRange.ExtraSmallBelow]: {
|
|
44
|
-
'.header-title, .header-subtitle': {
|
|
45
|
-
fontSize: '12px',
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
[MediaQueryRange.MobileBelow]: {
|
|
49
|
-
'.header-title': {
|
|
50
|
-
fontSize: '20px',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
[MediaQueryRange.DesktopAbove]: {
|
|
54
|
-
'.header-title': {
|
|
55
|
-
fontSize: '50px',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
return (
|
|
60
|
-
<div css={css} class='header-box'>
|
|
61
|
-
<div class='header-user'>
|
|
62
|
-
<UserInfo />
|
|
63
|
-
</div>
|
|
64
|
-
<div class='logo-box'>
|
|
65
|
-
<HtmlLoad
|
|
66
|
-
html={async () => <img class='logo' src={`/api/image/${await WebConfig.get('siteLogo', '(not set)')}`} />}
|
|
67
|
-
></HtmlLoad>
|
|
68
|
-
</div>
|
|
69
|
-
<div class='header-title'>
|
|
70
|
-
{props.title}
|
|
71
|
-
<div class='header-subtitle pt-s'>{props.subtitle}</div>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
);
|
|
75
|
-
};
|