create-canaima-app 1.0.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.
Files changed (46) hide show
  1. package/index.js +168 -0
  2. package/package.json +28 -0
  3. package/tauri-materialize/.prettierignore +8 -0
  4. package/tauri-materialize/.prettierrc +9 -0
  5. package/tauri-materialize/.vscode/extensions.json +3 -0
  6. package/tauri-materialize/README.md +7 -0
  7. package/tauri-materialize/index.html +24 -0
  8. package/tauri-materialize/package-lock.json +2331 -0
  9. package/tauri-materialize/package.json +30 -0
  10. package/tauri-materialize/public/tauri.svg +6 -0
  11. package/tauri-materialize/public/vite.svg +1 -0
  12. package/tauri-materialize/src/App.vue +20 -0
  13. package/tauri-materialize/src/assets/image.png +0 -0
  14. package/tauri-materialize/src/components/Bienvenido.vue +424 -0
  15. package/tauri-materialize/src/css/style.css +106 -0
  16. package/tauri-materialize/src/main.ts +15 -0
  17. package/tauri-materialize/src/router/index.ts +16 -0
  18. package/tauri-materialize/src/stores/useAppStore.ts +34 -0
  19. package/tauri-materialize/src/views/HomeView.vue +8 -0
  20. package/tauri-materialize/src/vite-env.d.ts +7 -0
  21. package/tauri-materialize/src-tauri/Cargo.lock +5471 -0
  22. package/tauri-materialize/src-tauri/Cargo.toml +31 -0
  23. package/tauri-materialize/src-tauri/build.rs +3 -0
  24. package/tauri-materialize/src-tauri/capabilities/default.json +7 -0
  25. package/tauri-materialize/src-tauri/icons/128x128.png +0 -0
  26. package/tauri-materialize/src-tauri/icons/128x128@2x.png +0 -0
  27. package/tauri-materialize/src-tauri/icons/32x32.png +0 -0
  28. package/tauri-materialize/src-tauri/icons/Square107x107Logo.png +0 -0
  29. package/tauri-materialize/src-tauri/icons/Square142x142Logo.png +0 -0
  30. package/tauri-materialize/src-tauri/icons/Square150x150Logo.png +0 -0
  31. package/tauri-materialize/src-tauri/icons/Square284x284Logo.png +0 -0
  32. package/tauri-materialize/src-tauri/icons/Square30x30Logo.png +0 -0
  33. package/tauri-materialize/src-tauri/icons/Square310x310Logo.png +0 -0
  34. package/tauri-materialize/src-tauri/icons/Square44x44Logo.png +0 -0
  35. package/tauri-materialize/src-tauri/icons/Square71x71Logo.png +0 -0
  36. package/tauri-materialize/src-tauri/icons/Square89x89Logo.png +0 -0
  37. package/tauri-materialize/src-tauri/icons/StoreLogo.png +0 -0
  38. package/tauri-materialize/src-tauri/icons/icon.icns +0 -0
  39. package/tauri-materialize/src-tauri/icons/icon.ico +0 -0
  40. package/tauri-materialize/src-tauri/icons/icon.png +0 -0
  41. package/tauri-materialize/src-tauri/src/lib.rs +17 -0
  42. package/tauri-materialize/src-tauri/src/main.rs +12 -0
  43. package/tauri-materialize/src-tauri/tauri.conf.json +29 -0
  44. package/tauri-materialize/tsconfig.json +29 -0
  45. package/tauri-materialize/tsconfig.node.json +10 -0
  46. package/tauri-materialize/vite.config.ts +32 -0
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "plantilla-tauri-vue",
3
+ "private": true,
4
+ "version": "0.1.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "npm run format || true && vite",
8
+ "build": "vue-tsc --noEmit && vite build",
9
+ "preview": "vite preview",
10
+ "tauri": "npm run format || true && tauri",
11
+ "format": "prettier --write . && cd src-tauri && cargo fmt --all || true"
12
+ },
13
+ "dependencies": {
14
+ "materialize-css": "^1.0.0",
15
+ "@tauri-apps/api": "^2",
16
+ "@tauri-apps/plugin-opener": "^2",
17
+ "lucide-vue-next": "^1.0.0",
18
+ "pinia": "^3.0.4",
19
+ "vue": "^3.5.13",
20
+ "vue-router": "^5.0.4"
21
+ },
22
+ "devDependencies": {
23
+ "@tauri-apps/cli": "^2",
24
+ "@vitejs/plugin-vue": "^5.2.1",
25
+ "prettier": "^3.8.1",
26
+ "typescript": "~5.6.2",
27
+ "vite": "^6.0.3",
28
+ "vue-tsc": "^2.1.10"
29
+ }
30
+ }
@@ -0,0 +1,6 @@
1
+ <svg width="206" height="231" viewBox="0 0 206 231" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M143.143 84C143.143 96.1503 133.293 106 121.143 106C108.992 106 99.1426 96.1503 99.1426 84C99.1426 71.8497 108.992 62 121.143 62C133.293 62 143.143 71.8497 143.143 84Z" fill="#FFC131"/>
3
+ <ellipse cx="84.1426" cy="147" rx="22" ry="22" transform="rotate(180 84.1426 147)" fill="#24C8DB"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M166.738 154.548C157.86 160.286 148.023 164.269 137.757 166.341C139.858 160.282 141 153.774 141 147C141 144.543 140.85 142.121 140.558 139.743C144.975 138.204 149.215 136.139 153.183 133.575C162.73 127.404 170.292 118.608 174.961 108.244C179.63 97.8797 181.207 86.3876 179.502 75.1487C177.798 63.9098 172.884 53.4021 165.352 44.8883C157.82 36.3744 147.99 30.2165 137.042 27.1546C126.095 24.0926 114.496 24.2568 103.64 27.6274C92.7839 30.998 83.1319 37.4317 75.8437 46.1553C74.9102 47.2727 74.0206 48.4216 73.176 49.5993C61.9292 50.8488 51.0363 54.0318 40.9629 58.9556C44.2417 48.4586 49.5653 38.6591 56.679 30.1442C67.0505 17.7298 80.7861 8.57426 96.2354 3.77762C111.685 -1.01901 128.19 -1.25267 143.769 3.10474C159.348 7.46215 173.337 16.2252 184.056 28.3411C194.775 40.457 201.767 55.4101 204.193 71.404C206.619 87.3978 204.374 103.752 197.73 118.501C191.086 133.25 180.324 145.767 166.738 154.548ZM41.9631 74.275L62.5557 76.8042C63.0459 72.813 63.9401 68.9018 65.2138 65.1274C57.0465 67.0016 49.2088 70.087 41.9631 74.275Z" fill="#FFC131"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M38.4045 76.4519C47.3493 70.6709 57.2677 66.6712 67.6171 64.6132C65.2774 70.9669 64 77.8343 64 85.0001C64 87.1434 64.1143 89.26 64.3371 91.3442C60.0093 92.8732 55.8533 94.9092 51.9599 97.4256C42.4128 103.596 34.8505 112.392 30.1816 122.756C25.5126 133.12 23.9357 144.612 25.6403 155.851C27.3449 167.09 32.2584 177.598 39.7906 186.112C47.3227 194.626 57.153 200.784 68.1003 203.846C79.0476 206.907 90.6462 206.743 101.502 203.373C112.359 200.002 122.011 193.568 129.299 184.845C130.237 183.722 131.131 182.567 131.979 181.383C143.235 180.114 154.132 176.91 164.205 171.962C160.929 182.49 155.596 192.319 148.464 200.856C138.092 213.27 124.357 222.426 108.907 227.222C93.458 232.019 76.9524 232.253 61.3736 227.895C45.7948 223.538 31.8055 214.775 21.0867 202.659C10.3679 190.543 3.37557 175.59 0.949823 159.596C-1.47592 143.602 0.768139 127.248 7.41237 112.499C14.0566 97.7497 24.8183 85.2327 38.4045 76.4519ZM163.062 156.711L163.062 156.711C162.954 156.773 162.846 156.835 162.738 156.897C162.846 156.835 162.954 156.773 163.062 156.711Z" fill="#24C8DB"/>
6
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1,20 @@
1
+ <script setup lang="ts">
2
+ import { onMounted } from 'vue'
3
+ import { RouterView } from 'vue-router'
4
+ import { useAppStore } from './stores/useAppStore'
5
+
6
+ const appStore = useAppStore()
7
+
8
+ onMounted(() => {
9
+ appStore.initTheme() // Aplica el tema seleccionado almacenado en cache
10
+ })
11
+ </script>
12
+
13
+ <template>
14
+ <!-- <RouterView> monta automáticamente el componente `HomeView.vue` que configuraste -->
15
+ <RouterView />
16
+ </template>
17
+
18
+ <style>
19
+ /* Estilos globales principales o reglas reset van aquí */
20
+ </style>
@@ -0,0 +1,424 @@
1
+ <script setup lang="ts">
2
+ import { ref, onMounted } from 'vue'
3
+ import { invoke } from '@tauri-apps/api/core'
4
+ import { useAppStore } from '../stores/useAppStore'
5
+ import imageLogo from '../assets/image.png'
6
+ import { Sparkles, Layers, Database, Palette, Cpu, Smartphone, Sun, Moon, ArrowDown, Terminal, RefreshCw, CheckCircle, Code, Lock, Brush, Star } from 'lucide-vue-next'
7
+
8
+ const appStore = useAppStore()
9
+ const greetMsg = ref('')
10
+ const name = ref('')
11
+
12
+ async function greet() {
13
+ if (name.value) {
14
+ greetMsg.value = await invoke('greet', { name: name.value })
15
+ name.value = ''
16
+ }
17
+ }
18
+
19
+ onMounted(() => {
20
+ setTimeout(() => {
21
+ const elems = document.querySelectorAll('.collapsible')
22
+ if (window.M) window.M.Collapsible.init(elems)
23
+ }, 100)
24
+ })
25
+ </script>
26
+
27
+ <template>
28
+ <div>
29
+ <!-- Navbar (Fondo primario automático) -->
30
+ <div class="navbar-fixed">
31
+ <nav>
32
+ <div class="nav-wrapper container">
33
+ <a
34
+ href="#"
35
+ class="brand-logo"
36
+ style="display: flex; align-items: center; height: 100%; font-size: 1.5rem"
37
+ >
38
+ Canaima App
39
+ </a>
40
+ <ul
41
+ id="nav-mobile"
42
+ class="right hide-on-small-only"
43
+ >
44
+ <li>
45
+ <a
46
+ href="#!"
47
+ @click.prevent="appStore.toggleDarkMode()"
48
+ class="tooltipped"
49
+ data-position="bottom"
50
+ data-tooltip="Alternar Tema"
51
+ style="display: flex; align-items: center; justify-content: center; height: 64px"
52
+ >
53
+ <Sun
54
+ v-if="appStore.isDarkMode"
55
+ :size="20"
56
+ />
57
+ <Moon
58
+ v-else
59
+ :size="20"
60
+ />
61
+ </a>
62
+ </li>
63
+ <li>
64
+ <a
65
+ href="https://tauri.app"
66
+ target="_blank"
67
+ >
68
+ Tauri
69
+ </a>
70
+ </li>
71
+ <li>
72
+ <a
73
+ href="https://vuejs.org"
74
+ target="_blank"
75
+ >
76
+ Vue 3
77
+ </a>
78
+ </li>
79
+ <li>
80
+ <a
81
+ href="https://materializecss.com"
82
+ target="_blank"
83
+ >
84
+ Materialize
85
+ </a>
86
+ </li>
87
+ </ul>
88
+ </div>
89
+ </nav>
90
+ </div>
91
+
92
+ <!-- Hero / Main Section (Fondo usa el de style.css) -->
93
+ <div
94
+ class="section no-pad-bot"
95
+ id="index-banner"
96
+ style="padding: 4rem 0; margin-bottom: 0"
97
+ >
98
+ <div class="container">
99
+ <div class="center-align">
100
+ <img
101
+ :src="imageLogo"
102
+ alt="Canaima Logo"
103
+ style="max-height: 150px; margin-bottom: 10px; border-radius: 12px"
104
+ />
105
+ </div>
106
+ <h1
107
+ class="header center primary-text"
108
+ style="font-weight: 300; margin-top: 0; font-size: 3.5rem; display: flex; align-items: center; justify-content: center; gap: 15px"
109
+ >
110
+ Arquitectura Profesional
111
+ <Sparkles
112
+ :size="40"
113
+ stroke-width="1.5"
114
+ />
115
+ </h1>
116
+ <div class="row center">
117
+ <h5
118
+ class="header col s12 light"
119
+ style="line-height: 1.6"
120
+ >
121
+ Esta plantilla implementa Vue 3, Pinia, Vue Router y MaterializeCSS de forma nativa e impulsada por el rendimiento de Tauri (Rust).
122
+ </h5>
123
+ </div>
124
+ <div
125
+ class="row center"
126
+ style="margin-top: 2rem"
127
+ >
128
+ <a
129
+ href="#test-ipc"
130
+ class="btn-large waves-effect waves-light"
131
+ style="border-radius: 30px; letter-spacing: 0.5px; display: inline-flex; align-items: center; gap: 8px"
132
+ >
133
+ Hacer Prueba IPC
134
+ <ArrowDown :size="20" />
135
+ </a>
136
+ </div>
137
+ </div>
138
+ </div>
139
+
140
+ <!-- Documentación Técnica / Explicación -->
141
+ <div class="container">
142
+ <div
143
+ class="section"
144
+ style="padding: 4rem 0"
145
+ >
146
+ <h4
147
+ class="center-align"
148
+ style="font-weight: 300"
149
+ >
150
+ ¿Cómo funciona esta Plantilla?
151
+ </h4>
152
+
153
+ <ul class="collapsible popout">
154
+ <li class="active">
155
+ <div
156
+ class="collapsible-header"
157
+ style="display: flex; align-items: center; gap: 10px"
158
+ >
159
+ <Layers
160
+ :size="20"
161
+ class="primary-text"
162
+ />
163
+ <b>1. Rutas y Vistas (Vue Router)</b>
164
+ </div>
165
+ <div class="collapsible-body">
166
+ <span>
167
+ El proyecto utiliza
168
+ <code>vue-router</code>
169
+ . En tu
170
+ <code>App.vue</code>
171
+ hay un
172
+ <code>&lt;RouterView /&gt;</code>
173
+ que carga dinámicamente el componente correcto dependiendo de la URL. Añade tus nuevas pantallas en el directorio
174
+ <code>/src/views/</code>
175
+ y regístralas en
176
+ <code>/src/router/index.ts</code>
177
+ .
178
+ </span>
179
+ </div>
180
+ </li>
181
+ <li>
182
+ <div
183
+ class="collapsible-header"
184
+ style="display: flex; align-items: center; gap: 10px"
185
+ >
186
+ <Database
187
+ :size="20"
188
+ class="primary-text"
189
+ />
190
+ <b>2. Estado Global (Pinia)</b>
191
+ </div>
192
+ <div class="collapsible-body">
193
+ <span>
194
+ Incluye la arquitectura oficial de Pinia activada. Mira
195
+ <code>src/stores/useAppStore.ts</code>
196
+ para ver cómo se guarda la configuración del Modo Oscuro que estás usando en este momento. Este almacén global preserva el estado en todo momento y utiliza
197
+ <code>localStorage</code>
198
+ directamente allí.
199
+ </span>
200
+ </div>
201
+ </li>
202
+ <li>
203
+ <div
204
+ class="collapsible-header"
205
+ style="display: flex; align-items: center; gap: 10px"
206
+ >
207
+ <Palette
208
+ :size="20"
209
+ class="primary-text"
210
+ />
211
+ <b>3. Estilos Estándar (MaterializeCSS)</b>
212
+ </div>
213
+ <div class="collapsible-body">
214
+ <span>
215
+ Todos los estilos provienen nativamente del CSS global de Materialize y
216
+ <code>style.css</code>
217
+ . La aplicación se basa en tres colores estándar: el llamativo (0b6793 configurado como raíz dinámica), el color oscuro global (191919) y el color claro (ececec). El modo oscuro se alterna en el body con
218
+ <code>.dark-mode</code>
219
+ .
220
+ </span>
221
+ </div>
222
+ </li>
223
+ <li>
224
+ <div
225
+ class="collapsible-header"
226
+ style="display: flex; align-items: center; gap: 10px"
227
+ >
228
+ <Cpu
229
+ :size="20"
230
+ class="primary-text"
231
+ />
232
+ <b>4. Backend (Tauri & Rust)</b>
233
+ </div>
234
+ <div class="collapsible-body">
235
+ <span>
236
+ La carpeta
237
+ <code>src-tauri/</code>
238
+ posee el kernel basado en Rust. Es considerablemente más veloz y ligero que Electron. La comunicación entre tu vista Vue y Rust ocurre a través de peticiones IPC ultrarrápidas con la librería
239
+ <code>@tauri-apps/api/core</code>
240
+ . Puedes probarlo abajo.
241
+ </span>
242
+ </div>
243
+ </li>
244
+ <li>
245
+ <div
246
+ class="collapsible-header"
247
+ style="display: flex; align-items: center; gap: 10px"
248
+ >
249
+ <Smartphone
250
+ :size="20"
251
+ class="primary-text"
252
+ />
253
+ <b>5. Iconografía (Lucide)</b>
254
+ </div>
255
+ <div class="collapsible-body">
256
+ <span>
257
+ Esta plantilla integra
258
+ <code>lucide-vue-next</code>
259
+ para iconos vectoriales modernos y ligeros. Puedes importarlos individualmente como componentes Vue, lo que permite un mejor árbol-shaking y personalización de tamaño o color dinámica.
260
+ </span>
261
+ </div>
262
+ </li>
263
+ </ul>
264
+ </div>
265
+ </div>
266
+
267
+ <!-- Form Section -->
268
+ <div
269
+ id="test-ipc"
270
+ style="padding: 4rem 0; margin-top: 2rem"
271
+ >
272
+ <div class="container">
273
+ <div class="row">
274
+ <div class="col s12 m8 offset-m2 l6 offset-l3">
275
+ <div
276
+ class="card"
277
+ style="border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08)"
278
+ >
279
+ <div
280
+ class="card-content"
281
+ style="padding: 3rem"
282
+ >
283
+ <span
284
+ class="card-title center-align"
285
+ style="font-weight: 500; margin-bottom: 24px"
286
+ >
287
+ Prueba IPC (Inter-Process)
288
+ </span>
289
+
290
+ <form @submit.prevent="greet">
291
+ <div class="input-field">
292
+ <Terminal
293
+ class="prefix"
294
+ :size="24"
295
+ style="margin-top: 12px"
296
+ />
297
+ <input
298
+ id="icon_prefix"
299
+ type="text"
300
+ v-model="name"
301
+ required
302
+ class="validate"
303
+ />
304
+ <label for="icon_prefix">Escribe tu nombre</label>
305
+ </div>
306
+ <div
307
+ class="center-align"
308
+ style="margin-top: 1.5rem"
309
+ >
310
+ <button
311
+ class="btn-large waves-effect waves-light"
312
+ type="submit"
313
+ style="border-radius: 30px; letter-spacing: 0.5px; display: inline-flex; align-items: center; gap: 8px"
314
+ >
315
+ Probar Respuesta
316
+ <RefreshCw :size="20" />
317
+ </button>
318
+ </div>
319
+ </form>
320
+ </div>
321
+
322
+ <!-- Response Alert -->
323
+ <div
324
+ class="card-action center-align primary-text"
325
+ v-if="greetMsg"
326
+ style="border-top: 1px solid rgba(0, 0, 0, 0.05); padding: 1.5rem"
327
+ >
328
+ <span style="font-weight: 600; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; gap: 8px">
329
+ <CheckCircle :size="24" />
330
+ {{ greetMsg }}
331
+ </span>
332
+ </div>
333
+ </div>
334
+ </div>
335
+ </div>
336
+ </div>
337
+ </div>
338
+
339
+ <!-- Footer -->
340
+ <footer
341
+ class="page-footer"
342
+ style="padding-top: 3rem"
343
+ >
344
+ <div class="container">
345
+ <div class="row">
346
+ <div class="col l6 s12">
347
+ <h5 class="white-text">Garantía Full-Stack</h5>
348
+ <p
349
+ class="text-lighten-4"
350
+ style="opacity: 0.8"
351
+ >
352
+ Comience a añadir vistas al enrutador en
353
+ <code>src/views/</code>
354
+ , maneje estado en
355
+ <code>src/stores/</code>
356
+ y construya componentes encapsulados en
357
+ <code>src/components/</code>
358
+ .
359
+ </p>
360
+ </div>
361
+ <div class="col l4 offset-l2 s12">
362
+ <h5 class="white-text">Stack Moderno</h5>
363
+ <ul>
364
+ <li style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px">
365
+ <Code :size="16" />
366
+ Vite + Vue 3
367
+ </li>
368
+ <li style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px">
369
+ <Lock :size="16" />
370
+ Tauri / Rust API
371
+ </li>
372
+ <li style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px">
373
+ <Brush :size="16" />
374
+ Materialize CSS
375
+ </li>
376
+ <li style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px">
377
+ <Database :size="16" />
378
+ Pinia Store
379
+ </li>
380
+ <li style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px">
381
+ <Star :size="16" />
382
+ Lucide Icons
383
+ </li>
384
+ </ul>
385
+ </div>
386
+ </div>
387
+ </div>
388
+ <div
389
+ class="footer-copyright"
390
+ style="background-color: rgba(0, 0, 0, 0.15)"
391
+ >
392
+ <div class="container center-align">© 2026 Plantilla Avanzada Canaima App</div>
393
+ </div>
394
+ </footer>
395
+ </div>
396
+ </template>
397
+
398
+ <style scoped>
399
+ /* Transiciones suaves para elementos interactivos y cards */
400
+ .card {
401
+ transition:
402
+ transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
403
+ box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
404
+ }
405
+
406
+ .collapsible-header {
407
+ font-weight: 500;
408
+ transition: background-color 0.2s;
409
+ }
410
+
411
+ body.dark-mode .collapsible-header {
412
+ background-color: #242424;
413
+ border-bottom: 1px solid #333;
414
+ }
415
+
416
+ body.dark-mode .collapsible-body {
417
+ background-color: #1a1a1a;
418
+ border-bottom: 1px solid #333;
419
+ }
420
+
421
+ body.dark-mode .collapsible {
422
+ border: none;
423
+ }
424
+ </style>
@@ -0,0 +1,106 @@
1
+ /* =============== CONFIGURACIÓN ESTÁNDAR DE LA APLICACIÓN =============== */
2
+ :root {
3
+ --color-llamativo: #0b6793;
4
+ --fondo-claro: #ececec;
5
+ --fondo-oscuro: #191919;
6
+ --texto-oscuro: #333333;
7
+ --texto-claro: #ffffff;
8
+ }
9
+
10
+ /* ================ FUENTES ================ */
11
+
12
+ body {
13
+ background-color: var(--fondo-claro);
14
+ color: var(--texto-oscuro);
15
+ transition:
16
+ background-color 0.3s ease,
17
+ color 0.3s ease;
18
+ }
19
+
20
+ /* === Navbars y Footers por defecto en modo claro === */
21
+ nav,
22
+ .page-footer {
23
+ background-color: var(--color-llamativo) !important;
24
+ }
25
+
26
+ /* === Botones Generales === */
27
+ .btn,
28
+ .btn-large,
29
+ .btn-floating {
30
+ background-color: var(--color-llamativo) !important;
31
+ }
32
+ .btn:hover,
33
+ .btn-large:hover,
34
+ .btn-floating:hover {
35
+ background-color: #1079ab !important; /* Brillo ligero en hover */
36
+ }
37
+
38
+ /* === Color Llamativo en Textos e Iconos (Focus) === */
39
+ .primary-text,
40
+ .material-icons.prefix {
41
+ color: var(--color-llamativo) !important;
42
+ }
43
+
44
+ /* === Campos de Texto (Focus Estándar) === */
45
+ .input-field input[type='text']:focus + label,
46
+ .input-field input[type='password']:focus + label,
47
+ .input-field input[type='email']:focus + label,
48
+ .input-field .prefix.active {
49
+ color: var(--color-llamativo) !important;
50
+ }
51
+
52
+ .input-field input[type='text']:focus,
53
+ .input-field input[type='password']:focus,
54
+ .input-field input[type='email']:focus {
55
+ border-bottom: 1px solid var(--color-llamativo) !important;
56
+ box-shadow: 0 1px 0 0 var(--color-llamativo) !important;
57
+ }
58
+
59
+ /* =============== MODO OSCURO (191919) =============== */
60
+ body.dark-mode {
61
+ background-color: var(--fondo-oscuro) !important;
62
+ color: var(--texto-claro) !important;
63
+ }
64
+
65
+ /* Contenedores en modo oscuro */
66
+ body.dark-mode .card,
67
+ body.dark-mode .card-panel {
68
+ background-color: #242424 !important; /* Un poco más claro que 191919 para dar profundidad */
69
+ color: var(--texto-claro) !important;
70
+ }
71
+
72
+ /* Textos adaptados al modo oscuro */
73
+ body.dark-mode .card .card-content span.card-title,
74
+ body.dark-mode h1,
75
+ body.dark-mode h2,
76
+ body.dark-mode h3,
77
+ body.dark-mode h4,
78
+ body.dark-mode h5 {
79
+ color: var(--texto-claro) !important;
80
+ }
81
+
82
+ body.dark-mode p.grey-text {
83
+ color: #bbbbbb !important;
84
+ }
85
+
86
+ /* Nav y Footer en modo oscuro */
87
+ body.dark-mode nav,
88
+ body.dark-mode .page-footer {
89
+ background-color: #121212 !important;
90
+ }
91
+
92
+ /* Inputs en modo oscuro */
93
+ body.dark-mode .input-field input[type='text'] {
94
+ color: var(--texto-claro) !important;
95
+ border-bottom: 1px solid #666 !important;
96
+ }
97
+
98
+ body.dark-mode .input-field input[type='text']:focus + label,
99
+ body.dark-mode .input-field .prefix.active {
100
+ color: var(--color-llamativo) !important;
101
+ }
102
+
103
+ body.dark-mode .input-field input[type='text']:focus {
104
+ border-bottom: 1px solid var(--color-llamativo) !important;
105
+ box-shadow: 0 1px 0 0 var(--color-llamativo) !important;
106
+ }
@@ -0,0 +1,15 @@
1
+ import { createApp } from 'vue'
2
+ import { createPinia } from 'pinia'
3
+ import App from './App.vue'
4
+ import router from './router'
5
+
6
+ import 'materialize-css/dist/css/materialize.min.css'
7
+ import 'materialize-css/dist/js/materialize.min.js'
8
+
9
+ import './css/style.css'
10
+
11
+ const app = createApp(App)
12
+
13
+ app.use(createPinia())
14
+ app.use(router)
15
+ app.mount('#app')
@@ -0,0 +1,16 @@
1
+ import { createRouter, createWebHistory } from 'vue-router'
2
+ import HomeView from '../views/HomeView.vue'
3
+
4
+ const router = createRouter({
5
+ history: createWebHistory(import.meta.env.BASE_URL),
6
+ routes: [
7
+ {
8
+ path: '/',
9
+ name: 'home',
10
+ component: HomeView,
11
+ },
12
+ // Añade más rutas y vistas aquí para expandir el enrutamiento...
13
+ ],
14
+ })
15
+
16
+ export default router
@@ -0,0 +1,34 @@
1
+ import { defineStore } from 'pinia'
2
+ import { ref } from 'vue'
3
+
4
+ // 'useAppStore' actúa como el almacén global (Global State) principal
5
+ export const useAppStore = defineStore('app', () => {
6
+ // === Estado (Variables Globales) ===
7
+ const isDarkMode = ref(localStorage.getItem('theme') === 'dark')
8
+
9
+ // Inicializar el tema actual basado en las preferencias guardadas
10
+ function initTheme() {
11
+ if (isDarkMode.value) {
12
+ document.body.classList.add('dark-mode')
13
+ }
14
+ }
15
+
16
+ // === Acciones (Mutaciones) ===
17
+ function toggleDarkMode() {
18
+ isDarkMode.value = !isDarkMode.value
19
+ if (isDarkMode.value) {
20
+ document.body.classList.add('dark-mode')
21
+ localStorage.setItem('theme', 'dark')
22
+ } else {
23
+ document.body.classList.remove('dark-mode')
24
+ localStorage.setItem('theme', 'light')
25
+ }
26
+ }
27
+
28
+ // === Exportar ===
29
+ return {
30
+ isDarkMode,
31
+ initTheme,
32
+ toggleDarkMode,
33
+ }
34
+ })
@@ -0,0 +1,8 @@
1
+ <script setup lang="ts">
2
+ import Bienvenido from '../components/Bienvenido.vue'
3
+ </script>
4
+
5
+ <template>
6
+ <!-- Esta es la página principal que renderiza el componente de bienvenida -->
7
+ <Bienvenido />
8
+ </template>
@@ -0,0 +1,7 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module '*.vue' {
4
+ import type { DefineComponent } from 'vue'
5
+ const component: DefineComponent<{}, {}, any>
6
+ export default component
7
+ }