Skip to content

Commit b9c5f8b

Browse files
authored
Feature/docs v3 modernize (#693)
* Add prose styles for content rendering and code highlighting improvements - Introduced a new CSS file for prose styles to enhance content readability. - Defined styles for headings, paragraphs, lists, blockquotes, code blocks, tables, images, and horizontal rules. - Implemented alert styles for different message types (info, warning, error, success). - Improved code highlighting styles for better presentation of code snippets. * refactor: remove prose styles and related components for cleaner codebase * refactor: remove unnecessary whitespace in authentication documentation * refactor: update code snippets in documentation for clarity and consistency * chore: update node-forge to version 1.3.2 in package-lock.json * chore: update contents.sqlite for improved data management
1 parent 3d661cf commit b9c5f8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+5286
-8139
lines changed
3.22 MB
Binary file not shown.

docs-v3/app.vue

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
<template>
2-
<div>
2+
<UApp>
33
<NuxtPage />
4-
</div>
4+
<ClientOnly>
5+
<LazyUContentSearch
6+
v-model:search-term="searchTerm"
7+
shortcut="meta_k"
8+
:files="files"
9+
:navigation="navigation"
10+
:fuse="{ resultLimit: 42 }"
11+
placeholder="Search documentation..."
12+
/>
13+
</ClientOnly>
14+
</UApp>
515
</template>
616

717
<script setup lang="ts">
@@ -12,6 +22,11 @@ useHead({
1222
}
1323
})
1424
15-
// Enable dark mode
16-
const colorMode = useColorMode()
25+
// Fetch navigation and search data using the correct Nuxt Content composables
26+
const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('content'))
27+
const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSections('content'), {
28+
server: false
29+
})
30+
31+
const searchTerm = ref('')
1732
</script>

docs-v3/assets/css/main.css

Lines changed: 14 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,25 @@
1-
@import 'tailwindcss/base';
2-
@import 'tailwindcss/components';
3-
@import 'tailwindcss/utilities';
4-
51
/* Custom fonts */
62
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
73
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');
84

5+
@import "tailwindcss";
6+
@import "@nuxt/ui";
7+
8+
99
/* Base styles */
1010
html {
1111
scroll-behavior: smooth;
1212
}
1313

14-
body {
15-
@apply font-sans antialiased;
16-
}
17-
18-
/* Scrollbar styling */
19-
::-webkit-scrollbar {
20-
@apply w-2;
21-
}
22-
23-
::-webkit-scrollbar-track {
24-
@apply bg-gray-100 dark:bg-gray-800;
25-
}
26-
27-
::-webkit-scrollbar-thumb {
28-
@apply bg-gray-300 dark:bg-gray-600 rounded-full;
29-
}
30-
31-
::-webkit-scrollbar-thumb:hover {
32-
@apply bg-gray-400 dark:bg-gray-500;
33-
}
34-
35-
/* Code block styling */
36-
pre {
37-
@apply overflow-x-auto p-4 rounded-lg;
38-
}
39-
40-
/* Shiki code blocks - light theme improvements */
41-
.shiki {
42-
@apply bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg;
43-
}
44-
45-
.shiki pre {
46-
@apply bg-transparent m-0 p-4;
47-
}
48-
49-
/* Override the dark background in light mode */
50-
.shiki.shiki-themes.github-light.github-dark {
51-
@apply bg-gray-50 dark:bg-gray-900;
52-
}
53-
54-
.shiki code {
55-
@apply bg-transparent text-sm leading-relaxed;
56-
}
57-
58-
/* Fix unstyled content in HTTP and other code blocks */
59-
.shiki code span:not([style]),
60-
.shiki code span[style=""],
61-
.shiki code span:empty,
62-
.shiki code span {
63-
@apply text-gray-800 dark:text-gray-200;
64-
}
65-
66-
/* Specific styling for HTTP code blocks */
67-
.language-http .shiki,
68-
.language-http.shiki {
69-
@apply bg-blue-50 dark:bg-gray-900;
70-
}
71-
72-
.language-http code,
73-
.language-http .shiki code,
74-
.language-http span {
75-
@apply text-blue-900 dark:text-blue-200 font-semibold;
76-
}
77-
78-
/* Override for all code block content to ensure visibility */
79-
.prose .shiki code,
80-
.prose .language-http code,
81-
.prose pre code {
82-
@apply text-gray-900 dark:text-gray-100;
83-
}
84-
85-
/* Force visibility for any unstyled spans in code */
86-
.prose .shiki code span,
87-
.prose .language-http code span,
88-
.prose pre code span {
89-
@apply text-gray-900 dark:text-gray-100;
90-
}
91-
92-
/* Special handling for HTTP method blocks */
93-
.language-http.shiki code span {
94-
@apply text-blue-900 dark:text-blue-200 font-semibold !important;
95-
}
96-
97-
/* Custom components */
98-
.prose-docs {
99-
@apply prose prose-gray max-w-none dark:prose-dark;
100-
}
101-
102-
/* Code blocks with blue gradient in light theme */
103-
.prose-docs pre {
104-
@apply bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-800 dark:to-gray-900 border border-blue-200 dark:border-gray-700 relative;
105-
}
106-
107-
.prose-docs pre code {
108-
@apply text-gray-900 dark:text-gray-100;
109-
}
110-
111-
/* Code block copy button styling */
112-
.prose-docs .group:hover .copy-button {
113-
@apply opacity-100;
114-
}
115-
116-
.prose-docs code {
117-
@apply text-sm font-mono bg-blue-200 dark:bg-gray-700 text-blue-900 dark:text-blue-300 px-2 py-1 rounded;
118-
}
119-
120-
/* Inline code styling */
121-
.prose-docs :not(pre) > code {
122-
@apply bg-blue-200 dark:bg-gray-700 text-blue-900 dark:text-blue-300 px-2 py-1 rounded font-medium;
14+
/* Basic component styles */
15+
.nav-link-active {
16+
color: rgb(37 99 235);
17+
background-color: rgb(239 246 255);
12318
}
12419

125-
/* Navigation active states */
126-
.nav-link-active {
127-
@apply text-primary-600 dark:text-primary-400 bg-primary-50 dark:bg-primary-900/20;
20+
.dark .nav-link-active {
21+
color: rgb(96 165 250);
22+
background-color: rgba(59 130 246 / 0.2);
12823
}
12924

13025
/* Content transitions */
@@ -138,11 +33,6 @@ pre {
13833
opacity: 0;
13934
}
14035

141-
/* Focus styles */
142-
.focus-ring {
143-
@apply focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800;
144-
}
145-
14636
/* Mobile menu animation */
14737
.mobile-menu-enter-active,
14838
.mobile-menu-leave-active {
@@ -168,19 +58,7 @@ pre {
16858
transform: scale(1.05);
16959
}
17060

171-
/* Search highlight styles */
172-
mark {
173-
@apply bg-yellow-200 dark:bg-yellow-800 px-1 rounded text-gray-900 dark:text-white;
174-
}
175-
176-
/* Search modal animation */
177-
.search-modal-enter-active,
178-
.search-modal-leave-active {
179-
transition: all 0.2s ease;
180-
}
181-
182-
.search-modal-enter-from,
183-
.search-modal-leave-to {
184-
opacity: 0;
185-
transform: scale(0.95);
61+
/* Focus ring utility */
62+
.focus-ring {
63+
@apply focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800;
18664
}

docs-v3/components/SearchInput.vue

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)