@md-plugins/quasar-app-extension-q-press 0.1.0-alpha.10

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 (200) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +230 -0
  3. package/old/prompts.js +44 -0
  4. package/old/uninstall.js +9 -0
  5. package/package.json +60 -0
  6. package/scripts/build.js +33 -0
  7. package/src/index.js +63 -0
  8. package/src/install.js +49 -0
  9. package/src/templates/.gitkeep +0 -0
  10. package/src/templates/init/src/_q-press/.gitkeep +0 -0
  11. package/src/templates/init/src/_q-press/api/components/DarkModeToggle.json +37 -0
  12. package/src/templates/init/src/_q-press/api/components/MarkdownApi.json +67 -0
  13. package/src/templates/init/src/_q-press/api/components/MarkdownApiEntry.json +76 -0
  14. package/src/templates/init/src/_q-press/api/components/MarkdownCardLink.json +28 -0
  15. package/src/templates/init/src/_q-press/api/components/MarkdownCardTitle.json +48 -0
  16. package/src/templates/init/src/_q-press/api/components/MarkdownCode.json +37 -0
  17. package/src/templates/init/src/_q-press/api/components/MarkdownCodePrism.json +29 -0
  18. package/src/templates/init/src/_q-press/api/components/MarkdownCodepen.json +21 -0
  19. package/src/templates/init/src/_q-press/api/components/MarkdownCopyButton.json +36 -0
  20. package/src/templates/init/src/_q-press/api/components/MarkdownDrawerSidebar.json +17 -0
  21. package/src/templates/init/src/_q-press/api/components/MarkdownDrawerToc.json +17 -0
  22. package/src/templates/init/src/_q-press/api/components/MarkdownExample.json +22 -0
  23. package/src/templates/init/src/_q-press/api/components/MarkdownHeader.json +28 -0
  24. package/src/templates/init/src/_q-press/api/components/MarkdownHeaderIconLinks.json +16 -0
  25. package/src/templates/init/src/_q-press/api/components/MarkdownHeaderMenu.json +77 -0
  26. package/src/templates/init/src/_q-press/api/components/MarkdownHeaderTextLinks.json +33 -0
  27. package/src/templates/init/src/_q-press/api/components/MarkdownInstallation.json +33 -0
  28. package/src/templates/init/src/_q-press/api/components/MarkdownLayout.json +52 -0
  29. package/src/templates/init/src/_q-press/api/components/MarkdownLink.json +23 -0
  30. package/src/templates/init/src/_q-press/api/components/MarkdownPage.json +71 -0
  31. package/src/templates/init/src/_q-press/api/components/MarkdownPageFooter.json +21 -0
  32. package/src/templates/init/src/_q-press/api/components/MarkdownPageSidebar.json +56 -0
  33. package/src/templates/init/src/_q-press/api/components/MarkdownPageToc.json +17 -0
  34. package/src/templates/init/src/_q-press/api/components/MarkdownPrerender.json +25 -0
  35. package/src/templates/init/src/_q-press/api/components/MarkdownTree.json +27 -0
  36. package/src/templates/init/src/_q-press/api/composables/dark.json +29 -0
  37. package/src/templates/init/src/_q-press/api/composables/scroll.json +34 -0
  38. package/src/templates/init/src/_q-press/assets/get-meta.ts +29 -0
  39. package/src/templates/init/src/_q-press/components/DarkModeToggle.vue +105 -0
  40. package/src/templates/init/src/_q-press/components/MarkdownApi.vue +588 -0
  41. package/src/templates/init/src/_q-press/components/MarkdownApiEntry.ts +594 -0
  42. package/src/templates/init/src/_q-press/components/MarkdownCardLink.vue +25 -0
  43. package/src/templates/init/src/_q-press/components/MarkdownCardTitle.vue +21 -0
  44. package/src/templates/init/src/_q-press/components/MarkdownCode.vue +25 -0
  45. package/src/templates/init/src/_q-press/components/MarkdownCodePrism.ts +36 -0
  46. package/src/templates/init/src/_q-press/components/MarkdownCodepen.vue +183 -0
  47. package/src/templates/init/src/_q-press/components/MarkdownCopyButton.vue +104 -0
  48. package/src/templates/init/src/_q-press/components/MarkdownExample.vue +221 -0
  49. package/src/templates/init/src/_q-press/components/MarkdownInstallation.vue +166 -0
  50. package/src/templates/init/src/_q-press/components/MarkdownLink.vue +38 -0
  51. package/src/templates/init/src/_q-press/components/MarkdownPrerender.ts +82 -0
  52. package/src/templates/init/src/_q-press/components/MarkdownTree.vue +105 -0
  53. package/src/templates/init/src/_q-press/components/markdown-utils.ts +105 -0
  54. package/src/templates/init/src/_q-press/composables/dark.ts +39 -0
  55. package/src/templates/init/src/_q-press/composables/scroll.ts +115 -0
  56. package/src/templates/init/src/_q-press/css/app.scss +662 -0
  57. package/src/templates/init/src/_q-press/css/fonts.scss +100 -0
  58. package/src/templates/init/src/_q-press/css/prism-theme.scss +298 -0
  59. package/src/templates/init/src/_q-press/css/themes/default.scss +68 -0
  60. package/src/templates/init/src/_q-press/css/themes/newspaper.scss +69 -0
  61. package/src/templates/init/src/_q-press/css/themes/sunrise.scss +67 -0
  62. package/src/templates/init/src/_q-press/css/themes/tawny.scss +69 -0
  63. package/src/templates/init/src/_q-press/layouts/MarkdownDrawerSidebar.vue +32 -0
  64. package/src/templates/init/src/_q-press/layouts/MarkdownDrawerToc.vue +37 -0
  65. package/src/templates/init/src/_q-press/layouts/MarkdownHeader.vue +412 -0
  66. package/src/templates/init/src/_q-press/layouts/MarkdownHeaderIconLinks.vue +31 -0
  67. package/src/templates/init/src/_q-press/layouts/MarkdownHeaderMenu.ts +93 -0
  68. package/src/templates/init/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +37 -0
  69. package/src/templates/init/src/_q-press/layouts/MarkdownLayout.vue +239 -0
  70. package/src/templates/init/src/_q-press/layouts/MarkdownPage.vue +307 -0
  71. package/src/templates/init/src/_q-press/layouts/MarkdownPageFooter.vue +187 -0
  72. package/src/templates/init/src/_q-press/layouts/MarkdownPageSidebar.scss +54 -0
  73. package/src/templates/init/src/_q-press/layouts/MarkdownPageSidebar.ts +218 -0
  74. package/src/templates/init/src/_q-press/layouts/MarkdownPageToc.vue +23 -0
  75. package/src/templates/init/src/_q-press/layouts/MarkdownSearch.vue +449 -0
  76. package/src/templates/init/src/_q-press/stores/markdown.ts +101 -0
  77. package/src/templates/init/src/components/LandingPage/LandingPage.vue +341 -0
  78. package/src/templates/init/src/components/Releases/PackageReleases.vue +164 -0
  79. package/src/templates/init/src/components/Releases/PublicReleases.vue +149 -0
  80. package/src/templates/init/src/components/Releases/ReleasesAvailable.vue +74 -0
  81. package/src/templates/init/src/examples/QAvatar/BasicExample.vue +11 -0
  82. package/src/templates/init/src/markdown/__elements.md +548 -0
  83. package/src/templates/init/src/markdown/__elements2.md +347 -0
  84. package/src/templates/init/src/markdown/faq/best-practices.md +0 -0
  85. package/src/templates/init/src/markdown/faq/general.md +0 -0
  86. package/src/templates/init/src/markdown/faq/troubleshooting.md +0 -0
  87. package/src/templates/init/src/markdown/getting-started/introduction.md +67 -0
  88. package/src/templates/init/src/markdown/guides/contributing.md +101 -0
  89. package/src/templates/init/src/markdown/guides/faq.md +115 -0
  90. package/src/templates/init/src/markdown/guides/release-notes.md +0 -0
  91. package/src/templates/init/src/markdown/guides/style-guide.md +0 -0
  92. package/src/templates/init/src/markdown/landing-page.md +11 -0
  93. package/src/templates/init/src/markdown/listing.ts +3 -0
  94. package/src/templates/init/src/markdown/md-plugins/blockquote/advanced.md +83 -0
  95. package/src/templates/init/src/markdown/md-plugins/blockquote/overview.md +183 -0
  96. package/src/templates/init/src/markdown/md-plugins/codeblocks/advanced.md +210 -0
  97. package/src/templates/init/src/markdown/md-plugins/codeblocks/overview.md +616 -0
  98. package/src/templates/init/src/markdown/md-plugins/containers/advanced.md +301 -0
  99. package/src/templates/init/src/markdown/md-plugins/containers/overview.md +206 -0
  100. package/src/templates/init/src/markdown/md-plugins/frontmatter/advanced.md +164 -0
  101. package/src/templates/init/src/markdown/md-plugins/frontmatter/overview.md +131 -0
  102. package/src/templates/init/src/markdown/md-plugins/headers/advanced.md +236 -0
  103. package/src/templates/init/src/markdown/md-plugins/headers/overview.md +134 -0
  104. package/src/templates/init/src/markdown/md-plugins/image/advanced.md +114 -0
  105. package/src/templates/init/src/markdown/md-plugins/image/overview.md +124 -0
  106. package/src/templates/init/src/markdown/md-plugins/imports/advanced.md +105 -0
  107. package/src/templates/init/src/markdown/md-plugins/imports/overview.md +80 -0
  108. package/src/templates/init/src/markdown/md-plugins/inline-code/advanced.md +133 -0
  109. package/src/templates/init/src/markdown/md-plugins/inline-code/overview.md +101 -0
  110. package/src/templates/init/src/markdown/md-plugins/link/advanced.md +157 -0
  111. package/src/templates/init/src/markdown/md-plugins/link/overview.md +126 -0
  112. package/src/templates/init/src/markdown/md-plugins/shared/overview.md +175 -0
  113. package/src/templates/init/src/markdown/md-plugins/table/advanced.md +190 -0
  114. package/src/templates/init/src/markdown/md-plugins/table/overview.md +186 -0
  115. package/src/templates/init/src/markdown/md-plugins/title/advanced.md +88 -0
  116. package/src/templates/init/src/markdown/md-plugins/title/overview.md +99 -0
  117. package/src/templates/init/src/markdown/other/release-notes.md +12 -0
  118. package/src/templates/init/src/markdown/privacy-policy.md +12 -0
  119. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/advanced.md +101 -0
  120. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/components.md +69 -0
  121. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +254 -0
  122. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/themes.md +4 -0
  123. package/src/templates/init/src/markdown/quasar-app-extensions/vitemdpluginappext/advanced.md +4 -0
  124. package/src/templates/init/src/markdown/quasar-app-extensions/vitemdpluginappext/overview.md +103 -0
  125. package/src/templates/init/src/markdown/vite-plugins/index.md +6 -0
  126. package/src/templates/init/src/markdown/vite-plugins/viteexamplesplugin/advanced.md +138 -0
  127. package/src/templates/init/src/markdown/vite-plugins/viteexamplesplugin/overview.md +88 -0
  128. package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/advanced.md +226 -0
  129. package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/index.md +6 -0
  130. package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/overview.md +166 -0
  131. package/src/templates/init/src/q-press.globals.d.ts +36 -0
  132. package/src/templates/init/src/siteConfig/index.ts +440 -0
  133. package/src/templates/update/src/_q-press/.gitkeep +0 -0
  134. package/src/templates/update/src/_q-press/api/components/DarkModeToggle.json +37 -0
  135. package/src/templates/update/src/_q-press/api/components/MarkdownApi.json +67 -0
  136. package/src/templates/update/src/_q-press/api/components/MarkdownApiEntry.json +76 -0
  137. package/src/templates/update/src/_q-press/api/components/MarkdownCardLink.json +28 -0
  138. package/src/templates/update/src/_q-press/api/components/MarkdownCardTitle.json +48 -0
  139. package/src/templates/update/src/_q-press/api/components/MarkdownCode.json +37 -0
  140. package/src/templates/update/src/_q-press/api/components/MarkdownCodePrism.json +29 -0
  141. package/src/templates/update/src/_q-press/api/components/MarkdownCodepen.json +21 -0
  142. package/src/templates/update/src/_q-press/api/components/MarkdownCopyButton.json +36 -0
  143. package/src/templates/update/src/_q-press/api/components/MarkdownDrawerSidebar.json +17 -0
  144. package/src/templates/update/src/_q-press/api/components/MarkdownDrawerToc.json +17 -0
  145. package/src/templates/update/src/_q-press/api/components/MarkdownExample.json +22 -0
  146. package/src/templates/update/src/_q-press/api/components/MarkdownHeader.json +28 -0
  147. package/src/templates/update/src/_q-press/api/components/MarkdownHeaderIconLinks.json +16 -0
  148. package/src/templates/update/src/_q-press/api/components/MarkdownHeaderMenu.json +77 -0
  149. package/src/templates/update/src/_q-press/api/components/MarkdownHeaderTextLinks.json +33 -0
  150. package/src/templates/update/src/_q-press/api/components/MarkdownInstallation.json +33 -0
  151. package/src/templates/update/src/_q-press/api/components/MarkdownLayout.json +52 -0
  152. package/src/templates/update/src/_q-press/api/components/MarkdownLink.json +23 -0
  153. package/src/templates/update/src/_q-press/api/components/MarkdownPage.json +71 -0
  154. package/src/templates/update/src/_q-press/api/components/MarkdownPageFooter.json +21 -0
  155. package/src/templates/update/src/_q-press/api/components/MarkdownPageSidebar.json +56 -0
  156. package/src/templates/update/src/_q-press/api/components/MarkdownPageToc.json +17 -0
  157. package/src/templates/update/src/_q-press/api/components/MarkdownPrerender.json +25 -0
  158. package/src/templates/update/src/_q-press/api/components/MarkdownTree.json +27 -0
  159. package/src/templates/update/src/_q-press/api/composables/dark.json +29 -0
  160. package/src/templates/update/src/_q-press/api/composables/scroll.json +34 -0
  161. package/src/templates/update/src/_q-press/assets/get-meta.ts +29 -0
  162. package/src/templates/update/src/_q-press/components/DarkModeToggle.vue +105 -0
  163. package/src/templates/update/src/_q-press/components/MarkdownApi.vue +588 -0
  164. package/src/templates/update/src/_q-press/components/MarkdownApiEntry.ts +594 -0
  165. package/src/templates/update/src/_q-press/components/MarkdownCardLink.vue +25 -0
  166. package/src/templates/update/src/_q-press/components/MarkdownCardTitle.vue +21 -0
  167. package/src/templates/update/src/_q-press/components/MarkdownCode.vue +25 -0
  168. package/src/templates/update/src/_q-press/components/MarkdownCodePrism.ts +36 -0
  169. package/src/templates/update/src/_q-press/components/MarkdownCodepen.vue +183 -0
  170. package/src/templates/update/src/_q-press/components/MarkdownCopyButton.vue +104 -0
  171. package/src/templates/update/src/_q-press/components/MarkdownExample.vue +221 -0
  172. package/src/templates/update/src/_q-press/components/MarkdownInstallation.vue +166 -0
  173. package/src/templates/update/src/_q-press/components/MarkdownLink.vue +38 -0
  174. package/src/templates/update/src/_q-press/components/MarkdownPrerender.ts +82 -0
  175. package/src/templates/update/src/_q-press/components/MarkdownTree.vue +105 -0
  176. package/src/templates/update/src/_q-press/components/markdown-utils.ts +105 -0
  177. package/src/templates/update/src/_q-press/composables/dark.ts +39 -0
  178. package/src/templates/update/src/_q-press/composables/scroll.ts +115 -0
  179. package/src/templates/update/src/_q-press/css/app.scss +662 -0
  180. package/src/templates/update/src/_q-press/css/fonts.scss +100 -0
  181. package/src/templates/update/src/_q-press/css/prism-theme.scss +298 -0
  182. package/src/templates/update/src/_q-press/css/themes/default.scss +68 -0
  183. package/src/templates/update/src/_q-press/css/themes/newspaper.scss +69 -0
  184. package/src/templates/update/src/_q-press/css/themes/sunrise.scss +67 -0
  185. package/src/templates/update/src/_q-press/css/themes/tawny.scss +69 -0
  186. package/src/templates/update/src/_q-press/layouts/MarkdownDrawerSidebar.vue +32 -0
  187. package/src/templates/update/src/_q-press/layouts/MarkdownDrawerToc.vue +37 -0
  188. package/src/templates/update/src/_q-press/layouts/MarkdownHeader.vue +412 -0
  189. package/src/templates/update/src/_q-press/layouts/MarkdownHeaderIconLinks.vue +31 -0
  190. package/src/templates/update/src/_q-press/layouts/MarkdownHeaderMenu.ts +93 -0
  191. package/src/templates/update/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +37 -0
  192. package/src/templates/update/src/_q-press/layouts/MarkdownLayout.vue +239 -0
  193. package/src/templates/update/src/_q-press/layouts/MarkdownPage.vue +307 -0
  194. package/src/templates/update/src/_q-press/layouts/MarkdownPageFooter.vue +187 -0
  195. package/src/templates/update/src/_q-press/layouts/MarkdownPageSidebar.scss +54 -0
  196. package/src/templates/update/src/_q-press/layouts/MarkdownPageSidebar.ts +218 -0
  197. package/src/templates/update/src/_q-press/layouts/MarkdownPageToc.vue +23 -0
  198. package/src/templates/update/src/_q-press/layouts/MarkdownSearch.vue +449 -0
  199. package/src/templates/update/src/_q-press/stores/markdown.ts +101 -0
  200. package/src/templates/update/src/q-press.globals.d.ts +36 -0
@@ -0,0 +1,21 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-page-footer"
5
+ },
6
+ "props": {
7
+ "fullscreen": {
8
+ "type": "Boolean",
9
+ "desc": "Flag to indicate if the page is in fullscreen mode",
10
+ "category": "state"
11
+ },
12
+ "links": {
13
+ "type": "Array",
14
+ "desc": "Array of link objects to display in the footer",
15
+ "examples": [
16
+ "[{ name: 'Home', path: '/' }, { name: 'Docs', path: '/docs' }]"
17
+ ],
18
+ "category": "content"
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "type": "plugin",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-page-sidebar"
5
+ },
6
+ "functions": {
7
+ "getParentProxy": {
8
+ "desc": "Retrieves the parent proxy of a given component proxy.",
9
+ "params": {
10
+ "proxy": {
11
+ "type": "ComponentProxy",
12
+ "desc": "The component proxy to retrieve the parent for."
13
+ }
14
+ },
15
+ "returns": {
16
+ "type": "ComponentProxy | undefined",
17
+ "desc": "The parent component proxy, or undefined if not found."
18
+ }
19
+ }
20
+ },
21
+ "types": {
22
+ "ComponentProxy": {
23
+ "desc": "Interface representing a component proxy.",
24
+ "properties": {
25
+ "$parent": {
26
+ "type": "ComponentProxy",
27
+ "desc": "The parent component proxy."
28
+ },
29
+ "$": {
30
+ "type": "Object",
31
+ "desc": "Internal Vue instance properties.",
32
+ "properties": {
33
+ "parent": {
34
+ "type": "Object",
35
+ "desc": "The parent Vue instance.",
36
+ "properties": {
37
+ "proxy": {
38
+ "type": "ComponentProxy",
39
+ "desc": "The parent component proxy."
40
+ },
41
+ "parent": {
42
+ "type": "ComponentProxy",
43
+ "desc": "The grandparent component proxy."
44
+ }
45
+ }
46
+ }
47
+ }
48
+ },
49
+ "show": {
50
+ "type": "Function",
51
+ "desc": "Function to show the component."
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-page-toc"
5
+ },
6
+ "events": {
7
+ "click": {
8
+ "desc": "Emitted when a Table of Contents item is clicked",
9
+ "params": {
10
+ "tocItem": {
11
+ "type": "Object",
12
+ "desc": "The Table of Contents item that was clicked"
13
+ }
14
+ }
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-prerender"
5
+ },
6
+ "props": {
7
+ "title": {
8
+ "type": "String",
9
+ "desc": "Title of the prerendered content",
10
+ "examples": [
11
+ "'Example Title'",
12
+ "'Sample Content'"
13
+ ],
14
+ "category": "content"
15
+ },
16
+ "tabs": {
17
+ "type": "Array",
18
+ "desc": "List of tabs to display",
19
+ "examples": [
20
+ "['Tab 1', 'Tab 2']"
21
+ ],
22
+ "category": "content"
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-tree"
5
+ },
6
+ "props": {
7
+ "nodes": {
8
+ "type": "Array",
9
+ "desc": "Array of nodes to display in the tree",
10
+ "examples": [
11
+ "[{ id: 1, l: 'Node 1', c: [{ id: 2, l: 'Child Node' }] }]"
12
+ ],
13
+ "category": "content"
14
+ }
15
+ },
16
+ "slots": {
17
+ "default-header": {
18
+ "desc": "Slot for custom content in the tree node header",
19
+ "scope": {
20
+ "prop": {
21
+ "type": "Object",
22
+ "desc": "Properties of the tree node"
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/dark"
5
+ },
6
+ "functions": {
7
+ "useDark": {
8
+ "desc": "Composable function to manage dark mode settings.",
9
+ "returns": {
10
+ "type": "Object",
11
+ "desc": "An object containing the dark mode state and functions to initialize and toggle dark mode.",
12
+ "properties": {
13
+ "isDark": {
14
+ "type": "ComputedRef<boolean>",
15
+ "desc": "A computed reference to the current dark mode state."
16
+ },
17
+ "initDark": {
18
+ "type": "Function",
19
+ "desc": "Function to initialize the dark mode state based on cookies."
20
+ },
21
+ "toggleDark": {
22
+ "type": "Function",
23
+ "desc": "Function to toggle the dark mode state and update cookies."
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "type": "plugin",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/scroll"
5
+ },
6
+ "functions": {
7
+ "useScroll": {
8
+ "desc": "Composable function to manage scroll behavior.",
9
+ "returns": {
10
+ "type": "Object",
11
+ "desc": "An object containing functions to manage scroll behavior.",
12
+ "properties": {
13
+ "scrollToCurrentAnchor": {
14
+ "type": "Function",
15
+ "desc": "Function to scroll to the current anchor in the route.",
16
+ "params": {
17
+ "isRouteChange": {
18
+ "type": "boolean",
19
+ "desc": "Flag to indicate if the scroll is due to a route change."
20
+ }
21
+ },
22
+ "returns": null
23
+ },
24
+ "scrollToTop": {
25
+ "type": "Function",
26
+ "desc": "Function to scroll to the top of the page.",
27
+ "params": {},
28
+ "returns": null
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,29 @@
1
+ export default function getMeta(title: string, desc: string) {
2
+ return {
3
+ title: {
4
+ name: 'title',
5
+ content: title,
6
+ },
7
+ ogTitle: {
8
+ name: 'og:title',
9
+ content: title,
10
+ },
11
+ twitterTitle: {
12
+ name: 'twitter:title',
13
+ content: title,
14
+ },
15
+
16
+ description: {
17
+ name: 'description',
18
+ content: desc,
19
+ },
20
+ ogDesc: {
21
+ name: 'og:description',
22
+ content: desc,
23
+ },
24
+ twitterDesc: {
25
+ name: 'twitter:description',
26
+ content: desc,
27
+ },
28
+ }
29
+ }
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <div class="dark-mode-toggle" @click="toggleMode">
3
+ <div class="toggle-container" :class="{ 'is-dark': isDark }">
4
+ <q-icon :name="props.lightIcon" class="toggle-icon light-icon" />
5
+ <q-icon :name="props.darkIcon" class="toggle-icon dark-icon" />
6
+ </div>
7
+ </div>
8
+ </template>
9
+
10
+ <script setup lang="ts">
11
+ import { computed, watch } from 'vue'
12
+ import { useQuasar } from 'quasar'
13
+ import { useDark } from '../composables/dark'
14
+ import { mdiMoonWaningCrescent, mdiWhiteBalanceSunny } from '@quasar/extras/mdi-v7'
15
+
16
+ const props = defineProps({
17
+ darkIcon: {
18
+ type: String,
19
+ default: mdiMoonWaningCrescent, // Default dark mode icon
20
+ },
21
+ lightIcon: {
22
+ type: String,
23
+ default: mdiWhiteBalanceSunny, // Default light mode icon
24
+ },
25
+ })
26
+
27
+ const emit = defineEmits(['update:mode'])
28
+
29
+ const $q = useQuasar()
30
+ const { toggleDark } = useDark()
31
+
32
+ const isDark = computed(() => $q.dark.isActive)
33
+
34
+ const toggleMode = () => {
35
+ toggleDark()
36
+ emit('update:mode', isDark.value ? 'dark' : 'light')
37
+ }
38
+
39
+ // Watch for changes in Quasar dark mode
40
+ watch(
41
+ () => $q.dark.isActive,
42
+ (newVal) => {
43
+ emit('update:mode', newVal ? 'dark' : 'light')
44
+ },
45
+ )
46
+ </script>
47
+
48
+ <style scoped lang="scss">
49
+ .dark-mode-toggle {
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ cursor: pointer;
54
+ width: 60px;
55
+ height: 30px;
56
+ background-color: $brand-light-bg;
57
+ border: $brand-primary solid 1px;
58
+ border-radius: 15px;
59
+ position: relative;
60
+ overflow: hidden;
61
+ }
62
+
63
+ .toggle-container {
64
+ display: flex;
65
+ align-items: center;
66
+ justify-content: space-between;
67
+ width: 100%;
68
+ height: 100%;
69
+ position: relative;
70
+ transition: transform 0.3s ease;
71
+ }
72
+
73
+ .toggle-container.is-dark .light-icon {
74
+ transform: translateX(-100%);
75
+ }
76
+
77
+ .toggle-container.is-dark .dark-icon {
78
+ transform: translateX(0);
79
+ }
80
+
81
+ .toggle-icon {
82
+ color: $brand-primary;
83
+ font-size: 20px;
84
+ width: 50%;
85
+ text-align: center;
86
+ position: absolute;
87
+ transition: transform 0.3s ease;
88
+ }
89
+
90
+ .light-icon {
91
+ left: 0;
92
+ transform: translateX(0);
93
+ }
94
+
95
+ .dark-icon {
96
+ right: 0;
97
+ transform: translateX(100%);
98
+ }
99
+
100
+ body.body--dark {
101
+ .dark-mode-toggle {
102
+ background-color: $brand-dark-bg;
103
+ }
104
+ }
105
+ </style>