docus 3.0.0-beta.9 → 3.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 (155) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +31 -9
  3. package/app/app/app.config.ts +33 -0
  4. package/app/app/app.vue +54 -0
  5. package/app/app/assets/css/main.css +5 -0
  6. package/app/app/components/IconMenuToggle.vue +81 -0
  7. package/app/app/components/OgImage/OgImageDocs.vue +76 -0
  8. package/app/app/components/OgImage/OgImageLanding.vue +73 -0
  9. package/app/app/components/app/AppFooter.vue +40 -0
  10. package/app/app/components/app/AppHeader.vue +57 -0
  11. package/app/app/components/app/AppHeaderBody.vue +13 -0
  12. package/{theme/components/globals/Logo.vue → app/app/components/app/AppHeaderCTA.vue} +1 -1
  13. package/app/app/components/app/AppHeaderCenter.vue +6 -0
  14. package/app/app/components/app/AppHeaderLogo.vue +16 -0
  15. package/app/app/components/docs/DocsAsideLeftTop.vue +3 -0
  16. package/app/app/components/docs/DocsAsideRightBottom.vue +17 -0
  17. package/app/app/components/docs/DocsPageHeaderLinks.vue +91 -0
  18. package/app/app/error.vue +42 -0
  19. package/app/app/layouts/docs.vue +25 -0
  20. package/app/app/pages/[...slug].vue +111 -0
  21. package/app/app/pages/index.vue +37 -0
  22. package/app/content.config.ts +31 -0
  23. package/app/nuxt.config.ts +41 -0
  24. package/app/nuxt.schema.ts +255 -0
  25. package/app/server/routes/raw/[...slug].md.get.ts +24 -0
  26. package/dist/main.mjs +242 -0
  27. package/package.json +66 -39
  28. package/theme/app/router.options.ts +0 -18
  29. package/theme/assets/css/fonts.css +0 -84
  30. package/theme/assets/css/main.css +0 -104
  31. package/theme/components/app/Container.vue +0 -25
  32. package/theme/components/app/Footer.vue +0 -40
  33. package/theme/components/app/MobileNav.vue +0 -85
  34. package/theme/components/app/Navbar.vue +0 -37
  35. package/theme/components/app/NavbarLogo.vue +0 -33
  36. package/theme/components/app/Page.vue +0 -7
  37. package/theme/components/app/PoweredByDocus.vue +0 -11
  38. package/theme/components/content/Alert.vue +0 -124
  39. package/theme/components/content/BlockHero.vue +0 -54
  40. package/theme/components/content/ButtonLink.vue +0 -45
  41. package/theme/components/content/Card.vue +0 -46
  42. package/theme/components/content/CardGrid.vue +0 -23
  43. package/theme/components/content/CodeBlock.vue +0 -47
  44. package/theme/components/content/CodeGroup.vue +0 -135
  45. package/theme/components/content/CopyButton.vue +0 -49
  46. package/theme/components/content/List.vue +0 -5
  47. package/theme/components/content/NeedContribution.vue +0 -23
  48. package/theme/components/content/ReadMore.vue +0 -25
  49. package/theme/components/content/Sandbox.vue +0 -102
  50. package/theme/components/content/TabsHeader.vue +0 -44
  51. package/theme/components/content/Terminal.vue +0 -64
  52. package/theme/components/content/VideoPlayer.vue +0 -115
  53. package/theme/components/dev/Debug.vue +0 -66
  54. package/theme/components/docs/DocsAside.vue +0 -21
  55. package/theme/components/docs/DocsAsideTree.vue +0 -104
  56. package/theme/components/docs/DocsHero.vue +0 -39
  57. package/theme/components/docs/DocsPage.vue +0 -21
  58. package/theme/components/docs/DocsPageContent.vue +0 -32
  59. package/theme/components/docs/DocsToc.vue +0 -77
  60. package/theme/components/globals/Icon.vue +0 -24
  61. package/theme/components/globals/NuxtImg.vue +0 -45
  62. package/theme/components/globals/SocialIcons.vue +0 -45
  63. package/theme/components/globals/ThemeSelect.vue +0 -35
  64. package/theme/components/icons/IconAlgolia.vue +0 -8
  65. package/theme/components/icons/IconArrowLeft.vue +0 -10
  66. package/theme/components/icons/IconArrowRight.vue +0 -10
  67. package/theme/components/icons/IconBadgeCheck.vue +0 -14
  68. package/theme/components/icons/IconCheck.vue +0 -10
  69. package/theme/components/icons/IconCheckCircle.vue +0 -10
  70. package/theme/components/icons/IconChevronRight.vue +0 -12
  71. package/theme/components/icons/IconClipboardCheck.vue +0 -14
  72. package/theme/components/icons/IconClipboardCopy.vue +0 -14
  73. package/theme/components/icons/IconCodeSandbox.vue +0 -8
  74. package/theme/components/icons/IconCopy.vue +0 -17
  75. package/theme/components/icons/IconDots.vue +0 -10
  76. package/theme/components/icons/IconEdit.vue +0 -18
  77. package/theme/components/icons/IconExclamationCircle.vue +0 -12
  78. package/theme/components/icons/IconExclamationTriangle.vue +0 -10
  79. package/theme/components/icons/IconExternalLink.vue +0 -12
  80. package/theme/components/icons/IconGit.vue +0 -7
  81. package/theme/components/icons/IconGitHub.vue +0 -10
  82. package/theme/components/icons/IconHeart.vue +0 -9
  83. package/theme/components/icons/IconInformationCircle.vue +0 -10
  84. package/theme/components/icons/IconLighthouse.vue +0 -83
  85. package/theme/components/icons/IconLine.vue +0 -10
  86. package/theme/components/icons/IconMarkdown.vue +0 -13
  87. package/theme/components/icons/IconMenu.vue +0 -12
  88. package/theme/components/icons/IconMenuAlt.vue +0 -10
  89. package/theme/components/icons/IconMinus.vue +0 -10
  90. package/theme/components/icons/IconMoon.vue +0 -10
  91. package/theme/components/icons/IconNuxt.vue +0 -14
  92. package/theme/components/icons/IconNuxtContent.vue +0 -20
  93. package/theme/components/icons/IconNuxtLabs.vue +0 -21
  94. package/theme/components/icons/IconPlus.vue +0 -10
  95. package/theme/components/icons/IconPuzzle.vue +0 -8
  96. package/theme/components/icons/IconSSG.vue +0 -7
  97. package/theme/components/icons/IconSearch.vue +0 -12
  98. package/theme/components/icons/IconSun.vue +0 -10
  99. package/theme/components/icons/IconTailwind.vue +0 -3
  100. package/theme/components/icons/IconTocBack.vue +0 -21
  101. package/theme/components/icons/IconTocCurrent.vue +0 -21
  102. package/theme/components/icons/IconTocNext.vue +0 -8
  103. package/theme/components/icons/IconTranslate.vue +0 -14
  104. package/theme/components/icons/IconTwitter.vue +0 -8
  105. package/theme/components/icons/IconVite.vue +0 -30
  106. package/theme/components/icons/IconVue.vue +0 -6
  107. package/theme/components/icons/IconVueTelescope.vue +0 -11
  108. package/theme/components/icons/IconWindi.vue +0 -17
  109. package/theme/components/icons/IconX.vue +0 -12
  110. package/theme/components/icons/IconXCircle.vue +0 -10
  111. package/theme/components/icons/IconZap.vue +0 -8
  112. package/theme/components/prose/ProseA.vue +0 -66
  113. package/theme/components/prose/ProseBlockquote.vue +0 -21
  114. package/theme/components/prose/ProseCode.vue +0 -67
  115. package/theme/components/prose/ProseCodeInline.vue +0 -38
  116. package/theme/components/prose/ProseEm.vue +0 -11
  117. package/theme/components/prose/ProseH1.vue +0 -22
  118. package/theme/components/prose/ProseH2.vue +0 -22
  119. package/theme/components/prose/ProseH3.vue +0 -24
  120. package/theme/components/prose/ProseH4.vue +0 -24
  121. package/theme/components/prose/ProseHr.vue +0 -13
  122. package/theme/components/prose/ProseImg.vue +0 -30
  123. package/theme/components/prose/ProseLi.vue +0 -31
  124. package/theme/components/prose/ProseOl.vue +0 -16
  125. package/theme/components/prose/ProseP.vue +0 -14
  126. package/theme/components/prose/ProseStrong.vue +0 -14
  127. package/theme/components/prose/ProseTable.vue +0 -13
  128. package/theme/components/prose/ProseTbody.vue +0 -5
  129. package/theme/components/prose/ProseTd.vue +0 -11
  130. package/theme/components/prose/ProseTh.vue +0 -11
  131. package/theme/components/prose/ProseThead.vue +0 -11
  132. package/theme/components/prose/ProseTr.vue +0 -11
  133. package/theme/components/prose/ProseUl.vue +0 -15
  134. package/theme/composables/useDocus.ts +0 -43
  135. package/theme/composables/useMenu.ts +0 -7
  136. package/theme/composables/useScrollToHeading.ts +0 -35
  137. package/theme/composables/useScrollspy.ts +0 -46
  138. package/theme/composables/useUserAgent.ts +0 -7
  139. package/theme/composables/utils.ts +0 -4
  140. package/theme/layouts/default.vue +0 -29
  141. package/theme/layouts/page.vue +0 -19
  142. package/theme/middleware/components.ts +0 -26
  143. package/theme/middleware/navigation.global.ts +0 -12
  144. package/theme/middleware/page.ts +0 -8
  145. package/theme/middleware/theme.global.ts +0 -12
  146. package/theme/nuxt.config.ts +0 -171
  147. package/theme/pages/[...slug].vue +0 -64
  148. package/theme/plugins/menu.ts +0 -67
  149. package/theme/plugins/user-agent.ts +0 -27
  150. package/theme/utils/components.ts +0 -25
  151. package/theme/utils/navigation.ts +0 -49
  152. package/theme/utils/plugin.ts +0 -21
  153. package/theme/utils/queries.ts +0 -68
  154. package/theme/utils/state.ts +0 -33
  155. package/theme/utils/theme.ts +0 -66
package/dist/main.mjs ADDED
@@ -0,0 +1,242 @@
1
+ #!/usr/bin/env node
2
+
3
+ // cli/main.ts
4
+ import * as dotenv from "dotenv";
5
+
6
+ // cli/cli.ts
7
+ import { resolve as resolve2 } from "path";
8
+ import { defineCommand, runMain } from "citty";
9
+
10
+ // cli/setup.ts
11
+ import { fileURLToPath } from "url";
12
+ import { resolve } from "path";
13
+ import { readFile } from "fs/promises";
14
+
15
+ // cli/git.ts
16
+ import { execSync } from "child_process";
17
+ import { readGitConfig } from "pkg-types";
18
+ import gitUrlParse from "git-url-parse";
19
+ function getGitBranch() {
20
+ const envName = process.env.CF_PAGES_BRANCH || process.env.CI_COMMIT_BRANCH || process.env.VERCEL_GIT_COMMIT_REF || process.env.BRANCH || process.env.GITHUB_REF_NAME;
21
+ if (envName && envName !== "HEAD") {
22
+ return envName;
23
+ }
24
+ try {
25
+ const branch = execSync("git rev-parse --abbrev-ref HEAD").toString().trim();
26
+ if (branch && branch !== "HEAD") {
27
+ return branch;
28
+ }
29
+ } catch {
30
+ return "main";
31
+ }
32
+ }
33
+ async function getLocalGitInfo(rootDir) {
34
+ const remote = await getLocalGitRemote(rootDir);
35
+ if (!remote) {
36
+ return;
37
+ }
38
+ const { name, owner, source } = gitUrlParse(remote);
39
+ const url = `https://${source}/${owner}/${name}`;
40
+ return {
41
+ name,
42
+ owner,
43
+ url
44
+ };
45
+ }
46
+ async function getLocalGitRemote(dir) {
47
+ var _a, _b;
48
+ try {
49
+ const parsed = await readGitConfig(dir);
50
+ if (!parsed) {
51
+ return;
52
+ }
53
+ return (_b = (_a = parsed.remote) == null ? void 0 : _a["origin"]) == null ? void 0 : _b.url;
54
+ } catch {
55
+ }
56
+ }
57
+ function getGitEnv() {
58
+ var _a, _b, _c;
59
+ const envInfo = {
60
+ // Provider
61
+ provider: process.env.VERCEL_GIT_PROVIDER || (process.env.GITHUB_SERVER_URL ? "github" : void 0) || "",
62
+ // Owner
63
+ owner: process.env.VERCEL_GIT_REPO_OWNER || process.env.GITHUB_REPOSITORY_OWNER || ((_a = process.env.CI_PROJECT_PATH) == null ? void 0 : _a.split("/").shift()) || "",
64
+ // Name
65
+ name: process.env.VERCEL_GIT_REPO_SLUG || ((_b = process.env.GITHUB_REPOSITORY) == null ? void 0 : _b.split("/").pop()) || ((_c = process.env.CI_PROJECT_PATH) == null ? void 0 : _c.split("/").splice(1).join("/")) || "",
66
+ // Url
67
+ url: process.env.REPOSITORY_URL || ""
68
+ // netlify
69
+ };
70
+ if (!envInfo.url && envInfo.provider && envInfo.owner && envInfo.name) {
71
+ envInfo.url = `https://${envInfo.provider}.com/${envInfo.owner}/${envInfo.name}`;
72
+ }
73
+ if (!envInfo.name && !envInfo.owner && envInfo.url) {
74
+ try {
75
+ const { name, owner } = gitUrlParse(envInfo.url);
76
+ envInfo.name = name;
77
+ envInfo.owner = owner;
78
+ } catch {
79
+ }
80
+ }
81
+ return {
82
+ name: envInfo.name,
83
+ owner: envInfo.owner,
84
+ url: envInfo.url
85
+ };
86
+ }
87
+
88
+ // cli/setup.ts
89
+ var appDir = fileURLToPath(new URL("../app", import.meta.url));
90
+ var pkgDir = fileURLToPath(new URL("..", import.meta.url));
91
+ async function getNuxtConfig(dir, _opts = {}) {
92
+ const meta = await getPackageJsonMetadata(dir);
93
+ const fixLayers = (_, nuxt) => {
94
+ const hasDocsDir = nuxt.options._layers.some((layer) => layer.cwd === dir);
95
+ if (!hasDocsDir) {
96
+ nuxt.options._layers.unshift({
97
+ cwd: dir,
98
+ config: {
99
+ rootDir: dir,
100
+ srcDir: dir
101
+ }
102
+ });
103
+ }
104
+ };
105
+ global.__DOCS_DIR__ = resolve(dir, "content");
106
+ const gitInfo = await getLocalGitInfo(dir) || getGitEnv();
107
+ const url = inferSiteURL();
108
+ return {
109
+ compatibilityDate: "2025-04-24",
110
+ extends: [appDir],
111
+ modulesDir: [resolve(pkgDir, "node_modules"), resolve(appDir, "node_modules")],
112
+ modules: ["nuxt-llms", fixLayers],
113
+ appConfig: {
114
+ header: {
115
+ title: meta.name || ""
116
+ },
117
+ github: {
118
+ owner: gitInfo == null ? void 0 : gitInfo.owner,
119
+ name: gitInfo == null ? void 0 : gitInfo.name,
120
+ url: gitInfo == null ? void 0 : gitInfo.url,
121
+ branch: getGitBranch()
122
+ },
123
+ seo: {
124
+ titleTemplate: `%s - ${meta.name}`,
125
+ title: meta.name || "",
126
+ description: meta.description || ""
127
+ },
128
+ toc: {}
129
+ },
130
+ site: {
131
+ url,
132
+ name: meta.name || ""
133
+ },
134
+ llms: {
135
+ domain: url,
136
+ title: meta.name || "",
137
+ description: meta.description || "",
138
+ full: {
139
+ title: meta.name || "",
140
+ description: meta.description || ""
141
+ }
142
+ },
143
+ future: {
144
+ compatibilityVersion: 4
145
+ }
146
+ };
147
+ }
148
+ function inferSiteURL() {
149
+ return process.env.NUXT_SITE_URL || process.env.NEXT_PUBLIC_VERCEL_URL && `https://${process.env.NEXT_PUBLIC_VERCEL_URL}` || process.env.URL || process.env.CI_PAGES_URL || process.env.CF_PAGES_URL;
150
+ }
151
+ async function getPackageJsonMetadata(dir) {
152
+ try {
153
+ const packageJson = await readFile(resolve(dir, "package.json"), "utf-8");
154
+ const parsed = JSON.parse(packageJson);
155
+ return {
156
+ name: parsed.name,
157
+ description: parsed.description
158
+ };
159
+ } catch {
160
+ return {
161
+ name: "docs"
162
+ };
163
+ }
164
+ }
165
+
166
+ // cli/cli.ts
167
+ function createCLI(opts) {
168
+ const sharedArgs = {
169
+ dir: {
170
+ type: "positional",
171
+ description: "Docs directory",
172
+ required: true,
173
+ default: "."
174
+ }
175
+ };
176
+ const init = defineCommand({
177
+ meta: {
178
+ name: "init",
179
+ description: "Initialize a fresh Docus project"
180
+ },
181
+ args: { ...sharedArgs },
182
+ async setup({ args }) {
183
+ const dir = resolve2(args.dir);
184
+ const { runCommand } = await import("nuxi");
185
+ await runCommand("init", [dir, "-t", "gh:nuxtlabs/docus/.starter", dir]);
186
+ }
187
+ });
188
+ const dev = defineCommand({
189
+ meta: {
190
+ name: "dev",
191
+ description: "Start docs in development mode"
192
+ },
193
+ args: { ...sharedArgs },
194
+ async setup({ args }) {
195
+ const dir = resolve2(args.dir);
196
+ const nuxtConfig = await getNuxtConfig(dir, {
197
+ ...opts.setup,
198
+ dev: true
199
+ });
200
+ const { runCommand } = await import("nuxi");
201
+ await runCommand("dev", [dir, "--no-fork", "--port", process.env.PORT || "4000"], { overrides: nuxtConfig });
202
+ }
203
+ });
204
+ const build = defineCommand({
205
+ meta: {
206
+ name: "build",
207
+ description: "Build docs for production"
208
+ },
209
+ args: { ...sharedArgs },
210
+ async setup({ args }) {
211
+ const dir = resolve2(args.dir);
212
+ const nuxtConfig = await getNuxtConfig(dir, opts.setup);
213
+ const { runCommand } = await import("nuxi");
214
+ await runCommand("build", [dir], { overrides: nuxtConfig });
215
+ }
216
+ });
217
+ const main = defineCommand({
218
+ meta: {
219
+ name: opts.name,
220
+ description: opts.description
221
+ },
222
+ subCommands: {
223
+ init,
224
+ dev,
225
+ build
226
+ }
227
+ });
228
+ return {
229
+ runMain: () => runMain(main)
230
+ };
231
+ }
232
+
233
+ // cli/main.ts
234
+ dotenv.config();
235
+ var cli = createCLI({
236
+ name: "Docus",
237
+ description: "Docus Docs CLI",
238
+ setup: {
239
+ defaults: {}
240
+ }
241
+ });
242
+ cli.runMain();
package/package.json CHANGED
@@ -1,47 +1,74 @@
1
1
  {
2
- "version": "3.0.0-beta.9",
3
2
  "name": "docus",
4
- "scripts": {
5
- "build": "nuxi build",
6
- "dev": "nuxi dev",
7
- "preview": "nuxi preview",
8
- "lint": "eslint --ext .ts,.js,.vue,.css ."
3
+ "description": "Minimal Documentation theme and CLI for shared usage across Nuxt modules",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/nuxtlabs/docus"
9
7
  },
10
- "devDependencies": {
11
- "@antfu/eslint-config": "^0.21.1",
12
- "@nuxtjs/eslint-config-typescript": "^9.0.0",
13
- "eslint": "^8.14.0",
14
- "jiti": "^1.13.0",
15
- "nuxt": "npm:nuxt3@latest",
16
- "parse-entities": "^4.0.0",
17
- "typescript": "^4.6.4"
8
+ "private": false,
9
+ "version": "3.0.0",
10
+ "keywords": [],
11
+ "license": "MIT",
12
+ "bin": {
13
+ "docus": "./dist/main.mjs"
14
+ },
15
+ "files": [
16
+ "app",
17
+ "dist",
18
+ "!app/**/node_modules",
19
+ "!app/**/.nuxt",
20
+ "!app/**/tsconfig.json"
21
+ ],
22
+ "scripts": {
23
+ "dev": "npm run docs:dev",
24
+ "docs:dev": "NUXT_DOCS_DEV=1 npm run docus dev docs",
25
+ "docs:build": "npm run docus build docs",
26
+ "dev:prepare": "nuxi prepare app && nuxi prepare docs",
27
+ "build": "tsup-node ./cli/main.ts --format esm",
28
+ "docus": "tsx ./cli/main.ts",
29
+ "test": "echo \"Error: no test specified\"",
30
+ "lint": "eslint .",
31
+ "release": "npm run lint && npm run test && npm run build && release-it"
18
32
  },
19
33
  "dependencies": {
20
- "@iconify/vue": "^3.2.1",
21
- "@nuxt/content": "npm:@nuxt/content-edge@latest",
22
- "@nuxthq/admin": "npm:@nuxthq/admin-edge@latest",
23
- "@nuxtjs/color-mode": "^3.0.2",
24
- "@nuxtjs/tailwindcss": "^5.0.3",
25
- "@tailwindcss/aspect-ratio": "^0.4.0",
26
- "@tailwindcss/forms": "^0.5.0",
27
- "@tailwindcss/line-clamp": "^0.4.0",
28
- "@tailwindcss/typography": "^0.5.2",
29
- "@vueuse/core": "^8.3.1",
30
- "@vueuse/motion": "2.0.0-beta.12",
31
- "@vueuse/nuxt": "^8.3.1",
32
- "clipboard": "^2.0.10",
33
- "defu": "^6.0.0",
34
- "lodash-es": "^4.17.21",
35
- "tailwindcss": "^3.0.24",
36
- "vue-plausible": "^1.3.1"
34
+ "@iconify-json/lucide": "^1.2.47",
35
+ "@iconify-json/simple-icons": "^1.2.38",
36
+ "@iconify-json/vscode-icons": "^1.2.22",
37
+ "@nuxt/content": "^3.6.0",
38
+ "@nuxt/image": "^1.10.0",
39
+ "@nuxt/kit": "^3.17.5",
40
+ "@nuxt/ui-pro": "^3.1.3",
41
+ "@nuxtjs/robots": "^5.2.10",
42
+ "c12": "^3.0.4",
43
+ "citty": "^0.1.6",
44
+ "dotenv": "^16.5.0",
45
+ "git-url-parse": "^16.1.0",
46
+ "minimark": "^0.2.0",
47
+ "motion-v": "^1.2.1",
48
+ "nuxi": "^3.25.1",
49
+ "nuxt-llms": "^0.1.3",
50
+ "nuxt-og-image": "^5.1.6",
51
+ "pkg-types": "^2.1.0",
52
+ "tailwindcss": "^4.1.8",
53
+ "ufo": "^1.6.1",
54
+ "unctx": "^2.4.1"
55
+ },
56
+ "devDependencies": {
57
+ "@nuxt/eslint-config": "^1.4.1",
58
+ "@release-it/conventional-changelog": "^10.0.1",
59
+ "@stylistic/eslint-plugin": "^4.4.1",
60
+ "@types/node": "^24.0.0",
61
+ "@typescript-eslint/parser": "^8.34.0",
62
+ "changelogen": "^0.6.1",
63
+ "eslint": "^9.28.0",
64
+ "release-it": "^19.0.3",
65
+ "tsup": "^8.5.0",
66
+ "tsx": "^4.19.4",
67
+ "typescript": "^5.8.3"
37
68
  },
38
- "main": "./nuxt.config.ts",
39
- "exports": {
40
- "./theme": "./theme/nuxt.config.ts",
41
- "./theme/*": "./theme/*/*.*"
69
+ "peerDependencies": {
70
+ "better-sqlite3": "11.x",
71
+ "nuxt": "3.x"
42
72
  },
43
- "files": [
44
- "README.md",
45
- "theme"
46
- ]
73
+ "packageManager": "pnpm@10.12.1"
47
74
  }
@@ -1,18 +0,0 @@
1
- import type { RouterConfig } from '@nuxt/schema'
2
-
3
- // https://router.vuejs.org/api/#routeroptions
4
- export default <RouterConfig>{
5
- scrollBehavior: (to) => {
6
- if (to.params?.smooth) {
7
- return {
8
- el: to.params?.smooth,
9
- behavior: 'smooth',
10
- }
11
- }
12
-
13
- // Scroll to top of window
14
- window.scrollTo({
15
- top: 0,
16
- })
17
- },
18
- }
@@ -1,84 +0,0 @@
1
- /* `font-light` */
2
- @font-face {
3
- font-family: "RoobertPRO";
4
- src: url("/fonts/RoobertPRO-Light.woff2") format("woff2"),
5
- url("/fonts/RoobertPRO-Light.woff") format("woff");
6
- font-weight: 300;
7
- }
8
- @font-face {
9
- font-family: "RoobertPRO";
10
- src: url("/fonts/RoobertPRO-LightItalic.woff2") format("woff2"),
11
- url("/fonts/RoobertPRO-LightItalic.woff") format("woff");
12
- font-weight: 300;
13
- font-style: italic;
14
- }
15
- /* `font-normal` */
16
- @font-face {
17
- font-family: "RoobertPRO";
18
- src: url("/fonts/RoobertPRO-Regular.woff2") format("woff2"),
19
- url("/fonts/RoobertPRO-Regular.woff") format("woff");
20
- font-weight: 400;
21
- }
22
- @font-face {
23
- font-family: "RoobertPRO";
24
- src: url("/fonts/RoobertPRO-RegularItalic.woff2") format("woff2"),
25
- url("/fonts/RoobertPRO-RegularItalic.woff") format("woff");
26
- font-weight: 400;
27
- font-style: italic;
28
- }
29
- /* `font-medium */
30
- @font-face {
31
- font-family: "RoobertPRO";
32
- src: url("/fonts/RoobertPRO-Medium.woff2") format("woff2"),
33
- url("/fonts/RoobertPRO-Medium.woff") format("woff");
34
- font-weight: 500;
35
- }
36
- @font-face {
37
- font-family: "RoobertPRO";
38
- src: url("/fonts/RoobertPRO-MediumItalic.woff2") format("woff2"),
39
- url("/fonts/RoobertPRO-MediumItalic.woff") format("woff");
40
- font-weight: 500;
41
- font-style: italic;
42
- }
43
- /* `font-semibold` */
44
- @font-face {
45
- font-family: "RoobertPRO";
46
- src: url("/fonts/RoobertPRO-SemiBold.woff2") format("woff2"),
47
- url("/fonts/RoobertPRO-SemiBold.woff") format("woff");
48
- font-weight: 600;
49
- }
50
- @font-face {
51
- font-family: "RoobertPRO";
52
- src: url("/fonts/RoobertPRO-SemiBoldItalic.woff2") format("woff2"),
53
- url("/fonts/RoobertPRO-SemiBoldItalic.woff") format("woff");
54
- font-weight: 600;
55
- font-style: italic;
56
- }
57
- /* `font-bold` */
58
- @font-face {
59
- font-family: "RoobertPRO";
60
- src: url("/fonts/RoobertPRO-Bold.woff2") format("woff2"),
61
- url("/fonts/RoobertPRO-Bold.woff") format("woff");
62
- font-weight: 700;
63
- }
64
- @font-face {
65
- font-family: "RoobertPRO";
66
- src: url("/fonts/RoobertPRO-BoldItalic.woff2") format("woff2"),
67
- url("/fonts/RoobertPRO-BoldItalic.woff") format("woff");
68
- font-weight: 700;
69
- font-style: italic;
70
- }
71
- /* `font-extrabold` */
72
- @font-face {
73
- font-family: "RoobertPRO";
74
- src: url("/fonts/RoobertPRO-Heavy.woff2") format("woff2"),
75
- url("/fonts/RoobertPRO-Heavy.woff") format("woff");
76
- font-weight: 800;
77
- }
78
- @font-face {
79
- font-family: "RoobertPRO";
80
- src: url("/fonts/RoobertPRO-HeavyItalic.woff2") format("woff2"),
81
- url("/fonts/RoobertPRO-HeavyItalic.woff") format("woff");
82
- font-weight: 800;
83
- font-style: italic;
84
- }
@@ -1,104 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- /* Variables */
6
- :root {
7
- --header-height: 4rem;
8
- --codeblocks-background: theme('colors.gray.900');
9
- }
10
-
11
- @layer components {
12
- /* Text primary */
13
-
14
- .text-primary {
15
- @apply text-gray-900 dark:text-gray-50;
16
- }
17
-
18
- /* Text secondary */
19
-
20
- .text-secondary {
21
- @apply text-gray-500 dark:text-gray-400;
22
- }
23
-
24
- .text-secondary-active {
25
- @apply text-primary-500 dark:text-primary-400;
26
- }
27
-
28
- .text-secondary-hover {
29
- @apply hover:text-primary-500 hover:dark:text-primary-400;
30
- }
31
-
32
- .text-secondary-group-hover {
33
- @apply group-hover:dark:text-primary-400 group-hover:text-primary-500;
34
- }
35
-
36
- /* Transitions */
37
-
38
- .transition-base {
39
- @apply transition-colors transition-opacity duration-100 ease-in-out;
40
- }
41
-
42
- /* Surface */
43
-
44
- .surface {
45
- @apply dark:bg-gray-900 bg-white;
46
- }
47
-
48
- .surface-secondary {
49
- @apply bg-gray-500 dark:bg-gray-400;
50
- }
51
-
52
- .blurry-surface {
53
- @apply backdrop-blur bg-white/95 dark:bg-gray-900/95;
54
- }
55
-
56
- /* Borders */
57
-
58
- .surface-border {
59
- @apply border-gray-200 dark:border-gray-800;
60
- }
61
-
62
- .surface-border-hover {
63
- @apply border-primary-200 dark:border-gray-700;
64
- }
65
-
66
- .surface-border-header {
67
- @apply border-b border-gray-200 dark:border-gray-800 border-opacity-50;
68
- }
69
-
70
- /* Icons */
71
-
72
- .icon-base {
73
- @apply transition-base text-secondary text-secondary-hover;
74
- }
75
-
76
- /* Code blocks */
77
-
78
- .code-background {
79
- /* background-color: var(--codeblocks-background); */
80
- @apply bg-gray-800;
81
- }
82
-
83
- /* Images */
84
-
85
- .light-img {
86
- @apply dark:hidden;
87
- }
88
-
89
- .dark-img {
90
- @apply hidden;
91
- }
92
- }
93
-
94
- html {
95
- @apply text-primary bg-white overflow-y-scroll;
96
-
97
- &.dark {
98
- @apply bg-gray-900;
99
- }
100
- }
101
-
102
- body {
103
- @apply antialiased font-sans text-gray-700 dark:text-gray-200;
104
- }
@@ -1,25 +0,0 @@
1
- <script setup lang="ts">
2
- import { classNames, computed } from '#imports'
3
-
4
- const props = defineProps({
5
- padded: {
6
- type: Boolean,
7
- default: false,
8
- },
9
- constrained: {
10
- type: Boolean,
11
- default: true,
12
- },
13
- })
14
-
15
- const containerClass = computed(() => classNames(
16
- 'mx-auto max-w-7xl px-4 sm:px-6',
17
- props.padded && 'px-4',
18
- ))
19
- </script>
20
-
21
- <template>
22
- <div :class="containerClass">
23
- <slot />
24
- </div>
25
- </template>
@@ -1,40 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, useDocus } from '#imports'
3
-
4
- const { theme } = useDocus()
5
-
6
- const icons = computed(() => theme.value?.footer?.icons || [])
7
- </script>
8
-
9
- <template>
10
- <footer class="py-6 sm:py-0 bg-gray-50 dark:bg-gray-800 dark:bg-opacity-25 h-[8rem] sm:h-[4rem]">
11
- <Container class="flex h-full flex-col gap-y-4 sm:flex-row justify-between items-center">
12
- <a
13
- v-if="theme.footer.credits"
14
- href="https://nuxtlabs.com"
15
- rel="noopener"
16
- target="_blank"
17
- class="flex items-end text-secondary transition-base dark:hover:text-gray-100 hover:text-gray-600 mb-3 sm:mb-0"
18
- >
19
- <IconNuxtLabs class="mr-2" />
20
- <p class="font-semibold text-sm">Made by Nuxt Labs</p>
21
- </a>
22
-
23
- <div class="flex">
24
- <a
25
- v-for="icon in icons"
26
- :key="icon.label"
27
- rel="noopener"
28
- :aria-label="icon.label"
29
- :href="icon.href"
30
- target="_blank"
31
- class="text-sm flex items-center font-medium p-1 icon-base"
32
- >
33
- <Component :is="icon.component" class="w-8 h-8" />
34
- </a>
35
-
36
- <SocialIcons size="w-8 h-8" padding="p-1" />
37
- </div>
38
- </Container>
39
- </footer>
40
- </template>