create-boltdocs 0.2.2 → 0.2.4

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.
@@ -11,7 +11,7 @@ export const pages = {
11
11
  }
12
12
 
13
13
  export const layout = ({ children }: { children: React.ReactNode }) => (
14
- <div className="pb-10">
14
+ <div className="pb-10 px-10">
15
15
  <Navbar />
16
16
  {children}
17
17
  <Footer />
@@ -1,12 +1,13 @@
1
1
  @import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
2
2
  @import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap");
3
-
4
3
  @import "tailwindcss";
5
4
 
5
+ /* Tailwind must be declared first so the theme can override its styles */
6
+ @import "boltdocs/theme/reset.css";
6
7
  @import "boltdocs/theme/neutral.css";
7
8
 
8
9
  /*
9
10
  @source directive tells Tailwind to scan Boltdocs client components
10
11
  inside node_modules for class usage and generate the necessary CSS.
11
12
  */
12
- @source "./node_modules/boltdocs/src/client";
13
+ @source "./node_modules/boltdocs/src/client";
@@ -0,0 +1,78 @@
1
+ import { Card, Cards, useI18n } from 'boltdocs/client'
2
+ import { Route, FileText, Settings, Sparkles } from 'lucide-react'
3
+
4
+ const features = [
5
+ {
6
+ title: {
7
+ en: 'File-route',
8
+ es: 'Rutas de archivos',
9
+ },
10
+ description: {
11
+ en: 'Generate routes from file structure.',
12
+ es: 'Genera rutas a partir de la estructura de archivos.',
13
+ },
14
+ Icon: Route,
15
+ },
16
+ {
17
+ title: {
18
+ en: 'Markdown',
19
+ es: 'Markdown',
20
+ },
21
+ description: {
22
+ en: 'Support Markdown for writing documentation.',
23
+ es: 'Soporte de Markdown para escribir documentación.',
24
+ },
25
+ Icon: FileText,
26
+ },
27
+ {
28
+ title: {
29
+ en: 'Customizable',
30
+ es: 'Personalizable',
31
+ },
32
+ description: {
33
+ en: 'Customizable to your needs.',
34
+ es: 'Personalizable a tus necesidades.',
35
+ },
36
+ Icon: Settings,
37
+ },
38
+ {
39
+ title: {
40
+ en: 'Secure by design',
41
+ es: 'Seguro por diseño',
42
+ },
43
+ description: {
44
+ en: 'Boltdocs is secure by design.',
45
+ es: 'Boltdocs es seguro por diseño.',
46
+ },
47
+ Icon: Sparkles,
48
+ },
49
+ ]
50
+
51
+ export function HomePage() {
52
+ const { currentLocale } = useI18n()
53
+ return (
54
+ <div className="w-full h-[calc(100vh-120px)] flex items-center gap-10">
55
+ <div className="flex flex-col justify-center py-10">
56
+ <h1 className="text-5xl font-extrabold">
57
+ Power by <p className="text-purple-500 inline">Boltdocs</p>
58
+ </h1>
59
+ <p className="text-xl mt-4 text-muted">Docs generators for react.</p>
60
+ </div>
61
+ <Cards cols={4}>
62
+ {features.map((feature) => (
63
+ <Card
64
+ key={feature.title.en}
65
+ title={feature.title[currentLocale as keyof typeof feature.title]}
66
+ icon={<feature.Icon />}
67
+ >
68
+ {
69
+ feature.description[
70
+ currentLocale as keyof typeof feature.description
71
+ ]
72
+ }
73
+ </Card>
74
+ ))}
75
+ </Cards>
76
+ </div>
77
+ )
78
+ }
@@ -1,6 +1,6 @@
1
1
  import { Navbar } from 'boltdocs/client'
2
2
  import { Footer } from '../../src/components/footer'
3
- import { HomePage } from '../../src/pages/home'
3
+ import { HomePage } from './home'
4
4
 
5
5
  /**
6
6
  * Custom external routes.
@@ -11,7 +11,7 @@ export const pages = {
11
11
  }
12
12
 
13
13
  export const layout = ({ children }: { children: React.ReactNode }) => (
14
- <div className="pb-10">
14
+ <div className="pb-10 px-10">
15
15
  <Navbar />
16
16
  {children}
17
17
  <Footer />
@@ -1,12 +1,13 @@
1
1
  @import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
2
2
  @import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap");
3
-
4
3
  @import "tailwindcss";
5
4
 
5
+ /* Tailwind must be declared first so the theme can override its styles */
6
+ @import "boltdocs/theme/reset.css";
6
7
  @import "boltdocs/theme/neutral.css";
7
8
 
8
9
  /*
9
10
  @source directive tells Tailwind to scan Boltdocs client components
10
11
  inside node_modules for class usage and generate the necessary CSS.
11
12
  */
12
- @source "./node_modules/boltdocs/src/client";
13
+ @source "./node_modules/boltdocs/src/client";
@@ -7,5 +7,5 @@ const locale = {
7
7
 
8
8
  export function Footer() {
9
9
  const { currentLocale } = useI18n()
10
- return <footer>{locale[currentLocale ?? 'en']}</footer>
10
+ return <footer>{locale[currentLocale as keyof typeof locale]}</footer>
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-boltdocs",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Create a new boltdocs project",
5
5
  "type": "module",
6
6
  "author": "Jesus Alcala",