From eec21b7118cdf48f16c842077dfc1ec9b3ba2dc3 Mon Sep 17 00:00:00 2001 From: Artur Oliveira Date: Thu, 14 Aug 2025 12:17:32 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20implementa=20estrutura=20base=20da=20ap?= =?UTF-8?q?lica=C3=A7=C3=A3o=20com=20navega=C3=A7=C3=A3o=20e=20tema=20escu?= =?UTF-8?q?ro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Configura HTML principal com tema escuro e idioma português - Adiciona Vue Router com rotas para Dashboard e Seções - Cria componentes de navegação: SidePanel e NavButton - Implementa páginas Dashboard e Sections - Configura sistema de cores personalizado no Tailwind CSS - Estabelece layout principal com painel lateral de navegação - Remove componente HelloWorld padrão do template --- index.html | 27 +++++++++++++---------- package.json | 3 ++- router.ts | 22 +++++++++++++++++++ src/App.vue | 9 ++++++++ src/components/HelloWorld.vue | 41 ----------------------------------- src/components/NavButton.vue | 16 ++++++++++++++ src/components/SidePanel.vue | 22 +++++++++++++++++++ src/main.ts | 5 +++-- src/pages/Dashboard.vue | 8 +++++++ src/pages/Sections.vue | 6 +++++ src/style.css | 23 +++++++++++++++++++- tailwind.config.js | 13 ++++++++++- yarn.lock | 12 ++++++++++ 13 files changed, 149 insertions(+), 58 deletions(-) create mode 100644 router.ts delete mode 100644 src/components/HelloWorld.vue create mode 100644 src/components/NavButton.vue create mode 100644 src/components/SidePanel.vue create mode 100644 src/pages/Dashboard.vue create mode 100644 src/pages/Sections.vue diff --git a/index.html b/index.html index dde16aa..c282478 100644 --- a/index.html +++ b/index.html @@ -1,13 +1,16 @@ - - - - - - Vite + Vue + TS - - -
- - - + + + + + + + Vite + Vue + TS + + + +
+ + + + \ No newline at end of file diff --git a/package.json b/package.json index f730ee8..9d39722 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.5.18" + "vue": "^3.5.18", + "vue-router": "4" }, "devDependencies": { "@vitejs/plugin-vue": "^6.0.1", diff --git a/router.ts b/router.ts new file mode 100644 index 0000000..f78f04f --- /dev/null +++ b/router.ts @@ -0,0 +1,22 @@ +import { createRouter, createWebHashHistory } from 'vue-router'; +import Dashboard from './src/pages/Dashboard.vue'; +import Sections from './src/pages/Sections.vue'; +const routes = [ + { + path: '/', + name: 'dashboard', + component: Dashboard + }, + { + path: '/sections', + name: 'Seções', + component: Sections + } +] + +const router = createRouter({ + history: createWebHashHistory(), + routes +}) + +export default router; \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index dd302d7..3f0f367 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,14 @@ diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index b58e52b..0000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/src/components/NavButton.vue b/src/components/NavButton.vue new file mode 100644 index 0000000..a5f5c4b --- /dev/null +++ b/src/components/NavButton.vue @@ -0,0 +1,16 @@ + + + \ No newline at end of file diff --git a/src/components/SidePanel.vue b/src/components/SidePanel.vue new file mode 100644 index 0000000..6140329 --- /dev/null +++ b/src/components/SidePanel.vue @@ -0,0 +1,22 @@ + + + \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 2425c0f..4d0cdd1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,6 @@ import { createApp } from 'vue' -import './style.css' +import router from '../router' import App from './App.vue' +import './style.css' -createApp(App).mount('#app') +createApp(App).use(router).mount('#app') diff --git a/src/pages/Dashboard.vue b/src/pages/Dashboard.vue new file mode 100644 index 0000000..38e1189 --- /dev/null +++ b/src/pages/Dashboard.vue @@ -0,0 +1,8 @@ + + + diff --git a/src/pages/Sections.vue b/src/pages/Sections.vue new file mode 100644 index 0000000..f139740 --- /dev/null +++ b/src/pages/Sections.vue @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/style.css b/src/style.css index bd6213e..91245fa 100644 --- a/src/style.css +++ b/src/style.css @@ -1,3 +1,24 @@ @tailwind base; @tailwind components; -@tailwind utilities; \ No newline at end of file +@tailwind utilities; + +:root { + --color-bg: #f8f9fa; + --color-card-bg: #ffffff; + --color-card-hover: #f1f3f5; + --color-accent: #fc5700; + --color-text: #1a1a1a; + --color-text-secondary: #555555; + --color-border: #dddddd; +} + +/* Dark Mode */ +[data-theme="dark"] { + --color-bg: #26292b; + --color-card-bg: #151718; + --color-card-hover: #1d1f21; + --color-accent: #fc5700; + --color-text: #f5f5f5; + --color-text-secondary: #a0a0a0; + --color-border: #333638; +} \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index a28ce71..8ef45eb 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -4,8 +4,19 @@ export default { "./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}", ], + darkMode: ['dark', 'dark-theme="dark"'], theme: { - extend: {}, + extend: { + colors: { + bg: 'var(--color-bg)', + cardBg: 'var(--color-card-bg)', + cardHover: 'var(--color-card-hover)', + accent: 'var(--color-accent)', + text: 'var(--color-text)', + textSecondary: 'var(--color-text-secondary)', + border: 'var(--color-border)', + } + }, }, plugins: [], } diff --git a/yarn.lock b/yarn.lock index 7db158a..c7886ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -414,6 +414,11 @@ de-indent "^1.0.2" he "^1.2.0" +"@vue/devtools-api@^6.6.4": + version "6.6.4" + resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.6.4.tgz#cbe97fe0162b365edc1dba80e173f90492535343" + integrity sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g== + "@vue/language-core@3.0.5": version "3.0.5" resolved "https://registry.yarnpkg.com/@vue/language-core/-/language-core-3.0.5.tgz#c296c65e7b2e6d69fbf2088f0208a55362825323" @@ -1304,6 +1309,13 @@ vscode-uri@^3.0.8: resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.1.0.tgz#dd09ec5a66a38b5c3fffc774015713496d14e09c" integrity sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ== +vue-router@4: + version "4.5.1" + resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.5.1.tgz#47bffe2d3a5479d2886a9a244547a853aa0abf69" + integrity sha512-ogAF3P97NPm8fJsE4by9dwSYtDwXIY1nFY9T6DyQnGHd1E2Da94w9JIolpe42LJGIl0DwOHBi8TcRPlPGwbTtw== + dependencies: + "@vue/devtools-api" "^6.6.4" + vue-tsc@^3.0.5: version "3.0.5" resolved "https://registry.yarnpkg.com/vue-tsc/-/vue-tsc-3.0.5.tgz#2edb2222393fd8b70613c083aacc72484a9296be"