1
0

nuxt.schema.ts 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. import { field, group } from '@nuxt/content/preview'
  2. export default defineNuxtSchema({
  3. appConfig: {
  4. ui: group({
  5. title: 'UI',
  6. description: 'UI Customization.',
  7. icon: 'i-mdi-palette-outline',
  8. fields: {
  9. colors: group({
  10. title: 'Colors',
  11. description: 'Manage main colors of your application',
  12. icon: 'i-mdi-palette-outline',
  13. fields: {
  14. primary: field({
  15. type: 'string',
  16. title: 'Primary',
  17. description: 'Primary color of your UI.',
  18. icon: 'i-mdi-palette-outline',
  19. default: 'green',
  20. required: ['red', 'orange', 'amber', 'yellow', 'lime', 'green', 'emerald', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose'],
  21. }),
  22. neutral: field({
  23. type: 'string',
  24. title: 'Neutral',
  25. description: 'Neutral color of your UI.',
  26. icon: 'i-mdi-palette-outline',
  27. default: 'slate',
  28. required: ['slate', 'gray', 'zinc', 'neutral', 'stone'],
  29. }),
  30. },
  31. }),
  32. icons: group({
  33. title: 'Icons',
  34. description: 'Manage icons used in the application.',
  35. icon: 'i-mdi-application-settings-outline',
  36. fields: {
  37. search: field({
  38. type: 'icon',
  39. title: 'Search Bar',
  40. description: 'Icon to display in the search bar.',
  41. icon: 'i-mdi-magnify',
  42. default: 'i-lucide-search',
  43. }),
  44. dark: field({
  45. type: 'icon',
  46. title: 'Dark mode',
  47. description: 'Icon of color mode button for dark mode.',
  48. icon: 'i-mdi-moon-waning-crescent',
  49. default: 'i-lucide-moon',
  50. }),
  51. light: field({
  52. type: 'icon',
  53. title: 'Light mode',
  54. description: 'Icon of color mode button for light mode.',
  55. icon: 'i-mdi-white-balance-sunny',
  56. default: 'i-lucide-sun',
  57. }),
  58. external: field({
  59. type: 'icon',
  60. title: 'External Link',
  61. description: 'Icon for external link.',
  62. icon: 'i-mdi-arrow-top-right',
  63. default: 'i-lucide-external-link',
  64. }),
  65. chevron: field({
  66. type: 'icon',
  67. title: 'Chevron',
  68. description: 'Icon for chevron.',
  69. icon: 'i-mdi-chevron-down',
  70. default: 'i-lucide-chevron-down',
  71. }),
  72. hash: field({
  73. type: 'icon',
  74. title: 'Hash',
  75. description: 'Icon for hash anchors.',
  76. icon: 'i-ph-hash',
  77. default: 'i-lucide-hash',
  78. }),
  79. },
  80. }),
  81. },
  82. }),
  83. seo: group({
  84. title: 'SEO',
  85. description: 'SEO configuration.',
  86. icon: 'i-ph-app-window',
  87. fields: {
  88. siteName: field({
  89. type: 'string',
  90. title: 'Site Name',
  91. description: 'Name used in ogSiteName and used as second part of your page title (My page title - Nuxt UI Pro).',
  92. icon: 'i-mdi-web',
  93. default: [],
  94. }),
  95. },
  96. }),
  97. header: group({
  98. title: 'Header',
  99. description: 'Header configuration.',
  100. icon: 'i-mdi-page-layout-header',
  101. fields: {
  102. title: field({
  103. type: 'string',
  104. title: 'Title',
  105. description: 'Title to display in the header.',
  106. icon: 'i-mdi-format-title',
  107. default: '',
  108. }),
  109. to: field({
  110. type: 'string',
  111. title: 'To',
  112. description: 'URL to redirect to when the title is clicked.',
  113. icon: 'i-mdi-link-variant',
  114. default: '',
  115. }),
  116. logo: group({
  117. title: 'Logo',
  118. description: 'Header logo configuration.',
  119. icon: 'i-mdi-image-filter-center-focus-strong-outline',
  120. fields: {
  121. light: field({
  122. type: 'media',
  123. title: 'Light Mode Logo',
  124. description: 'Pick an image from your gallery.',
  125. icon: 'i-mdi-white-balance-sunny',
  126. default: '',
  127. }),
  128. dark: field({
  129. type: 'media',
  130. title: 'Dark Mode Logo',
  131. description: 'Pick an image from your gallery.',
  132. icon: 'i-mdi-moon-waning-crescent',
  133. default: '',
  134. }),
  135. alt: field({
  136. type: 'string',
  137. title: 'Alt',
  138. description: 'Alt to display for accessibility.',
  139. icon: 'i-mdi-alphabet-latin',
  140. default: '',
  141. }),
  142. },
  143. }),
  144. search: field({
  145. type: 'boolean',
  146. title: 'Search Bar',
  147. description: 'Hide or display the search bar.',
  148. icon: 'i-mdi-magnify',
  149. default: true,
  150. }),
  151. colorMode: field({
  152. type: 'boolean',
  153. title: 'Color Mode',
  154. description: 'Hide or display the color mode button in your header.',
  155. icon: 'i-mdi-moon-waning-crescent',
  156. default: true,
  157. }),
  158. links: field({
  159. type: 'array',
  160. title: 'Links',
  161. description: 'Array of link object displayed in header.',
  162. icon: 'i-mdi-link-variant',
  163. default: [],
  164. }),
  165. },
  166. }),
  167. footer: group({
  168. title: 'Footer',
  169. description: 'Footer configuration.',
  170. icon: 'i-mdi-page-layout-footer',
  171. fields: {
  172. credits: field({
  173. type: 'string',
  174. title: 'Footer credits section',
  175. description: 'Text to display as credits in the footer.',
  176. icon: 'i-mdi-circle-edit-outline',
  177. default: '',
  178. }),
  179. colorMode: field({
  180. type: 'boolean',
  181. title: 'Color Mode',
  182. description: 'Hide or display the color mode button in the footer.',
  183. icon: 'i-mdi-moon-waning-crescent',
  184. default: false,
  185. }),
  186. links: field({
  187. type: 'array',
  188. title: 'Links',
  189. description: 'Array of link object displayed in footer.',
  190. icon: 'i-mdi-link-variant',
  191. default: [],
  192. }),
  193. },
  194. }),
  195. toc: group({
  196. title: 'Table of contents',
  197. description: 'TOC configuration.',
  198. icon: 'i-mdi-table-of-contents',
  199. fields: {
  200. title: field({
  201. type: 'string',
  202. title: 'Title',
  203. description: 'Text to display as title of the main toc.',
  204. icon: 'i-mdi-format-title',
  205. default: '',
  206. }),
  207. bottom: group({
  208. title: 'Bottom',
  209. description: 'Bottom TOC configuration.',
  210. icon: 'i-mdi-table-of-contents',
  211. fields: {
  212. title: field({
  213. type: 'string',
  214. title: 'Title',
  215. description: 'Text to display as title of the bottom toc.',
  216. icon: 'i-mdi-format-title',
  217. default: '',
  218. }),
  219. edit: field({
  220. type: 'string',
  221. title: 'Edit Page Link',
  222. description: 'URL of your repository content folder.',
  223. icon: 'i-ph-note-pencil',
  224. default: '',
  225. }),
  226. links: field({
  227. type: 'array',
  228. title: 'Links',
  229. description: 'Array of link object displayed in bottom toc.',
  230. icon: 'i-mdi-link-variant',
  231. default: [],
  232. }),
  233. },
  234. }),
  235. },
  236. }),
  237. },
  238. })
  239. declare module '@nuxt/schema' {
  240. interface CustomAppConfig {
  241. ui: {
  242. icons: object
  243. }
  244. }
  245. }