@beknurakhmed/webforge-cli 0.1.1 → 0.1.2
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 +226 -226
- package/package.json +63 -63
- package/templates/extras/typescript/deps.json +6 -0
- package/templates/extras/typescript/react/tsconfig.json +21 -0
- package/templates/extras/typescript/vanilla/tsconfig.json +19 -0
- package/templates/extras/typescript/vue/tsconfig.json +20 -0
- package/templates/overlays/blog/angular/src/app/app.component.ts +100 -0
- package/templates/overlays/blog/angular/src/app/app.routes.ts +12 -0
- package/templates/overlays/blog/angular/src/app/components/blog-sidebar.component.ts +115 -0
- package/templates/overlays/blog/angular/src/app/components/post-card.component.ts +94 -0
- package/templates/overlays/blog/angular/src/app/pages/about.component.ts +114 -0
- package/templates/overlays/blog/angular/src/app/pages/category.component.ts +141 -0
- package/templates/overlays/blog/angular/src/app/pages/home.component.ts +143 -0
- package/templates/overlays/blog/angular/src/app/pages/post-detail.component.ts +196 -0
- package/templates/overlays/blog/angular/src/main.ts +10 -0
- package/templates/overlays/blog/nextjs/src/app/about/page.tsx +55 -0
- package/templates/overlays/blog/nextjs/src/app/category/[slug]/page.tsx +52 -0
- package/templates/overlays/blog/nextjs/src/app/components/BlogFooter.tsx +46 -0
- package/templates/overlays/blog/nextjs/src/app/components/BlogHeader.tsx +37 -0
- package/templates/overlays/blog/nextjs/src/app/components/BlogSidebar.tsx +56 -0
- package/templates/overlays/blog/nextjs/src/app/components/PostCard.tsx +42 -0
- package/templates/overlays/blog/nextjs/src/app/globals.css +158 -0
- package/templates/overlays/blog/nextjs/src/app/layout.tsx +20 -0
- package/templates/overlays/blog/nextjs/src/app/page.tsx +36 -0
- package/templates/overlays/blog/nextjs/src/app/post/[id]/page.tsx +78 -0
- package/templates/overlays/blog/nuxt/app.vue +27 -0
- package/templates/overlays/blog/nuxt/components/BlogFooter.vue +48 -0
- package/templates/overlays/blog/nuxt/components/BlogHeader.vue +55 -0
- package/templates/overlays/blog/nuxt/components/BlogSidebar.vue +144 -0
- package/templates/overlays/blog/nuxt/components/PostCard.vue +125 -0
- package/templates/overlays/blog/nuxt/layouts/default.vue +25 -0
- package/templates/overlays/blog/nuxt/pages/about.vue +161 -0
- package/templates/overlays/blog/nuxt/pages/category/[slug].vue +80 -0
- package/templates/overlays/blog/nuxt/pages/index.vue +54 -0
- package/templates/overlays/blog/nuxt/pages/post/[id].vue +158 -0
- package/templates/overlays/blog/react/src/App.css +58 -18
- package/templates/overlays/blog/react/src/App.tsx +16 -31
- package/templates/overlays/blog/react/src/components/BlogFooter.tsx +4 -2
- package/templates/overlays/blog/react/src/components/BlogHeader.tsx +12 -6
- package/templates/overlays/blog/react/src/components/BlogSidebar.tsx +9 -8
- package/templates/overlays/blog/react/src/components/Layout.tsx +17 -0
- package/templates/overlays/blog/react/src/components/PostCard.tsx +30 -0
- package/templates/overlays/blog/react/src/data/posts.ts +22 -0
- package/templates/overlays/blog/react/src/pages/About.tsx +33 -0
- package/templates/overlays/blog/react/src/pages/Category.tsx +29 -0
- package/templates/overlays/blog/react/src/pages/Home.tsx +18 -0
- package/templates/overlays/blog/react/src/pages/PostDetail.tsx +38 -0
- package/templates/overlays/blog/vanilla/src/main.ts +112 -0
- package/templates/overlays/blog/vanilla/src/pages/about.ts +106 -0
- package/templates/overlays/blog/vanilla/src/pages/category.ts +86 -0
- package/templates/overlays/blog/vanilla/src/pages/home.ts +103 -0
- package/templates/overlays/blog/vanilla/src/pages/post-detail.ts +108 -0
- package/templates/overlays/blog/vanilla/src/router.ts +33 -0
- package/templates/overlays/blog/vanilla/src/style.css +677 -0
- package/templates/overlays/blog/vue/src/App.vue +29 -0
- package/templates/overlays/blog/vue/src/components/BlogFooter.vue +8 -0
- package/templates/overlays/blog/vue/src/components/BlogHeader.vue +14 -0
- package/templates/overlays/blog/vue/src/components/BlogSidebar.vue +31 -0
- package/templates/overlays/blog/vue/src/components/PostCard.vue +17 -0
- package/templates/overlays/blog/vue/src/data.ts +82 -0
- package/templates/overlays/blog/vue/src/main.ts +6 -0
- package/templates/overlays/blog/vue/src/pages/About.vue +17 -0
- package/templates/overlays/blog/vue/src/pages/Category.vue +32 -0
- package/templates/overlays/blog/vue/src/pages/Home.vue +14 -0
- package/templates/overlays/blog/vue/src/pages/PostDetail.vue +22 -0
- package/templates/overlays/blog/vue/src/router.ts +19 -0
- package/templates/overlays/blog/vue/src/style.css +288 -0
- package/templates/overlays/crm/angular/src/app/app.component.ts +110 -0
- package/templates/overlays/crm/angular/src/app/app.routes.ts +12 -0
- package/templates/overlays/crm/angular/src/app/components/contacts-table.component.ts +98 -0
- package/templates/overlays/crm/angular/src/app/components/stats-cards.component.ts +63 -0
- package/templates/overlays/crm/angular/src/app/pages/contacts.component.ts +70 -0
- package/templates/overlays/crm/angular/src/app/pages/dashboard-home.component.ts +38 -0
- package/templates/overlays/crm/angular/src/app/pages/deals.component.ts +145 -0
- package/templates/overlays/crm/angular/src/app/pages/settings.component.ts +103 -0
- package/templates/overlays/crm/angular/src/main.ts +8 -0
- package/templates/overlays/crm/nextjs/src/app/components/ContactsTable.tsx +69 -0
- package/templates/overlays/crm/nextjs/src/app/components/Sidebar.tsx +45 -0
- package/templates/overlays/crm/nextjs/src/app/components/StatsCards.tsx +31 -0
- package/templates/overlays/crm/nextjs/src/app/contacts/page.tsx +111 -0
- package/templates/overlays/crm/nextjs/src/app/deals/page.tsx +111 -0
- package/templates/overlays/crm/nextjs/src/app/globals.css +165 -0
- package/templates/overlays/crm/nextjs/src/app/layout.tsx +20 -0
- package/templates/overlays/crm/nextjs/src/app/page.tsx +43 -0
- package/templates/overlays/crm/nextjs/src/app/settings/page.tsx +91 -0
- package/templates/overlays/crm/nuxt/app.vue +27 -0
- package/templates/overlays/crm/nuxt/components/ContactsTable.vue +140 -0
- package/templates/overlays/crm/nuxt/components/CrmSidebar.vue +97 -0
- package/templates/overlays/crm/nuxt/components/StatsCards.vue +63 -0
- package/templates/overlays/crm/nuxt/layouts/default.vue +21 -0
- package/templates/overlays/crm/nuxt/pages/contacts.vue +79 -0
- package/templates/overlays/crm/nuxt/pages/deals.vue +229 -0
- package/templates/overlays/crm/nuxt/pages/index.vue +186 -0
- package/templates/overlays/crm/nuxt/pages/settings.vue +233 -0
- package/templates/overlays/crm/react/src/App.css +49 -20
- package/templates/overlays/crm/react/src/App.tsx +16 -41
- package/templates/overlays/crm/react/src/components/ContactsTable.tsx +8 -8
- package/templates/overlays/crm/react/src/components/Layout.tsx +15 -0
- package/templates/overlays/crm/react/src/components/Sidebar.tsx +20 -14
- package/templates/overlays/crm/react/src/components/StatsCards.tsx +10 -12
- package/templates/overlays/crm/react/src/data/contacts.ts +19 -0
- package/templates/overlays/crm/react/src/pages/Contacts.tsx +32 -0
- package/templates/overlays/crm/react/src/pages/DashboardHome.tsx +44 -0
- package/templates/overlays/crm/react/src/pages/Deals.tsx +48 -0
- package/templates/overlays/crm/react/src/pages/Settings.tsx +35 -0
- package/templates/overlays/crm/vanilla/src/main.ts +95 -0
- package/templates/overlays/crm/vanilla/src/pages/contacts.ts +87 -0
- package/templates/overlays/crm/vanilla/src/pages/dashboard-home.ts +121 -0
- package/templates/overlays/crm/vanilla/src/pages/deals.ts +116 -0
- package/templates/overlays/crm/vanilla/src/pages/settings.ts +129 -0
- package/templates/overlays/crm/vanilla/src/router.ts +33 -0
- package/templates/overlays/crm/vanilla/src/style.css +766 -0
- package/templates/overlays/crm/vue/src/App.vue +25 -0
- package/templates/overlays/crm/vue/src/components/ContactsTable.vue +30 -0
- package/templates/overlays/crm/vue/src/components/CrmSidebar.vue +14 -0
- package/templates/overlays/crm/vue/src/components/StatsCards.vue +23 -0
- package/templates/overlays/crm/vue/src/data.ts +38 -0
- package/templates/overlays/crm/vue/src/main.ts +6 -0
- package/templates/overlays/crm/vue/src/pages/Contacts.vue +25 -0
- package/templates/overlays/crm/vue/src/pages/DashboardHome.vue +19 -0
- package/templates/overlays/crm/vue/src/pages/Deals.vue +34 -0
- package/templates/overlays/crm/vue/src/pages/Settings.vue +33 -0
- package/templates/overlays/crm/vue/src/router.ts +19 -0
- package/templates/overlays/crm/vue/src/style.css +272 -0
- package/templates/overlays/dashboard/angular/src/app/app.component.ts +135 -0
- package/templates/overlays/dashboard/angular/src/app/app.routes.ts +24 -0
- package/templates/overlays/dashboard/angular/src/app/components/chart-placeholder.component.ts +86 -0
- package/templates/overlays/dashboard/angular/src/app/components/data-table.component.ts +140 -0
- package/templates/overlays/dashboard/angular/src/app/components/kpi-cards.component.ts +120 -0
- package/templates/overlays/dashboard/angular/src/app/pages/analytics.component.ts +138 -0
- package/templates/overlays/dashboard/angular/src/app/pages/overview.component.ts +58 -0
- package/templates/overlays/dashboard/angular/src/app/pages/settings.component.ts +128 -0
- package/templates/overlays/dashboard/angular/src/app/pages/users.component.ts +153 -0
- package/templates/overlays/dashboard/angular/src/main.ts +10 -0
- package/templates/overlays/dashboard/nextjs/src/app/analytics/page.tsx +76 -0
- package/templates/overlays/dashboard/nextjs/src/app/components/ChartPlaceholder.tsx +58 -0
- package/templates/overlays/dashboard/nextjs/src/app/components/DataTable.tsx +60 -0
- package/templates/overlays/dashboard/nextjs/src/app/components/KPICards.tsx +31 -0
- package/templates/overlays/dashboard/nextjs/src/app/components/Sidebar.tsx +45 -0
- package/templates/overlays/dashboard/nextjs/src/app/globals.css +150 -0
- package/templates/overlays/dashboard/nextjs/src/app/layout.tsx +20 -0
- package/templates/overlays/dashboard/nextjs/src/app/page.tsx +20 -0
- package/templates/overlays/dashboard/nextjs/src/app/settings/page.tsx +118 -0
- package/templates/overlays/dashboard/nextjs/src/app/users/page.tsx +99 -0
- package/templates/overlays/dashboard/nuxt/app.vue +27 -0
- package/templates/overlays/dashboard/nuxt/components/ChartPlaceholder.vue +73 -0
- package/templates/overlays/dashboard/nuxt/components/DashSidebar.vue +97 -0
- package/templates/overlays/dashboard/nuxt/components/DataTable.vue +126 -0
- package/templates/overlays/dashboard/nuxt/components/KPICards.vue +76 -0
- package/templates/overlays/dashboard/nuxt/layouts/default.vue +21 -0
- package/templates/overlays/dashboard/nuxt/pages/analytics.vue +94 -0
- package/templates/overlays/dashboard/nuxt/pages/index.vue +49 -0
- package/templates/overlays/dashboard/nuxt/pages/settings.vue +239 -0
- package/templates/overlays/dashboard/nuxt/pages/users.vue +227 -0
- package/templates/overlays/dashboard/react/src/App.css +50 -24
- package/templates/overlays/dashboard/react/src/App.tsx +16 -22
- package/templates/overlays/dashboard/react/src/components/ChartPlaceholder.tsx +5 -2
- package/templates/overlays/dashboard/react/src/components/DataTable.tsx +9 -1
- package/templates/overlays/dashboard/react/src/components/KPICards.tsx +4 -4
- package/templates/overlays/dashboard/react/src/components/Layout.tsx +13 -0
- package/templates/overlays/dashboard/react/src/components/Sidebar.tsx +15 -10
- package/templates/overlays/dashboard/react/src/pages/Analytics.tsx +33 -0
- package/templates/overlays/dashboard/react/src/pages/Overview.tsx +23 -0
- package/templates/overlays/dashboard/react/src/pages/Settings.tsx +41 -0
- package/templates/overlays/dashboard/react/src/pages/Users.tsx +57 -0
- package/templates/overlays/dashboard/vanilla/src/main.ts +101 -0
- package/templates/overlays/dashboard/vanilla/src/pages/analytics.ts +99 -0
- package/templates/overlays/dashboard/vanilla/src/pages/overview.ts +60 -0
- package/templates/overlays/dashboard/vanilla/src/pages/settings.ts +118 -0
- package/templates/overlays/dashboard/vanilla/src/pages/users.ts +80 -0
- package/templates/overlays/dashboard/vanilla/src/router.ts +33 -0
- package/templates/overlays/dashboard/vanilla/src/style.css +654 -0
- package/templates/overlays/dashboard/vue/src/App.vue +12 -0
- package/templates/overlays/dashboard/vue/src/components/ChartPlaceholder.vue +34 -0
- package/templates/overlays/dashboard/vue/src/components/DashSidebar.vue +19 -0
- package/templates/overlays/dashboard/vue/src/components/DataTable.vue +34 -0
- package/templates/overlays/dashboard/vue/src/components/KPICards.vue +18 -0
- package/templates/overlays/dashboard/vue/src/main.ts +6 -0
- package/templates/overlays/dashboard/vue/src/pages/Analytics.vue +32 -0
- package/templates/overlays/dashboard/vue/src/pages/Overview.vue +17 -0
- package/templates/overlays/dashboard/vue/src/pages/Settings.vue +65 -0
- package/templates/overlays/dashboard/vue/src/pages/Users.vue +44 -0
- package/templates/overlays/dashboard/vue/src/router.ts +15 -0
- package/templates/overlays/dashboard/vue/src/style.css +447 -0
- package/templates/overlays/ecommerce/angular/src/app/app.component.ts +147 -0
- package/templates/overlays/ecommerce/angular/src/app/app.routes.ts +10 -0
- package/templates/overlays/ecommerce/angular/src/app/components/product-card.component.ts +94 -0
- package/templates/overlays/ecommerce/angular/src/app/data/products.ts +75 -0
- package/templates/overlays/ecommerce/angular/src/app/pages/cart.component.ts +169 -0
- package/templates/overlays/ecommerce/angular/src/app/pages/home.component.ts +96 -0
- package/templates/overlays/ecommerce/angular/src/app/pages/product-detail.component.ts +124 -0
- package/templates/overlays/ecommerce/angular/src/main.ts +10 -0
- package/templates/overlays/ecommerce/nextjs/src/app/cart/page.tsx +74 -0
- package/templates/overlays/ecommerce/nextjs/src/app/components/CartProvider.tsx +80 -0
- package/templates/overlays/ecommerce/nextjs/src/app/components/Footer.tsx +44 -0
- package/templates/overlays/ecommerce/nextjs/src/app/components/Header.tsx +27 -0
- package/templates/overlays/ecommerce/nextjs/src/app/components/ProductCard.tsx +23 -0
- package/templates/overlays/ecommerce/nextjs/src/app/globals.css +144 -0
- package/templates/overlays/ecommerce/nextjs/src/app/layout.tsx +23 -0
- package/templates/overlays/ecommerce/nextjs/src/app/page.tsx +73 -0
- package/templates/overlays/ecommerce/nextjs/src/app/product/[id]/page.tsx +63 -0
- package/templates/overlays/ecommerce/nuxt/app.vue +27 -0
- package/templates/overlays/ecommerce/nuxt/components/ProductCard.vue +77 -0
- package/templates/overlays/ecommerce/nuxt/components/StoreFooter.vue +47 -0
- package/templates/overlays/ecommerce/nuxt/components/StoreHeader.vue +91 -0
- package/templates/overlays/ecommerce/nuxt/layouts/default.vue +43 -0
- package/templates/overlays/ecommerce/nuxt/pages/cart.vue +268 -0
- package/templates/overlays/ecommerce/nuxt/pages/index.vue +154 -0
- package/templates/overlays/ecommerce/nuxt/pages/product/[id].vue +211 -0
- package/templates/overlays/ecommerce/react/src/App.css +71 -59
- package/templates/overlays/ecommerce/react/src/App.tsx +18 -44
- package/templates/overlays/ecommerce/react/src/components/Footer.tsx +2 -2
- package/templates/overlays/ecommerce/react/src/components/Header.tsx +15 -14
- package/templates/overlays/ecommerce/react/src/components/Layout.tsx +20 -0
- package/templates/overlays/ecommerce/react/src/components/ProductCard.tsx +28 -0
- package/templates/overlays/ecommerce/react/src/data/products.ts +23 -0
- package/templates/overlays/ecommerce/react/src/pages/Cart.tsx +51 -0
- package/templates/overlays/ecommerce/react/src/pages/Home.tsx +37 -0
- package/templates/overlays/ecommerce/react/src/pages/ProductDetail.tsx +38 -0
- package/templates/overlays/ecommerce/vanilla/src/main.ts +73 -0
- package/templates/overlays/ecommerce/vanilla/src/pages/cart.ts +73 -0
- package/templates/overlays/ecommerce/vanilla/src/pages/home.ts +71 -0
- package/templates/overlays/ecommerce/vanilla/src/pages/product-detail.ts +81 -0
- package/templates/overlays/ecommerce/vanilla/src/router.ts +33 -0
- package/templates/overlays/ecommerce/vanilla/src/style.css +522 -0
- package/templates/overlays/ecommerce/vue/src/App.vue +17 -32
- package/templates/overlays/ecommerce/vue/src/components/ProductCard.vue +25 -0
- package/templates/overlays/ecommerce/vue/src/components/StoreFooter.vue +6 -12
- package/templates/overlays/ecommerce/vue/src/components/StoreHeader.vue +5 -23
- package/templates/overlays/ecommerce/vue/src/data.ts +23 -0
- package/templates/overlays/ecommerce/vue/src/main.ts +6 -0
- package/templates/overlays/ecommerce/vue/src/pages/Cart.vue +34 -0
- package/templates/overlays/ecommerce/vue/src/pages/Home.vue +27 -0
- package/templates/overlays/ecommerce/vue/src/pages/ProductDetail.vue +27 -0
- package/templates/overlays/ecommerce/vue/src/router.ts +13 -0
- package/templates/overlays/ecommerce/vue/src/style.css +359 -0
- package/templates/overlays/portfolio/angular/src/app/app.component.ts +102 -0
- package/templates/overlays/portfolio/angular/src/app/app.routes.ts +12 -0
- package/templates/overlays/portfolio/angular/src/app/components/project-card.component.ts +86 -0
- package/templates/overlays/portfolio/angular/src/app/components/skills-grid.component.ts +88 -0
- package/templates/overlays/portfolio/angular/src/app/pages/about.component.ts +122 -0
- package/templates/overlays/portfolio/angular/src/app/pages/contact.component.ts +131 -0
- package/templates/overlays/portfolio/angular/src/app/pages/home.component.ts +207 -0
- package/templates/overlays/portfolio/angular/src/app/pages/projects.component.ts +150 -0
- package/templates/overlays/portfolio/angular/src/main.ts +10 -0
- package/templates/overlays/portfolio/nextjs/src/app/about/page.tsx +70 -0
- package/templates/overlays/portfolio/nextjs/src/app/components/Footer.tsx +37 -0
- package/templates/overlays/portfolio/nextjs/src/app/components/Navbar.tsx +37 -0
- package/templates/overlays/portfolio/nextjs/src/app/components/ProjectCard.tsx +35 -0
- package/templates/overlays/portfolio/nextjs/src/app/components/SkillsGrid.tsx +45 -0
- package/templates/overlays/portfolio/nextjs/src/app/contact/page.tsx +138 -0
- package/templates/overlays/portfolio/nextjs/src/app/globals.css +197 -0
- package/templates/overlays/portfolio/nextjs/src/app/layout.tsx +20 -0
- package/templates/overlays/portfolio/nextjs/src/app/page.tsx +60 -0
- package/templates/overlays/portfolio/nextjs/src/app/projects/page.tsx +56 -0
- package/templates/overlays/portfolio/nuxt/app.vue +27 -0
- package/templates/overlays/portfolio/nuxt/components/PortfolioFooter.vue +49 -0
- package/templates/overlays/portfolio/nuxt/components/PortfolioNav.vue +77 -0
- package/templates/overlays/portfolio/nuxt/components/ProjectCard.vue +102 -0
- package/templates/overlays/portfolio/nuxt/components/SkillsGrid.vue +89 -0
- package/templates/overlays/portfolio/nuxt/layouts/default.vue +21 -0
- package/templates/overlays/portfolio/nuxt/pages/about.vue +179 -0
- package/templates/overlays/portfolio/nuxt/pages/contact.vue +278 -0
- package/templates/overlays/portfolio/nuxt/pages/index.vue +160 -0
- package/templates/overlays/portfolio/nuxt/pages/projects.vue +116 -0
- package/templates/overlays/portfolio/react/src/App.css +54 -27
- package/templates/overlays/portfolio/react/src/App.tsx +16 -12
- package/templates/overlays/portfolio/react/src/components/Layout.tsx +17 -0
- package/templates/overlays/portfolio/react/src/components/Navbar.tsx +30 -0
- package/templates/overlays/portfolio/react/src/components/PortfolioFooter.tsx +5 -3
- package/templates/overlays/portfolio/react/src/components/ProjectCard.tsx +24 -0
- package/templates/overlays/portfolio/react/src/components/SkillsGrid.tsx +20 -0
- package/templates/overlays/portfolio/react/src/data/projects.ts +25 -0
- package/templates/overlays/portfolio/react/src/pages/About.tsx +43 -0
- package/templates/overlays/portfolio/react/src/pages/Contact.tsx +48 -0
- package/templates/overlays/portfolio/react/src/pages/Home.tsx +44 -0
- package/templates/overlays/portfolio/react/src/pages/Projects.tsx +36 -0
- package/templates/overlays/portfolio/vanilla/src/main.ts +58 -0
- package/templates/overlays/portfolio/vanilla/src/pages/about.ts +146 -0
- package/templates/overlays/portfolio/vanilla/src/pages/contact.ts +159 -0
- package/templates/overlays/portfolio/vanilla/src/pages/home.ts +123 -0
- package/templates/overlays/portfolio/vanilla/src/pages/projects.ts +89 -0
- package/templates/overlays/portfolio/vanilla/src/router.ts +33 -0
- package/templates/overlays/portfolio/vanilla/src/style.css +909 -0
- package/templates/overlays/portfolio/vue/src/App.vue +25 -0
- package/templates/overlays/portfolio/vue/src/components/PortfolioFooter.vue +14 -0
- package/templates/overlays/portfolio/vue/src/components/PortfolioNav.vue +16 -0
- package/templates/overlays/portfolio/vue/src/components/ProjectCard.vue +18 -0
- package/templates/overlays/portfolio/vue/src/components/SkillsGrid.vue +14 -0
- package/templates/overlays/portfolio/vue/src/data.ts +78 -0
- package/templates/overlays/portfolio/vue/src/main.ts +6 -0
- package/templates/overlays/portfolio/vue/src/pages/About.vue +30 -0
- package/templates/overlays/portfolio/vue/src/pages/Contact.vue +47 -0
- package/templates/overlays/portfolio/vue/src/pages/Home.vue +27 -0
- package/templates/overlays/portfolio/vue/src/pages/Projects.vue +33 -0
- package/templates/overlays/portfolio/vue/src/router.ts +19 -0
- package/templates/overlays/portfolio/vue/src/style.css +404 -0
- package/templates/react/package.json +23 -19
- package/templates/react/tsconfig.json +20 -0
- package/templates/styling/tailwind/deps.json +7 -6
- package/templates/styling/tailwind/nextjs/postcss.config.mjs +7 -0
- package/templates/styling/tailwind/nextjs/src/app/globals.css +1 -0
- package/templates/styling/tailwind/react/src/index.css +1 -0
- package/templates/styling/tailwind/react/vite.config.ts +7 -0
- package/templates/styling/tailwind/vanilla/src/style.css +1 -0
- package/templates/styling/tailwind/vanilla/vite.config.ts +6 -0
- package/templates/styling/tailwind/vue/src/style.css +1 -0
- package/templates/styling/tailwind/vue/vite.config.ts +7 -0
- package/templates/vanilla/package.json +15 -14
- package/templates/vanilla/tsconfig.json +19 -0
- package/templates/vue/package.json +21 -18
- package/templates/vue/tsconfig.json +20 -0
- package/templates/overlays/blog/react/src/components/PostList.tsx +0 -27
- package/templates/overlays/crm/react/src/components/Filters.tsx +0 -22
- package/templates/overlays/ecommerce/react/src/components/Cart.tsx +0 -47
- package/templates/overlays/ecommerce/react/src/components/ProductGrid.tsx +0 -32
- package/templates/overlays/ecommerce/vue/src/components/CartPanel.vue +0 -46
- package/templates/overlays/ecommerce/vue/src/components/ProductGrid.vue +0 -40
- package/templates/overlays/portfolio/react/src/components/ContactForm.tsx +0 -29
- package/templates/overlays/portfolio/react/src/components/HeroSection.tsx +0 -24
- package/templates/overlays/portfolio/react/src/components/Projects.tsx +0 -33
- package/templates/overlays/portfolio/react/src/components/Skills.tsx +0 -27
- package/templates/styling/tailwind/config/postcss.config.js +0 -5
- package/templates/styling/tailwind/config/tailwind.config.js +0 -11
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
{
|
|
5
|
-
{
|
|
6
|
-
{
|
|
7
|
-
{
|
|
8
|
-
{ icon: '⚙️', label: 'Settings', active: false },
|
|
1
|
+
import { NavLink } from 'react-router-dom';
|
|
2
|
+
|
|
3
|
+
const navItems = [
|
|
4
|
+
{ to: '/', label: 'Dashboard', icon: '📊' },
|
|
5
|
+
{ to: '/contacts', label: 'Contacts', icon: '👤' },
|
|
6
|
+
{ to: '/deals', label: 'Deals', icon: '💼' },
|
|
7
|
+
{ to: '/settings', label: 'Settings', icon: '⚙️' },
|
|
9
8
|
];
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
function Sidebar() {
|
|
12
11
|
return (
|
|
13
12
|
<aside className="sidebar">
|
|
14
|
-
<div className="sidebar-logo">{{projectName}}</div>
|
|
13
|
+
<div className="sidebar-logo">{'{{projectName}}'}</div>
|
|
15
14
|
<nav className="sidebar-nav">
|
|
16
|
-
{
|
|
17
|
-
<
|
|
18
|
-
|
|
15
|
+
{navItems.map((item) => (
|
|
16
|
+
<NavLink
|
|
17
|
+
key={item.to}
|
|
18
|
+
to={item.to}
|
|
19
|
+
end={item.to === '/'}
|
|
20
|
+
className={({ isActive }) => `sidebar-link ${isActive ? 'active' : ''}`}
|
|
21
|
+
>
|
|
22
|
+
<span className="sidebar-icon">{item.icon}</span>
|
|
19
23
|
{item.label}
|
|
20
|
-
</
|
|
24
|
+
</NavLink>
|
|
21
25
|
))}
|
|
22
26
|
</nav>
|
|
23
27
|
</aside>
|
|
24
28
|
);
|
|
25
29
|
}
|
|
30
|
+
|
|
31
|
+
export default Sidebar;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { contacts } from '../data/contacts';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
contacts:
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{ label: 'Total Contacts', value: contacts.length, color: '#4f46e5' },
|
|
10
|
-
{ label: 'Leads', value: contacts.filter((c) => c.status === 'Lead').length, color: '#f59e0b' },
|
|
11
|
-
{ label: 'Customers', value: contacts.filter((c) => c.status === 'Customer').length, color: '#10b981' },
|
|
12
|
-
{ label: 'Churned', value: contacts.filter((c) => c.status === 'Churned').length, color: '#ef4444' },
|
|
13
|
-
];
|
|
3
|
+
const stats = [
|
|
4
|
+
{ label: 'Total Contacts', value: contacts.length, color: '#4f46e5' },
|
|
5
|
+
{ label: 'Leads', value: contacts.filter((c) => c.status === 'Lead').length, color: '#f59e0b' },
|
|
6
|
+
{ label: 'Customers', value: contacts.filter((c) => c.status === 'Customer').length, color: '#10b981' },
|
|
7
|
+
{ label: 'Churned', value: contacts.filter((c) => c.status === 'Churned').length, color: '#ef4444' },
|
|
8
|
+
];
|
|
14
9
|
|
|
10
|
+
function StatsCards() {
|
|
15
11
|
return (
|
|
16
12
|
<div className="stats-grid">
|
|
17
13
|
{stats.map((stat, i) => (
|
|
@@ -24,3 +20,5 @@ export function StatsCards({ contacts }: StatsCardsProps) {
|
|
|
24
20
|
</div>
|
|
25
21
|
);
|
|
26
22
|
}
|
|
23
|
+
|
|
24
|
+
export default StatsCards;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface Contact {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
email: string;
|
|
5
|
+
company: string;
|
|
6
|
+
status: 'Lead' | 'Prospect' | 'Customer' | 'Churned';
|
|
7
|
+
phone: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const contacts: Contact[] = [
|
|
11
|
+
{ id: 1, name: 'John Smith', email: 'john@acme.com', company: 'Acme Corp', status: 'Customer', phone: '(555) 100-2000' },
|
|
12
|
+
{ id: 2, name: 'Sarah Johnson', email: 'sarah@globex.com', company: 'Globex Inc', status: 'Lead', phone: '(555) 200-3000' },
|
|
13
|
+
{ id: 3, name: 'Mike Davis', email: 'mike@initech.com', company: 'Initech', status: 'Prospect', phone: '(555) 300-4000' },
|
|
14
|
+
{ id: 4, name: 'Emily Chen', email: 'emily@wayne.com', company: 'Wayne Enterprises', status: 'Customer', phone: '(555) 400-5000' },
|
|
15
|
+
{ id: 5, name: 'Alex Turner', email: 'alex@stark.com', company: 'Stark Industries', status: 'Lead', phone: '(555) 500-6000' },
|
|
16
|
+
{ id: 6, name: 'Lisa Wang', email: 'lisa@umbrella.com', company: 'Umbrella Corp', status: 'Churned', phone: '(555) 600-7000' },
|
|
17
|
+
{ id: 7, name: 'David Brown', email: 'david@oscorp.com', company: 'Oscorp', status: 'Prospect', phone: '(555) 700-8000' },
|
|
18
|
+
{ id: 8, name: 'Rachel Green', email: 'rachel@lexcorp.com', company: 'LexCorp', status: 'Customer', phone: '(555) 800-9000' },
|
|
19
|
+
];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import ContactsTable from '../components/ContactsTable';
|
|
3
|
+
import { contacts } from '../data/contacts';
|
|
4
|
+
|
|
5
|
+
function Contacts() {
|
|
6
|
+
const [search, setSearch] = useState('');
|
|
7
|
+
|
|
8
|
+
const filtered = contacts.filter(
|
|
9
|
+
(c) =>
|
|
10
|
+
c.name.toLowerCase().includes(search.toLowerCase()) ||
|
|
11
|
+
c.email.toLowerCase().includes(search.toLowerCase()) ||
|
|
12
|
+
c.company.toLowerCase().includes(search.toLowerCase())
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<div>
|
|
17
|
+
<header className="crm-header">
|
|
18
|
+
<h1>Contacts</h1>
|
|
19
|
+
<input
|
|
20
|
+
type="text"
|
|
21
|
+
className="search-input"
|
|
22
|
+
placeholder="Search contacts..."
|
|
23
|
+
value={search}
|
|
24
|
+
onChange={(e) => setSearch(e.target.value)}
|
|
25
|
+
/>
|
|
26
|
+
</header>
|
|
27
|
+
<ContactsTable contacts={filtered} />
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default Contacts;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import StatsCards from '../components/StatsCards';
|
|
2
|
+
import { contacts } from '../data/contacts';
|
|
3
|
+
|
|
4
|
+
function DashboardHome() {
|
|
5
|
+
const recentContacts = contacts.slice(0, 5);
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<div>
|
|
9
|
+
<header className="crm-header">
|
|
10
|
+
<h1>Dashboard</h1>
|
|
11
|
+
</header>
|
|
12
|
+
<StatsCards />
|
|
13
|
+
<h2 className="section-title">Recent Contacts</h2>
|
|
14
|
+
<div className="table-card">
|
|
15
|
+
<table className="data-table">
|
|
16
|
+
<thead>
|
|
17
|
+
<tr>
|
|
18
|
+
<th>Name</th>
|
|
19
|
+
<th>Email</th>
|
|
20
|
+
<th>Company</th>
|
|
21
|
+
<th>Status</th>
|
|
22
|
+
</tr>
|
|
23
|
+
</thead>
|
|
24
|
+
<tbody>
|
|
25
|
+
{recentContacts.map((c) => (
|
|
26
|
+
<tr key={c.id}>
|
|
27
|
+
<td className="contact-name">{c.name}</td>
|
|
28
|
+
<td className="contact-email">{c.email}</td>
|
|
29
|
+
<td>{c.company}</td>
|
|
30
|
+
<td>
|
|
31
|
+
<span className={`status-badge status-${c.status.toLowerCase()}`}>
|
|
32
|
+
{c.status}
|
|
33
|
+
</span>
|
|
34
|
+
</td>
|
|
35
|
+
</tr>
|
|
36
|
+
))}
|
|
37
|
+
</tbody>
|
|
38
|
+
</table>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default DashboardHome;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
interface Deal {
|
|
2
|
+
id: number;
|
|
3
|
+
company: string;
|
|
4
|
+
value: number;
|
|
5
|
+
contact: string;
|
|
6
|
+
stage: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const deals: Deal[] = [
|
|
10
|
+
{ id: 1, company: 'Acme Corp', value: 25000, contact: 'John Smith', stage: 'Qualified' },
|
|
11
|
+
{ id: 2, company: 'Globex Inc', value: 18000, contact: 'Sarah Johnson', stage: 'Prospect' },
|
|
12
|
+
{ id: 3, company: 'Wayne Enterprises', value: 45000, contact: 'Emily Chen', stage: 'Proposal' },
|
|
13
|
+
{ id: 4, company: 'Stark Industries', value: 32000, contact: 'Alex Turner', stage: 'Won' },
|
|
14
|
+
{ id: 5, company: 'Initech', value: 12000, contact: 'Mike Davis', stage: 'Qualified' },
|
|
15
|
+
{ id: 6, company: 'Oscorp', value: 28000, contact: 'David Brown', stage: 'Prospect' },
|
|
16
|
+
{ id: 7, company: 'LexCorp', value: 55000, contact: 'Rachel Green', stage: 'Proposal' },
|
|
17
|
+
{ id: 8, company: 'Umbrella Corp', value: 15000, contact: 'Lisa Wang', stage: 'Won' },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
const stages = ['Prospect', 'Qualified', 'Proposal', 'Won'];
|
|
21
|
+
|
|
22
|
+
function Deals() {
|
|
23
|
+
return (
|
|
24
|
+
<div>
|
|
25
|
+
<header className="crm-header">
|
|
26
|
+
<h1>Deals Pipeline</h1>
|
|
27
|
+
</header>
|
|
28
|
+
<div className="deals-board">
|
|
29
|
+
{stages.map((stage) => (
|
|
30
|
+
<div key={stage} className="deals-column">
|
|
31
|
+
<h3 className="column-title">{stage}</h3>
|
|
32
|
+
{deals
|
|
33
|
+
.filter((d) => d.stage === stage)
|
|
34
|
+
.map((deal) => (
|
|
35
|
+
<div key={deal.id} className="deal-card">
|
|
36
|
+
<h4 className="deal-company">{deal.company}</h4>
|
|
37
|
+
<p className="deal-value">${deal.value.toLocaleString()}</p>
|
|
38
|
+
<span className="deal-contact">{deal.contact}</span>
|
|
39
|
+
</div>
|
|
40
|
+
))}
|
|
41
|
+
</div>
|
|
42
|
+
))}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default Deals;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function Settings() {
|
|
2
|
+
return (
|
|
3
|
+
<div>
|
|
4
|
+
<header className="crm-header">
|
|
5
|
+
<h1>Settings</h1>
|
|
6
|
+
</header>
|
|
7
|
+
<div className="settings-card">
|
|
8
|
+
<form className="settings-form" onSubmit={(e) => e.preventDefault()}>
|
|
9
|
+
<div className="form-group">
|
|
10
|
+
<label htmlFor="companyName">Company Name</label>
|
|
11
|
+
<input type="text" id="companyName" defaultValue="My Company" />
|
|
12
|
+
</div>
|
|
13
|
+
<div className="form-group">
|
|
14
|
+
<label htmlFor="email">Email Address</label>
|
|
15
|
+
<input type="email" id="email" defaultValue="admin@company.com" />
|
|
16
|
+
</div>
|
|
17
|
+
<div className="form-group">
|
|
18
|
+
<label htmlFor="timezone">Timezone</label>
|
|
19
|
+
<select id="timezone" defaultValue="UTC-5">
|
|
20
|
+
<option value="UTC-8">Pacific Time (UTC-8)</option>
|
|
21
|
+
<option value="UTC-7">Mountain Time (UTC-7)</option>
|
|
22
|
+
<option value="UTC-6">Central Time (UTC-6)</option>
|
|
23
|
+
<option value="UTC-5">Eastern Time (UTC-5)</option>
|
|
24
|
+
<option value="UTC+0">UTC</option>
|
|
25
|
+
<option value="UTC+1">Central European (UTC+1)</option>
|
|
26
|
+
</select>
|
|
27
|
+
</div>
|
|
28
|
+
<button type="submit" className="btn-primary">Save Changes</button>
|
|
29
|
+
</form>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default Settings;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { createRouter } from './router';
|
|
2
|
+
import { renderDashboardHome } from './pages/dashboard-home';
|
|
3
|
+
import { renderContacts } from './pages/contacts';
|
|
4
|
+
import { renderDeals } from './pages/deals';
|
|
5
|
+
import { renderSettings } from './pages/settings';
|
|
6
|
+
import './style.css';
|
|
7
|
+
|
|
8
|
+
export interface Contact {
|
|
9
|
+
id: number;
|
|
10
|
+
name: string;
|
|
11
|
+
email: string;
|
|
12
|
+
company: string;
|
|
13
|
+
phone: string;
|
|
14
|
+
status: 'Lead' | 'Prospect' | 'Customer' | 'Churned';
|
|
15
|
+
avatar: string;
|
|
16
|
+
lastContact: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Deal {
|
|
20
|
+
id: number;
|
|
21
|
+
title: string;
|
|
22
|
+
company: string;
|
|
23
|
+
value: number;
|
|
24
|
+
stage: 'Discovery' | 'Proposal' | 'Negotiation' | 'Closed Won' | 'Closed Lost';
|
|
25
|
+
probability: number;
|
|
26
|
+
contact: string;
|
|
27
|
+
closeDate: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const contacts: Contact[] = [
|
|
31
|
+
{ id: 1, name: 'Sarah Chen', email: 'sarah@techcorp.com', company: 'TechCorp', phone: '(555) 123-4567', status: 'Customer', avatar: '👩', lastContact: '2 days ago' },
|
|
32
|
+
{ id: 2, name: 'Mike Johnson', email: 'mike@innovate.io', company: 'Innovate.io', phone: '(555) 234-5678', status: 'Prospect', avatar: '👨', lastContact: '1 week ago' },
|
|
33
|
+
{ id: 3, name: 'Emily Davis', email: 'emily@globalsoft.com', company: 'GlobalSoft', phone: '(555) 345-6789', status: 'Lead', avatar: '👩💼', lastContact: '3 days ago' },
|
|
34
|
+
{ id: 4, name: 'Alex Rivera', email: 'alex@startupco.com', company: 'StartupCo', phone: '(555) 456-7890', status: 'Customer', avatar: '🧑', lastContact: '1 day ago' },
|
|
35
|
+
{ id: 5, name: 'Jordan Lee', email: 'jordan@enterprise.com', company: 'Enterprise Inc', phone: '(555) 567-8901', status: 'Prospect', avatar: '👨💻', lastContact: '5 days ago' },
|
|
36
|
+
{ id: 6, name: 'Taylor Kim', email: 'taylor@designhub.com', company: 'DesignHub', phone: '(555) 678-9012', status: 'Lead', avatar: '🧑🎨', lastContact: '2 weeks ago' },
|
|
37
|
+
{ id: 7, name: 'Morgan Blake', email: 'morgan@cloudbase.io', company: 'CloudBase', phone: '(555) 789-0123', status: 'Churned', avatar: '👩🔬', lastContact: '1 month ago' },
|
|
38
|
+
{ id: 8, name: 'Casey Park', email: 'casey@dataflow.co', company: 'DataFlow', phone: '(555) 890-1234', status: 'Customer', avatar: '🧑💼', lastContact: '3 days ago' },
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
export const deals: Deal[] = [
|
|
42
|
+
{ id: 1, title: 'Enterprise License', company: 'TechCorp', value: 45000, stage: 'Negotiation', probability: 75, contact: 'Sarah Chen', closeDate: 'Mar 15, 2024' },
|
|
43
|
+
{ id: 2, title: 'SaaS Implementation', company: 'Innovate.io', value: 28000, stage: 'Proposal', probability: 50, contact: 'Mike Johnson', closeDate: 'Apr 1, 2024' },
|
|
44
|
+
{ id: 3, title: 'Consulting Package', company: 'GlobalSoft', value: 15000, stage: 'Discovery', probability: 25, contact: 'Emily Davis', closeDate: 'May 10, 2024' },
|
|
45
|
+
{ id: 4, title: 'Annual Renewal', company: 'StartupCo', value: 12000, stage: 'Closed Won', probability: 100, contact: 'Alex Rivera', closeDate: 'Feb 28, 2024' },
|
|
46
|
+
{ id: 5, title: 'Platform Migration', company: 'Enterprise Inc', value: 67000, stage: 'Proposal', probability: 40, contact: 'Jordan Lee', closeDate: 'Jun 15, 2024' },
|
|
47
|
+
{ id: 6, title: 'Custom Integration', company: 'CloudBase', value: 22000, stage: 'Closed Lost', probability: 0, contact: 'Morgan Blake', closeDate: 'Feb 10, 2024' },
|
|
48
|
+
{ id: 7, title: 'Support Contract', company: 'DataFlow', value: 8500, stage: 'Negotiation', probability: 80, contact: 'Casey Park', closeDate: 'Mar 30, 2024' },
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
export function withLayout(title: string, content: string): string {
|
|
52
|
+
const hash = window.location.hash.slice(1) || '/';
|
|
53
|
+
return `
|
|
54
|
+
<div class="crm-layout">
|
|
55
|
+
<aside class="sidebar">
|
|
56
|
+
<div class="sidebar-logo">💼 {{projectName}}</div>
|
|
57
|
+
<nav class="sidebar-nav">
|
|
58
|
+
<a href="#/" class="${hash === '/' ? 'active' : ''}">📊 Dashboard</a>
|
|
59
|
+
<a href="#/contacts" class="${hash === '/contacts' ? 'active' : ''}">👤 Contacts</a>
|
|
60
|
+
<a href="#/deals" class="${hash === '/deals' ? 'active' : ''}">💼 Deals</a>
|
|
61
|
+
<a href="#/settings" class="${hash === '/settings' ? 'active' : ''}">⚙️ Settings</a>
|
|
62
|
+
</nav>
|
|
63
|
+
<div class="sidebar-footer">
|
|
64
|
+
<div class="sidebar-user">
|
|
65
|
+
<span class="sidebar-user-avatar">👤</span>
|
|
66
|
+
<div>
|
|
67
|
+
<div class="sidebar-user-name">Sales Manager</div>
|
|
68
|
+
<div class="sidebar-user-email">manager@crm.com</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</aside>
|
|
73
|
+
<main class="crm-main">
|
|
74
|
+
<header class="crm-header">
|
|
75
|
+
<h1>${title}</h1>
|
|
76
|
+
<div class="header-actions">
|
|
77
|
+
<span class="header-date">📅 ${new Date().toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })}</span>
|
|
78
|
+
</div>
|
|
79
|
+
</header>
|
|
80
|
+
<div class="crm-content">
|
|
81
|
+
${content}
|
|
82
|
+
</div>
|
|
83
|
+
</main>
|
|
84
|
+
</div>
|
|
85
|
+
`;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const app = document.querySelector<HTMLElement>('#app')!;
|
|
89
|
+
|
|
90
|
+
createRouter([
|
|
91
|
+
{ path: '/', render: renderDashboardHome },
|
|
92
|
+
{ path: '/contacts', render: renderContacts },
|
|
93
|
+
{ path: '/deals', render: renderDeals },
|
|
94
|
+
{ path: '/settings', render: renderSettings },
|
|
95
|
+
], app);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { withLayout, contacts } from '../main';
|
|
2
|
+
|
|
3
|
+
export function renderContacts(): string {
|
|
4
|
+
const statusCounts = {
|
|
5
|
+
Lead: contacts.filter(c => c.status === 'Lead').length,
|
|
6
|
+
Prospect: contacts.filter(c => c.status === 'Prospect').length,
|
|
7
|
+
Customer: contacts.filter(c => c.status === 'Customer').length,
|
|
8
|
+
Churned: contacts.filter(c => c.status === 'Churned').length,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
return withLayout('Contacts', `
|
|
12
|
+
<div class="stats-grid">
|
|
13
|
+
<div class="stat-card">
|
|
14
|
+
<div class="stat-icon">👥</div>
|
|
15
|
+
<div class="stat-info">
|
|
16
|
+
<p class="stat-label">All Contacts</p>
|
|
17
|
+
<h3 class="stat-value">${contacts.length}</h3>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="stat-card">
|
|
21
|
+
<div class="stat-icon">🟢</div>
|
|
22
|
+
<div class="stat-info">
|
|
23
|
+
<p class="stat-label">Leads</p>
|
|
24
|
+
<h3 class="stat-value">${statusCounts.Lead}</h3>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="stat-card">
|
|
28
|
+
<div class="stat-icon">🔵</div>
|
|
29
|
+
<div class="stat-info">
|
|
30
|
+
<p class="stat-label">Prospects</p>
|
|
31
|
+
<h3 class="stat-value">${statusCounts.Prospect}</h3>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="stat-card">
|
|
35
|
+
<div class="stat-icon">⭐</div>
|
|
36
|
+
<div class="stat-info">
|
|
37
|
+
<p class="stat-label">Customers</p>
|
|
38
|
+
<h3 class="stat-value">${statusCounts.Customer}</h3>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="card">
|
|
44
|
+
<div class="card-header">
|
|
45
|
+
<h3>All Contacts</h3>
|
|
46
|
+
<button class="btn-action">+ Add Contact</button>
|
|
47
|
+
</div>
|
|
48
|
+
<table class="data-table">
|
|
49
|
+
<thead>
|
|
50
|
+
<tr>
|
|
51
|
+
<th>Name</th>
|
|
52
|
+
<th>Email</th>
|
|
53
|
+
<th>Company</th>
|
|
54
|
+
<th>Phone</th>
|
|
55
|
+
<th>Status</th>
|
|
56
|
+
<th>Last Contact</th>
|
|
57
|
+
<th>Actions</th>
|
|
58
|
+
</tr>
|
|
59
|
+
</thead>
|
|
60
|
+
<tbody>
|
|
61
|
+
${contacts.map(c => `
|
|
62
|
+
<tr>
|
|
63
|
+
<td>
|
|
64
|
+
<div class="user-cell">
|
|
65
|
+
<span class="user-avatar">${c.avatar}</span>
|
|
66
|
+
<span>${c.name}</span>
|
|
67
|
+
</div>
|
|
68
|
+
</td>
|
|
69
|
+
<td>${c.email}</td>
|
|
70
|
+
<td>${c.company}</td>
|
|
71
|
+
<td>${c.phone}</td>
|
|
72
|
+
<td><span class="status-badge status-${c.status.toLowerCase()}">${c.status}</span></td>
|
|
73
|
+
<td>${c.lastContact}</td>
|
|
74
|
+
<td>
|
|
75
|
+
<div class="action-btns">
|
|
76
|
+
<button class="btn-icon" title="Email">📧</button>
|
|
77
|
+
<button class="btn-icon" title="Call">📞</button>
|
|
78
|
+
<button class="btn-icon" title="Edit">✏️</button>
|
|
79
|
+
</div>
|
|
80
|
+
</td>
|
|
81
|
+
</tr>
|
|
82
|
+
`).join('')}
|
|
83
|
+
</tbody>
|
|
84
|
+
</table>
|
|
85
|
+
</div>
|
|
86
|
+
`);
|
|
87
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { withLayout, contacts, deals } from '../main';
|
|
2
|
+
|
|
3
|
+
export function renderDashboardHome(): string {
|
|
4
|
+
const totalValue = deals.filter(d => d.stage !== 'Closed Lost').reduce((s, d) => s + d.value, 0);
|
|
5
|
+
const wonValue = deals.filter(d => d.stage === 'Closed Won').reduce((s, d) => s + d.value, 0);
|
|
6
|
+
const activeDeals = deals.filter(d => d.stage !== 'Closed Won' && d.stage !== 'Closed Lost');
|
|
7
|
+
const pipelineValue = activeDeals.reduce((s, d) => s + d.value, 0);
|
|
8
|
+
|
|
9
|
+
return withLayout('Dashboard', `
|
|
10
|
+
<div class="stats-grid">
|
|
11
|
+
<div class="stat-card">
|
|
12
|
+
<div class="stat-icon">👥</div>
|
|
13
|
+
<div class="stat-info">
|
|
14
|
+
<p class="stat-label">Total Contacts</p>
|
|
15
|
+
<h3 class="stat-value">${contacts.length}</h3>
|
|
16
|
+
<span class="stat-change up">+3 this month</span>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="stat-card">
|
|
20
|
+
<div class="stat-icon">💼</div>
|
|
21
|
+
<div class="stat-info">
|
|
22
|
+
<p class="stat-label">Active Deals</p>
|
|
23
|
+
<h3 class="stat-value">${activeDeals.length}</h3>
|
|
24
|
+
<span class="stat-change up">+2 this week</span>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="stat-card">
|
|
28
|
+
<div class="stat-icon">📊</div>
|
|
29
|
+
<div class="stat-info">
|
|
30
|
+
<p class="stat-label">Pipeline Value</p>
|
|
31
|
+
<h3 class="stat-value">$${pipelineValue.toLocaleString()}</h3>
|
|
32
|
+
<span class="stat-change up">+18.5%</span>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="stat-card">
|
|
36
|
+
<div class="stat-icon">🏆</div>
|
|
37
|
+
<div class="stat-info">
|
|
38
|
+
<p class="stat-label">Won Revenue</p>
|
|
39
|
+
<h3 class="stat-value">$${wonValue.toLocaleString()}</h3>
|
|
40
|
+
<span class="stat-change up">+24.3%</span>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div class="crm-grid">
|
|
46
|
+
<div class="card">
|
|
47
|
+
<h3>Deal Pipeline</h3>
|
|
48
|
+
<div class="pipeline">
|
|
49
|
+
${['Discovery', 'Proposal', 'Negotiation', 'Closed Won'].map(stage => {
|
|
50
|
+
const stageDeals = deals.filter(d => d.stage === stage);
|
|
51
|
+
const stageValue = stageDeals.reduce((s, d) => s + d.value, 0);
|
|
52
|
+
return `
|
|
53
|
+
<div class="pipeline-stage">
|
|
54
|
+
<div class="pipeline-header">
|
|
55
|
+
<span class="pipeline-name">${stage}</span>
|
|
56
|
+
<span class="pipeline-count">${stageDeals.length} deals</span>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="pipeline-value">$${stageValue.toLocaleString()}</div>
|
|
59
|
+
<div class="pipeline-bar">
|
|
60
|
+
<div class="pipeline-fill" style="width: ${(stageValue / totalValue) * 100}%"></div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
`;
|
|
64
|
+
}).join('')}
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div class="card">
|
|
69
|
+
<h3>Recent Contacts</h3>
|
|
70
|
+
<div class="contact-list">
|
|
71
|
+
${contacts.slice(0, 5).map(c => `
|
|
72
|
+
<div class="contact-item">
|
|
73
|
+
<span class="contact-avatar">${c.avatar}</span>
|
|
74
|
+
<div class="contact-info">
|
|
75
|
+
<p class="contact-name">${c.name}</p>
|
|
76
|
+
<p class="contact-company">${c.company}</p>
|
|
77
|
+
</div>
|
|
78
|
+
<span class="status-badge status-${c.status.toLowerCase()}">${c.status}</span>
|
|
79
|
+
</div>
|
|
80
|
+
`).join('')}
|
|
81
|
+
</div>
|
|
82
|
+
<a href="#/contacts" class="view-all-link">View all contacts →</a>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<div class="card">
|
|
87
|
+
<h3>Upcoming Closes</h3>
|
|
88
|
+
<table class="data-table">
|
|
89
|
+
<thead>
|
|
90
|
+
<tr>
|
|
91
|
+
<th>Deal</th>
|
|
92
|
+
<th>Company</th>
|
|
93
|
+
<th>Value</th>
|
|
94
|
+
<th>Stage</th>
|
|
95
|
+
<th>Close Date</th>
|
|
96
|
+
<th>Probability</th>
|
|
97
|
+
</tr>
|
|
98
|
+
</thead>
|
|
99
|
+
<tbody>
|
|
100
|
+
${activeDeals.map(d => `
|
|
101
|
+
<tr>
|
|
102
|
+
<td><strong>${d.title}</strong></td>
|
|
103
|
+
<td>${d.company}</td>
|
|
104
|
+
<td class="deal-value">$${d.value.toLocaleString()}</td>
|
|
105
|
+
<td><span class="stage-badge stage-${d.stage.toLowerCase().replace(' ', '-')}">${d.stage}</span></td>
|
|
106
|
+
<td>${d.closeDate}</td>
|
|
107
|
+
<td>
|
|
108
|
+
<div class="probability">
|
|
109
|
+
<div class="probability-bar">
|
|
110
|
+
<div class="probability-fill" style="width: ${d.probability}%"></div>
|
|
111
|
+
</div>
|
|
112
|
+
<span>${d.probability}%</span>
|
|
113
|
+
</div>
|
|
114
|
+
</td>
|
|
115
|
+
</tr>
|
|
116
|
+
`).join('')}
|
|
117
|
+
</tbody>
|
|
118
|
+
</table>
|
|
119
|
+
</div>
|
|
120
|
+
`);
|
|
121
|
+
}
|