nuxt-ignis 0.2.5 → 0.3.1

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 (140) hide show
  1. package/.data/content/contents.sqlite +0 -0
  2. package/.env +43 -0
  3. package/.nuxt/app.config.mjs +18 -0
  4. package/.nuxt/component-chunk.mjs +1 -0
  5. package/.nuxt/components.d.ts +322 -0
  6. package/.nuxt/content/components.ts +51 -0
  7. package/.nuxt/content/database.compressed.mjs +1 -0
  8. package/.nuxt/content/manifest.ts +33 -0
  9. package/.nuxt/content/sql_dump +6 -0
  10. package/.nuxt/content/types.d.ts +13 -0
  11. package/.nuxt/dist/server/client.manifest.json +18 -0
  12. package/.nuxt/dist/server/client.manifest.mjs +18 -0
  13. package/.nuxt/dist/server/server.mjs +1 -0
  14. package/.nuxt/eslint-typegen.d.ts +9401 -0
  15. package/.nuxt/eslint.config.d.mts +9 -0
  16. package/.nuxt/eslint.config.mjs +53 -0
  17. package/.nuxt/i18n.options.mjs +165 -0
  18. package/.nuxt/imports.d.ts +82 -0
  19. package/.nuxt/manifest/latest.json +1 -0
  20. package/.nuxt/manifest/meta/dev.json +1 -0
  21. package/.nuxt/mdc-configs.mjs +8 -0
  22. package/.nuxt/mdc-highlighter.mjs +213 -0
  23. package/.nuxt/mdc-image-component.mjs +1 -0
  24. package/.nuxt/mdc-imports.mjs +12 -0
  25. package/.nuxt/module/@nuxtjs-sitemap.d.ts +28 -0
  26. package/.nuxt/module/nuxt-robots.d.ts +35 -0
  27. package/.nuxt/module/nuxt-seo-utils.assets.d.ts +25 -0
  28. package/.nuxt/module/nuxt-seo-utils.d.ts +22 -0
  29. package/.nuxt/module/nuxt-site-config.d.ts +43 -0
  30. package/.nuxt/modules/@nuxt-scripts.d.ts +13 -0
  31. package/.nuxt/nitro.json +17 -0
  32. package/.nuxt/nuxt-fonts-global.css +0 -0
  33. package/.nuxt/nuxt-i18n-logger.mjs +1 -0
  34. package/.nuxt/nuxt-icon-client-bundle.mjs +1 -0
  35. package/.nuxt/nuxt-icon-server-bundle.mjs +15 -0
  36. package/.nuxt/nuxt.d.ts +49 -0
  37. package/.nuxt/nuxt.json +9 -0
  38. package/.nuxt/schema/nuxt.schema.d.ts +17 -0
  39. package/.nuxt/schema/nuxt.schema.json +3 -0
  40. package/.nuxt/tailwind/postcss.mjs +15 -0
  41. package/.nuxt/tsconfig.json +374 -0
  42. package/.nuxt/tsconfig.server.json +292 -0
  43. package/.nuxt/types/app-defaults.d.ts +7 -0
  44. package/.nuxt/types/app.config.d.ts +31 -0
  45. package/.nuxt/types/build.d.ts +27 -0
  46. package/.nuxt/types/builder-env.d.ts +1 -0
  47. package/.nuxt/types/i18n-plugin.d.ts +104 -0
  48. package/.nuxt/types/imports.d.ts +899 -0
  49. package/.nuxt/types/layouts.d.ts +7 -0
  50. package/.nuxt/types/middleware.d.ts +7 -0
  51. package/.nuxt/types/neon.d.ts +35 -0
  52. package/.nuxt/types/nitro-config.d.ts +14 -0
  53. package/.nuxt/types/nitro-imports.d.ts +405 -0
  54. package/.nuxt/types/nitro-middleware.d.ts +6 -0
  55. package/.nuxt/types/nitro-nuxt.d.ts +34 -0
  56. package/.nuxt/types/nitro-routes.d.ts +81 -0
  57. package/.nuxt/types/nitro.d.ts +3 -0
  58. package/.nuxt/types/plugins.d.ts +57 -0
  59. package/.nuxt/types/schema.d.ts +1372 -0
  60. package/.nuxt/types/ui.d.ts +35 -0
  61. package/.nuxt/types/vue-shim.d.ts +0 -0
  62. package/.nuxt/ui/accordion.ts +20 -0
  63. package/.nuxt/ui/alert.ts +264 -0
  64. package/.nuxt/ui/avatar-group.ts +52 -0
  65. package/.nuxt/ui/avatar.ts +54 -0
  66. package/.nuxt/ui/badge.ts +263 -0
  67. package/.nuxt/ui/breadcrumb.ts +45 -0
  68. package/.nuxt/ui/button-group.ts +16 -0
  69. package/.nuxt/ui/button.ts +378 -0
  70. package/.nuxt/ui/calendar.ts +103 -0
  71. package/.nuxt/ui/card.ts +34 -0
  72. package/.nuxt/ui/carousel.ts +38 -0
  73. package/.nuxt/ui/checkbox-group.ts +204 -0
  74. package/.nuxt/ui/checkbox.ts +236 -0
  75. package/.nuxt/ui/chip.ts +96 -0
  76. package/.nuxt/ui/collapsible.ts +6 -0
  77. package/.nuxt/ui/color-picker.ts +47 -0
  78. package/.nuxt/ui/command-palette.ts +50 -0
  79. package/.nuxt/ui/container.ts +3 -0
  80. package/.nuxt/ui/context-menu.ts +216 -0
  81. package/.nuxt/ui/drawer.ts +126 -0
  82. package/.nuxt/ui/dropdown-menu.ts +217 -0
  83. package/.nuxt/ui/form-field.ts +48 -0
  84. package/.nuxt/ui/form.ts +3 -0
  85. package/.nuxt/ui/index.ts +50 -0
  86. package/.nuxt/ui/input-menu.ts +436 -0
  87. package/.nuxt/ui/input-number.ts +245 -0
  88. package/.nuxt/ui/input.ts +289 -0
  89. package/.nuxt/ui/kbd.ts +31 -0
  90. package/.nuxt/ui/link.ts +22 -0
  91. package/.nuxt/ui/modal.ts +29 -0
  92. package/.nuxt/ui/navigation-menu.ts +501 -0
  93. package/.nuxt/ui/pagination.ts +13 -0
  94. package/.nuxt/ui/pin-input.ts +171 -0
  95. package/.nuxt/ui/popover.ts +6 -0
  96. package/.nuxt/ui/progress.ts +297 -0
  97. package/.nuxt/ui/radio-group.ts +350 -0
  98. package/.nuxt/ui/select-menu.ts +346 -0
  99. package/.nuxt/ui/select.ts +341 -0
  100. package/.nuxt/ui/separator.ts +172 -0
  101. package/.nuxt/ui/skeleton.ts +3 -0
  102. package/.nuxt/ui/slideover.ts +71 -0
  103. package/.nuxt/ui/slider.ts +171 -0
  104. package/.nuxt/ui/stepper.ts +202 -0
  105. package/.nuxt/ui/switch.ts +131 -0
  106. package/.nuxt/ui/table.ts +147 -0
  107. package/.nuxt/ui/tabs.ts +256 -0
  108. package/.nuxt/ui/textarea.ts +294 -0
  109. package/.nuxt/ui/toast.ts +81 -0
  110. package/.nuxt/ui/toaster.ts +91 -0
  111. package/.nuxt/ui/tooltip.ts +9 -0
  112. package/.nuxt/ui/tree.ts +154 -0
  113. package/.nuxt/ui-image-component.ts +1 -0
  114. package/.nuxt/ui.css +143 -0
  115. package/app.vue +16 -36
  116. package/assets/css/nuxt-ui.css +16 -0
  117. package/assets/css/tailwind.css +10 -44
  118. package/components/AppFeature.vue +47 -3
  119. package/components/AppFeatureList.vue +86 -26
  120. package/components/CurrentTime.vue +9 -9
  121. package/components/ignis/IgnisFooter.vue +16 -0
  122. package/components/ignis/IgnisHeader.vue +48 -0
  123. package/components/ignis/IgnisInfo.vue +26 -0
  124. package/composables/useTranslation.ts +11 -4
  125. package/content/second.md +4 -0
  126. package/features.ts +129 -23
  127. package/i18n/i18n.config.ts +2 -2
  128. package/{assets/lang → i18n/locales}/en.json +6 -1
  129. package/i18n/locales/es.json +4 -0
  130. package/nuxt.config.ts +26 -2
  131. package/package.json +71 -79
  132. package/pages/ignis.vue +3 -0
  133. package/pages/index.vue +1 -12
  134. package/tailwind.config.ts +2 -1
  135. package/utils/i18n-sources.ts +20 -2
  136. package/vueform.config.ts +20 -0
  137. package/.gitattributes +0 -2
  138. package/CHANGELOG.md +0 -72
  139. package/LICENSE +0 -21
  140. package/README.md +0 -147
package/.nuxt/ui.css ADDED
@@ -0,0 +1,143 @@
1
+ @source "./ui";
2
+
3
+ @theme default inline {
4
+ --color-old-neutral-50: oklch(98.5% 0 0);
5
+ --color-old-neutral-100: oklch(97% 0 0);
6
+ --color-old-neutral-200: oklch(92.2% 0 0);
7
+ --color-old-neutral-300: oklch(87% 0 0);
8
+ --color-old-neutral-400: oklch(70.8% 0 0);
9
+ --color-old-neutral-500: oklch(55.6% 0 0);
10
+ --color-old-neutral-600: oklch(43.9% 0 0);
11
+ --color-old-neutral-700: oklch(37.1% 0 0);
12
+ --color-old-neutral-800: oklch(26.9% 0 0);
13
+ --color-old-neutral-900: oklch(20.5% 0 0);
14
+ --color-old-neutral-950: oklch(14.5% 0 0);
15
+ --color-primary-50: var(--ui-color-primary-50);
16
+ --color-primary-100: var(--ui-color-primary-100);
17
+ --color-primary-200: var(--ui-color-primary-200);
18
+ --color-primary-300: var(--ui-color-primary-300);
19
+ --color-primary-400: var(--ui-color-primary-400);
20
+ --color-primary-500: var(--ui-color-primary-500);
21
+ --color-primary-600: var(--ui-color-primary-600);
22
+ --color-primary-700: var(--ui-color-primary-700);
23
+ --color-primary-800: var(--ui-color-primary-800);
24
+ --color-primary-900: var(--ui-color-primary-900);
25
+ --color-primary-950: var(--ui-color-primary-950);
26
+ --color-secondary-50: var(--ui-color-secondary-50);
27
+ --color-secondary-100: var(--ui-color-secondary-100);
28
+ --color-secondary-200: var(--ui-color-secondary-200);
29
+ --color-secondary-300: var(--ui-color-secondary-300);
30
+ --color-secondary-400: var(--ui-color-secondary-400);
31
+ --color-secondary-500: var(--ui-color-secondary-500);
32
+ --color-secondary-600: var(--ui-color-secondary-600);
33
+ --color-secondary-700: var(--ui-color-secondary-700);
34
+ --color-secondary-800: var(--ui-color-secondary-800);
35
+ --color-secondary-900: var(--ui-color-secondary-900);
36
+ --color-secondary-950: var(--ui-color-secondary-950);
37
+ --color-success-50: var(--ui-color-success-50);
38
+ --color-success-100: var(--ui-color-success-100);
39
+ --color-success-200: var(--ui-color-success-200);
40
+ --color-success-300: var(--ui-color-success-300);
41
+ --color-success-400: var(--ui-color-success-400);
42
+ --color-success-500: var(--ui-color-success-500);
43
+ --color-success-600: var(--ui-color-success-600);
44
+ --color-success-700: var(--ui-color-success-700);
45
+ --color-success-800: var(--ui-color-success-800);
46
+ --color-success-900: var(--ui-color-success-900);
47
+ --color-success-950: var(--ui-color-success-950);
48
+ --color-info-50: var(--ui-color-info-50);
49
+ --color-info-100: var(--ui-color-info-100);
50
+ --color-info-200: var(--ui-color-info-200);
51
+ --color-info-300: var(--ui-color-info-300);
52
+ --color-info-400: var(--ui-color-info-400);
53
+ --color-info-500: var(--ui-color-info-500);
54
+ --color-info-600: var(--ui-color-info-600);
55
+ --color-info-700: var(--ui-color-info-700);
56
+ --color-info-800: var(--ui-color-info-800);
57
+ --color-info-900: var(--ui-color-info-900);
58
+ --color-info-950: var(--ui-color-info-950);
59
+ --color-warning-50: var(--ui-color-warning-50);
60
+ --color-warning-100: var(--ui-color-warning-100);
61
+ --color-warning-200: var(--ui-color-warning-200);
62
+ --color-warning-300: var(--ui-color-warning-300);
63
+ --color-warning-400: var(--ui-color-warning-400);
64
+ --color-warning-500: var(--ui-color-warning-500);
65
+ --color-warning-600: var(--ui-color-warning-600);
66
+ --color-warning-700: var(--ui-color-warning-700);
67
+ --color-warning-800: var(--ui-color-warning-800);
68
+ --color-warning-900: var(--ui-color-warning-900);
69
+ --color-warning-950: var(--ui-color-warning-950);
70
+ --color-error-50: var(--ui-color-error-50);
71
+ --color-error-100: var(--ui-color-error-100);
72
+ --color-error-200: var(--ui-color-error-200);
73
+ --color-error-300: var(--ui-color-error-300);
74
+ --color-error-400: var(--ui-color-error-400);
75
+ --color-error-500: var(--ui-color-error-500);
76
+ --color-error-600: var(--ui-color-error-600);
77
+ --color-error-700: var(--ui-color-error-700);
78
+ --color-error-800: var(--ui-color-error-800);
79
+ --color-error-900: var(--ui-color-error-900);
80
+ --color-error-950: var(--ui-color-error-950);
81
+ --color-neutral-50: var(--ui-color-neutral-50);
82
+ --color-neutral-100: var(--ui-color-neutral-100);
83
+ --color-neutral-200: var(--ui-color-neutral-200);
84
+ --color-neutral-300: var(--ui-color-neutral-300);
85
+ --color-neutral-400: var(--ui-color-neutral-400);
86
+ --color-neutral-500: var(--ui-color-neutral-500);
87
+ --color-neutral-600: var(--ui-color-neutral-600);
88
+ --color-neutral-700: var(--ui-color-neutral-700);
89
+ --color-neutral-800: var(--ui-color-neutral-800);
90
+ --color-neutral-900: var(--ui-color-neutral-900);
91
+ --color-neutral-950: var(--ui-color-neutral-950);
92
+ --color-primary: var(--ui-primary);
93
+ --color-secondary: var(--ui-secondary);
94
+ --color-success: var(--ui-success);
95
+ --color-info: var(--ui-info);
96
+ --color-warning: var(--ui-warning);
97
+ --color-error: var(--ui-error);
98
+ --radius-xs: calc(var(--ui-radius) * 0.5);
99
+ --radius-sm: var(--ui-radius);
100
+ --radius-md: calc(var(--ui-radius) * 1.5);
101
+ --radius-lg: calc(var(--ui-radius) * 2);
102
+ --radius-xl: calc(var(--ui-radius) * 3);
103
+ --radius-2xl: calc(var(--ui-radius) * 4);
104
+ --radius-3xl: calc(var(--ui-radius) * 6);
105
+ --text-color-dimmed: var(--ui-text-dimmed);
106
+ --text-color-muted: var(--ui-text-muted);
107
+ --text-color-toned: var(--ui-text-toned);
108
+ --text-color-default: var(--ui-text);
109
+ --text-color-highlighted: var(--ui-text-highlighted);
110
+ --text-color-inverted: var(--ui-text-inverted);
111
+ --background-color-default: var(--ui-bg);
112
+ --background-color-muted: var(--ui-bg-muted);
113
+ --background-color-elevated: var(--ui-bg-elevated);
114
+ --background-color-accented: var(--ui-bg-accented);
115
+ --background-color-inverted: var(--ui-bg-inverted);
116
+ --background-color-border: var(--ui-border);
117
+ --border-color-default: var(--ui-border);
118
+ --border-color-muted: var(--ui-border-muted);
119
+ --border-color-accented: var(--ui-border-accented);
120
+ --border-color-inverted: var(--ui-border-inverted);
121
+ --border-color-bg: var(--ui-bg);
122
+ --ring-color-default: var(--ui-border);
123
+ --ring-color-muted: var(--ui-border-muted);
124
+ --ring-color-accented: var(--ui-border-accented);
125
+ --ring-color-inverted: var(--ui-border-inverted);
126
+ --ring-color-bg: var(--ui-bg);
127
+ --ring-offset-color-default: var(--ui-border);
128
+ --ring-offset-color-muted: var(--ui-border-muted);
129
+ --ring-offset-color-accented: var(--ui-border-accented);
130
+ --ring-offset-color-inverted: var(--ui-border-inverted);
131
+ --ring-offset-color-bg: var(--ui-bg);
132
+ --divide-color-default: var(--ui-border);
133
+ --divide-color-muted: var(--ui-border-muted);
134
+ --divide-color-accented: var(--ui-border-accented);
135
+ --divide-color-inverted: var(--ui-border-inverted);
136
+ --divide-color-bg: var(--ui-bg);
137
+ --outline-color-default: var(--ui-border);
138
+ --outline-color-inverted: var(--ui-border-inverted);
139
+ --stroke-default: var(--ui-border);
140
+ --stroke-inverted: var(--ui-border-inverted);
141
+ --fill-default: var(--ui-border);
142
+ --fill-inverted: var(--ui-border-inverted);
143
+ }
package/app.vue CHANGED
@@ -1,59 +1,39 @@
1
1
  <template>
2
- <div class="p-3">
3
- <div class="ignis-header">
4
- <img src="/nuxt-ignis.png" class="ignis-logo" :title :alt>
5
- <h1 class="my-4 text-4xl text-amber-400 font-bold">
6
- {{ useT("title") }}
7
- </h1>
8
- <img src="/nuxt-ignis.png" class="ignis-logo" :title :alt>
9
- </div>
10
- <div>{{ useT("subtitle") }}</div>
2
+ <UApp v-if="ui">
11
3
  <NuxtPage v-if="pages" />
12
- <AppFeatureList v-else />
13
- <CurrentTime />
14
- <div class="link text-xs">
15
- <NuxtLink to="https://github.com/AloisSeckar/nuxt-ignis">
16
- https://github.com/AloisSeckar/nuxt-ignis
17
- </NuxtLink>
18
- </div>
4
+ <IgnisInfo v-else />
5
+ </UApp>
6
+ <div v-else>
7
+ <NuxtPage v-if="pages" />
8
+ <IgnisInfo v-else />
19
9
  </div>
20
10
  </template>
21
11
 
22
12
  <script setup lang="ts">
23
- import { useT } from '#imports' // requires explicit import for some reason
24
-
25
13
  useHead({
26
14
  title: useAppConfig().textTitle,
27
15
  htmlAttrs: {
28
16
  lang: 'en',
29
17
  },
30
18
  bodyAttrs: {
31
- class: 'bg-slate-900 m-auto text-center text-white',
19
+ class: 'ignis-body',
32
20
  },
33
21
  })
34
22
  initConsola()
35
23
 
36
24
  log.info('Nuxt Ignis was here!')
37
25
 
38
- const title = useT('title')
39
- const alt = title
40
-
41
- const pages = useRuntimeConfig().public.ignis.pages
26
+ const config = useRuntimeConfig().public.ignis
27
+ const pages = config.pages
28
+ const ui = config.ui || config.preset.ui
42
29
  </script>
43
30
 
44
31
  <style scoped>
45
- .ignis-header {
46
- display: flex;
47
- flex-direction: row;
48
- justify-content: center;
49
- margin-bottom: 10px;
50
- }
51
- .ignis-logo {
52
- display: inline;
53
- width: 64px;
54
- height: 64px;
55
- }
56
- .ignis-title {
57
- margin-top: 15px;
32
+ /* bg-slate-900 m-auto text-center text-white */
33
+ .ignis-body {
34
+ margin: auto;
35
+ background-color: #0f172a;
36
+ color: white;
37
+ text-align: center;
58
38
  }
59
39
  </style>
@@ -0,0 +1,16 @@
1
+ /*
2
+ This will import Tailwind CSS for Nuxt UI
3
+ https://ui.nuxt.com/getting-started/installation/nuxt#import-tailwind-css-and-nuxt-ui-in-your-css
4
+
5
+ NUXT_PUBLIC_IGNIS_PRESET_UI=nuxt-ui or NUXT_PUBLIC_IGNIS_UI=true is required for se this feature
6
+ */
7
+
8
+ @import "tailwindcss";
9
+ @import "@nuxt/ui";
10
+
11
+ /*
12
+ // Tailwind v4 way of defining custom classes
13
+ @utility <name> {
14
+ // css rules here
15
+ }
16
+ */
@@ -1,49 +1,15 @@
1
- /*
2
- This file is auto-imported when using Tailwind CSS
1
+ /*
2
+ This will import Tailwind CSS
3
+ https://tailwindcss.com/docs/installation/
3
4
 
4
- Use @apply if you don't want to define style for each element separately
5
-
6
- Read more at:
7
- https://tailwindcss.com/docs/reusing-styles#extracting-classes-with-apply
8
- https://tailwindcss.com/docs/functions-and-directives#apply
9
-
10
- Use correct @layer to keep your Tailwind CSS organized:
11
- https://bloggie.io/@kinopyo/organize-your-css-in-the-tailwind-style-with-layer-directive
12
-
13
- And most importantly: THINK TWICE before using this approach!
5
+ NUXT_PUBLIC_IGNIS_PRESET_UI=tailwind or NUXT_PUBLIC_IGNIS_TAILWIND=true is required for se this feature
14
6
  */
15
7
 
16
- @tailwind base;
17
- @tailwind components;
18
- @tailwind utilities;
19
-
20
- @layer base {
21
-
22
- /*
23
- Tailwind CSS classes might be auto-applied to all respective elements like this.
24
- However, I recommend NOT to use it like that, because this obsfucates code logic
25
- and makes maintaing harder (even you should soon forgot styles are defined here)
26
- */
27
-
28
- /* NOTE: For setting "body" tag attributes, it is better to use useHead() composable - @see `app.vue`*/
29
- /*
30
- body {
31
- @apply bg-slate-900;
32
- }
33
- */
8
+ @import "tailwindcss";
34
9
 
10
+ /*
11
+ // Tailwind v4 way of defining custom classes
12
+ @utility <name> {
13
+ // css rules here
35
14
  }
36
-
37
- @layer components {
38
-
39
- /*
40
- Following classes are available to use throughout the app as shorthands.
41
- Although still discouraged by Tailwind CSS authors, this usage makes more
42
- sense, because the class name is visible and trackable in SFC templates.
43
- */
44
-
45
- .link {
46
- @apply my-2 text-amber-400 hover:text-amber-200;
47
- }
48
-
49
- }
15
+ */
@@ -22,10 +22,13 @@
22
22
  -->
23
23
 
24
24
  <template>
25
- <div class="m-1 px-2 py-1 border border-amber-300 font-bold text-lg text-feature hover:bg-slate-700">
25
+ <div
26
+ class="feature"
27
+ :class="active ? '' : 'feature-disabled'"
28
+ :title="active ? 'Active' : 'Inactive'">
26
29
  {{ text }}
27
- <div v-if="showIcon" style="display: inline;">
28
- <Icon name="ic:sharp-add-reaction" style="color: yellow" />
30
+ <div v-if="active && showIcon" class="icon">
31
+ <Icon name="ic:sharp-add-reaction" class="icon-color" />
29
32
  </div>
30
33
  </div>
31
34
  </template>
@@ -43,6 +46,7 @@
43
46
  const props = defineProps({
44
47
  text: { type: String, required: true },
45
48
  optionalText: { type: String, default: 'default' },
49
+ active: { type: Boolean, default: true },
46
50
  })
47
51
 
48
52
  /**
@@ -61,3 +65,43 @@ const showIcon = config.preset.ui === 'nuxt-ui' || config.ui
61
65
  log.debug(props.text)
62
66
  log.debug(props.optionalText)
63
67
  </script>
68
+
69
+ <style scoped>
70
+ /* avoid Tailwind CSS styles here, because Tailwind may not be enabled */
71
+
72
+ /* m-1! px-2 py-1 border! border-amber-300 font-bold text-lg text-feature bg-emerald-700 hover:bg-slate-700 */
73
+ .feature {
74
+ margin: 4px;
75
+ padding: 4px 12px;
76
+ border: 2px solid #fcd34d;
77
+ font-weight: bold;
78
+ background-color: #047857;
79
+ color: #f1f5f9;
80
+ font-size: 1.125rem;
81
+ line-height: 1.75rem;
82
+ }
83
+ .feature:hover {
84
+ background-color: #334155;
85
+ color: #3CB371;
86
+ }
87
+
88
+ /* text-gray-700 bg-gray-300! hover:bg-slate-400! */
89
+ .feature-disabled {
90
+ background-color: #cbd5e1;
91
+ color: #334155;
92
+ }
93
+ .feature-disabled:hover {
94
+ background-color: #94a3b8;
95
+ color: #f1f5f9;
96
+ }
97
+
98
+ /* additional styles for displaying smiley icons */
99
+
100
+ .icon {
101
+ display: inline;
102
+ }
103
+
104
+ .icon-color {
105
+ color: yellow;
106
+ }
107
+ </style>
@@ -10,43 +10,62 @@
10
10
  -->
11
11
 
12
12
  <template>
13
- <div class="m-auto my-4 w-3/5 flex flex-col">
14
- <AppFeature :text="useT('features.nuxt')" />
15
- <AppFeature :text="useT('features.security')" />
16
- <AppFeature :text="useT('features.image')" />
17
- <AppFeature :text="useT('features.scripts')" />
18
- <AppFeature :text="useT('features.fonts')" class="fonts" />
19
- <AppFeature :text="useT('features.pinia')" />
20
- <AppFeature :text="useT('features.vueuse')" />
21
- <AppFeature :text="useT('features.consola')" />
22
- <AppFeature v-if="nuxtui" :text="useT('features.ui')" />
23
- <AppFeature v-if="tailwind" :text="useT('features.tailwind')" />
24
- <AppFeature v-if="nuxtui" :text="useT('features.icon')" />
25
- <AppFeature v-if="neon" :text="useT('features.neon')" />
26
- <AppFeature v-if="supabase" :text="useT('features.supabase')" />
27
- <AppFeature v-if="i18n" :text="useT('features.i18n')" />
28
- <AppFeature v-if="formkit" :text="useT('features.formkit')" />
29
- <AppFeature v-if="content" :text="useT('features.content')" />
30
- <AppFeature v-if="openprops" class="openprops-feature" :text="useT('features.openprops')" />
31
- </div>
32
- <div v-if="!pages" class="mb-2">
33
- Single-page mode (/pages disabled)
13
+ <div class="feature-box">
14
+ <div class="feature-list">
15
+ <AppFeature :text="useIgnisT('features.nuxt')" />
16
+ <AppFeature :text="useIgnisT('features.consola')" />
17
+ <AppFeature :active="eslint" :text="useIgnisT('features.eslint')" />
18
+ <AppFeature :active="security" :text="useIgnisT('features.security')" />
19
+ <AppFeature :active="image" :text="useIgnisT('features.image')" />
20
+ <AppFeature :active="scripts" :text="useIgnisT('features.scripts')" />
21
+ <AppFeature :active="fonts" :text="useIgnisT('features.fonts')" class="fonts" />
22
+ <AppFeature :active="pinia" :text="useIgnisT('features.pinia')" />
23
+ <AppFeature :active="vueuse" :text="useIgnisT('features.vueuse')" />
24
+ <AppFeature :active="time" :text="useIgnisT('features.time')" />
25
+ <AppFeature :active="nuxtui" :text="useIgnisT('features.ui')" />
26
+ <AppFeature :active="tailwind" :text="useIgnisT('features.tailwind')" />
27
+ <AppFeature :active="nuxtui" :text="useIgnisT('features.icon')" />
28
+ <AppFeature :active="neon" :text="useIgnisT('features.neon')" />
29
+ <AppFeature :active="supabase" :text="useIgnisT('features.supabase')" />
30
+ <AppFeature :active="i18n" :text="useIgnisT('features.i18n')" />
31
+ <AppFeature :active="vueform" :text="useIgnisT('features.vueform')" />
32
+ <AppFeature :active="formkit" :text="useIgnisT('features.formkit')" />
33
+ <AppFeature :active="content" :text="useIgnisT('features.content')" />
34
+ <AppFeature :active="seo" :text="useIgnisT('features.seo')" />
35
+ <AppFeature :active="auth" :text="useIgnisT('features.auth')" />
36
+ <AppFeature :active="openprops" class="openprops-feature" :text="useIgnisT('features.openprops')" />
37
+ </div>
38
+ <div v-if="!pages" class="pages">
39
+ Single-page mode (/pages disabled)
40
+ </div>
34
41
  </div>
35
42
  </template>
36
43
 
37
44
  <script setup lang="ts">
38
- import { useT } from '#imports' // requires explicit import for some reason
45
+ import { useIgnisT } from '#imports' // requires explicit import for some reason
39
46
 
40
47
  const setup = useRuntimeConfig().public.ignis
48
+ const eslint = setup.core.eslint
49
+ const fonts = setup.core.fonts
50
+ const image = setup.core.image
51
+ const pinia = setup.core.pinia
52
+ const time = setup.core.time
53
+ const scripts = setup.core.scripts
54
+ const security = setup.core.security
55
+ const vueuse = setup.core.vueuse
41
56
  const ui = setup.preset.ui
42
- const db = setup.preset.db
43
57
  const nuxtui = ui === 'nuxt-ui' || setup.ui
44
58
  const tailwind = ui !== 'off' || setup.ui || setup.tailwind
45
- const neon = db === 'neon' || setup.neon
46
- const supabase = db === 'supabase' || setup.supabase
59
+ const db = setup.preset.db
60
+ const neon = db === 'neon' || (db === 'off' && setup.neon)
61
+ const supabase = db === 'supabase' || (db === 'off' && setup.supabase)
47
62
  const i18n = setup.i18n.enabled
48
- const formkit = setup.formkit.enabled
63
+ const forms = setup.preset.forms
64
+ const vueform = forms === 'vueform' || (forms === 'off' && setup.vueform)
65
+ const formkit = forms === 'formkit' || (forms === 'off' && setup.formkit.enabled)
49
66
  const content = setup.content
67
+ const seo = setup.seo
68
+ const auth = setup.auth
50
69
  const openprops = setup.openprops
51
70
  const pages = setup.pages
52
71
  </script>
@@ -56,4 +75,45 @@ const pages = setup.pages
56
75
  .fonts {
57
76
  font-family: "Kurale";
58
77
  }
78
+
79
+ /* avoid Tailwind CSS styles here, because Tailwind may not be enabled */
80
+
81
+ /* flex flex-row justify-center */
82
+ .feature-box {
83
+ display: flex;
84
+ flex-direction: row;
85
+ justify-content: center;
86
+ }
87
+
88
+ /* margin-auto my-4 w-3/5 flex flex-col */
89
+ .feature-list {
90
+ margin: 0px auto;
91
+ margin-bottom: 8px;
92
+ width: 40%;
93
+ display: flex;
94
+ flex-direction: column;
95
+ }
96
+
97
+ @media (max-width: 1200px) {
98
+ .feature-list {
99
+ width: 60%;
100
+ }
101
+ }
102
+
103
+ @media (max-width: 800px) {
104
+ .feature-list {
105
+ width: 80%;
106
+ }
107
+ }
108
+
109
+ @media (max-width: 600px) {
110
+ .feature-list {
111
+ width: 100%;
112
+ }
113
+ }
114
+
115
+ /* mb-2 */
116
+ .pages {
117
+ margin-bottom: 2em;
118
+ }
59
119
  </style>
@@ -1,18 +1,14 @@
1
1
  <!--
2
- The `NuxtTime` component of `nuxt-time` module is a way how to deal with SSR in Nuxt.
2
+ Built-in `NuxtTime` component is a way how to deal with SSR in Nuxt.
3
3
  Because page on the server is rendered miliseconds before being re-rendered on client,
4
4
  wild "hydration error mismatch" may appear from a difference between displayed times.
5
5
 
6
- This special component gracefully deals with the issue:
7
- https://github.com/nuxt/nuxt/discussions/23278#discussioncomment-7607298
6
+ https://nuxt.com/docs/api/components/nuxt-time
8
7
  -->
9
8
 
10
9
  <template>
11
- <div>
12
- Current time by
13
- <span class="link">
14
- <NuxtLink to="https://github.com/danielroe/nuxt-time">Nuxt Time</NuxtLink>
15
- </span>:
10
+ <div style="text-align: center;">
11
+ Current time with <NuxtLink to="https://nuxt.com/docs/api/components/nuxt-time">NuxtTime</NuxtLink>:
16
12
  <NuxtTime
17
13
  :datetime="currentDate"
18
14
  year="numeric"
@@ -21,9 +17,13 @@
21
17
  hour="2-digit"
22
18
  minute="2-digit"
23
19
  second="2-digit" />
20
+ <span v-if="!vueuse">
21
+ (Enable VueUse to get reactive time)
22
+ </span>
24
23
  </div>
25
24
  </template>
26
25
 
27
26
  <script setup lang="ts">
28
- const currentDate = useNow()
27
+ const vueuse = useRuntimeConfig().public.ignis.core.vueuse
28
+ const currentDate = vueuse ? useNow() : new Date().toISOString()
29
29
  </script>
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <footer class="link text-xs">
3
+ <NuxtLink to="https://github.com/AloisSeckar/nuxt-ignis">
4
+ https://github.com/AloisSeckar/nuxt-ignis
5
+ </NuxtLink>
6
+ </footer>
7
+ </template>
8
+
9
+ <style scoped lang="css">
10
+ footer {
11
+ text-align: center;
12
+ margin-top: 4px;
13
+ font-size: 0.75rem; /* 12px */
14
+ line-height: 1rem; /* 16px */
15
+ }
16
+ </style>
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <header>
3
+ <div class="ignis-header">
4
+ <img src="/nuxt-ignis.png" class="ignis-logo" :title :alt>
5
+ <h1 class="ignis-title">
6
+ {{ useIgnisT("title") }}
7
+ </h1>
8
+ <img src="/nuxt-ignis.png" class="ignis-logo" :title :alt>
9
+ </div>
10
+ <div class="ignis-subtitle ">
11
+ {{ useIgnisT("subtitle") }}
12
+ </div>
13
+ </header>
14
+ </template>
15
+
16
+ <script setup lang="ts">
17
+ import { useIgnisT } from '#imports' // requires explicit import for some reason
18
+
19
+ const title = useIgnisT('title')
20
+ const alt = title
21
+ </script>
22
+
23
+ <style scoped>
24
+ .ignis-header {
25
+ display: flex;
26
+ flex-direction: row;
27
+ justify-content: center;
28
+ margin-bottom: 10px;
29
+ }
30
+ .ignis-logo {
31
+ display: inline;
32
+ width: 64px;
33
+ height: 64px;
34
+ }
35
+ /* my-4 text-4xl text-amber-400 font-bold */
36
+ .ignis-title {
37
+ margin-top: 15px;
38
+ font-size: 2.25rem;
39
+ line-height: 2.5rem;
40
+ font-weight: bold;
41
+ color: #fbbf24;
42
+ }
43
+ .ignis-subtitle {
44
+ text-align: center;
45
+ margin: 0px auto;
46
+ margin-bottom: 8px;
47
+ }
48
+ </style>
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <div>
3
+ <IgnisHeader />
4
+ <AppFeatureList />
5
+
6
+ <div v-if="pages" class="link">
7
+ <NuxtLink to="/second">
8
+ {{ useIgnisT("goto2") }}
9
+ </NuxtLink>
10
+ </div>
11
+
12
+ <CurrentTime />
13
+ <IgnisFooter />
14
+ </div>
15
+ </template>
16
+
17
+ <script setup lang="ts">
18
+ const pages = useRuntimeConfig().public.ignis.pages
19
+ </script>
20
+
21
+ <style scoped lang="css">
22
+ .link {
23
+ text-align: center;
24
+ margin-bottom: 4px;
25
+ }
26
+ </style>
@@ -1,4 +1,4 @@
1
- import lang from '@/assets/lang/en.json'
1
+ import lang from '@/i18n/locales/en.json'
2
2
 
3
3
  /**
4
4
  * An adapter above `t` function from `i18n` module.
@@ -19,7 +19,7 @@ export function useT(key: string): string {
19
19
  return useNuxtApp().$i18n.t(key)
20
20
  } else {
21
21
  // backdoor for Nuxt Ignis to display values on demo index page
22
- const backdoorValue = searchLang(key)
22
+ const backdoorValue = useIgnisT(key)
23
23
  if (backdoorValue) {
24
24
  return backdoorValue as string
25
25
  }
@@ -29,8 +29,15 @@ export function useT(key: string): string {
29
29
  }
30
30
  }
31
31
 
32
- /** AI-generated helper to search a value for given key in JSON lang file. */
33
- function searchLang(key: string): unknown {
32
+ /**
33
+ * Helper to search a value for given key in JSON lang file.
34
+ *
35
+ * Note: The core concept was AI-generated by ChatGPT.
36
+ *
37
+ * @param key identifier of text that should be displayed
38
+ * @returns hardcoded text from '@/i18n/locales/en.json' of nuxt-ignis package (providing the key exists)
39
+ */
40
+ export function useIgnisT(key: string): unknown {
34
41
  const keys = key.split('.')
35
42
 
36
43
  let current = lang
package/content/second.md CHANGED
@@ -5,3 +5,7 @@ You can have **bold text**, _italic text_ or [link](http://localhost:3000)
5
5
  #### H4 Sub-header
6
6
  - list item 1
7
7
  - list item 2
8
+ ##### H5 Custom Tailwind CSS
9
+ <div class="text-green-500 text-2xl">
10
+ Text colored by Tailwind CSS
11
+ </div>