1
1
import { NuxtConfig } from "@nuxt/schema"
2
2
import { Dependency } from "../../utils/addPackageDependency"
3
3
4
- const generateModuleHTMLSnippet = ( title : string , description : string , cardClass : string , documentationLink : string , styles : string ) : { html : string , css : string } => {
4
+ const generateModuleHTMLSnippet = (
5
+ title : string ,
6
+ description : string ,
7
+ cardClass : string ,
8
+ styles : string ,
9
+ documentationLink : string ,
10
+ exampleLink ?: string
11
+ ) : { html : string , css : string } => {
5
12
const html = ` <div class="card ${ cardClass } ">
6
13
<div class="card__body">
7
14
<h2 class="card__title">
@@ -11,11 +18,22 @@ const generateModuleHTMLSnippet = (title: string, description: string, cardClass
11
18
${ description }
12
19
</p>
13
20
</div>
14
- <p class="card__action">
21
+ ${ exampleLink ? (
22
+ `<p class="card__action">
15
23
<a class="card__link" href="${ documentationLink } " target="_blank">
16
24
Read documentation
17
25
</a>
18
- </p>
26
+ <a class="card__link" href="${ exampleLink } " target="_blank">
27
+ See example
28
+ </a>
29
+ </p>`
30
+ ) : (
31
+ `<p class="card__action">
32
+ <a class="card__link" href="${ documentationLink } " target="_blank">
33
+ Read documentation
34
+ </a>
35
+ </p>`
36
+ ) }
19
37
</div>`
20
38
const css = `.${ cardClass } { ${ styles } }`
21
39
return {
@@ -378,8 +396,9 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
378
396
"Prisma ORM" ,
379
397
"Prisma unlocks a new level of developer experience when working with databases thanks to its intuitive data model, automated migrations, type-safety & auto-completion." ,
380
398
"prisma__card" ,
399
+ "background: radial-gradient(#3fbafe, #5A67D8FF);" ,
381
400
"https://sidebase.io/sidebase/components/prisma" ,
382
- "background: radial-gradient(#3fbafe, #5A67D8FF); "
401
+ "/prisma "
383
402
) ,
384
403
} ,
385
404
"auth" : {
@@ -415,8 +434,9 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
415
434
"Authentication" ,
416
435
"Nuxt user authentication and sessions through nuxt-auth. nuxt-auth wraps NextAuth.js to offer the reliability & convenience of a 12k star library to the nuxt 3 ecosystem with a native developer experience (DX)" ,
417
436
"auth__card" ,
437
+ "background: radial-gradient(#0FCF97, #0B9A71);" ,
418
438
"https://sidebase.io/nuxt-auth/getting-started" ,
419
- "background: radial-gradient(#0FCF97, #0B9A71); "
439
+ "/protected "
420
440
) ,
421
441
} ,
422
442
"trpc" : {
@@ -479,8 +499,9 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
479
499
"tRPC" ,
480
500
"tRPC allows you to easily build & consume fully typesafe APIs without schemas or code generation." ,
481
501
"trpc__card" ,
502
+ "background: radial-gradient(#a07ccf, #926dc2);" ,
482
503
"https://sidebase.io/sidebase/components/trpc" ,
483
- "background: radial-gradient(#a07ccf, #926dc2); "
504
+ "/trpc "
484
505
) ,
485
506
} ,
486
507
"tailwind" : {
@@ -500,8 +521,8 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
500
521
"TailwindCSS" ,
501
522
"Rapidly build modern websites without ever leaving your HTML." ,
502
523
"tailwind__card" ,
524
+ "background: radial-gradient(#7466e3, #5a4ad9);" ,
503
525
"https://sidebase.io/sidebase/components/tailwindcss" ,
504
- "background: radial-gradient(#7466e3, #5a4ad9);"
505
526
) ,
506
527
} ,
507
528
"naiveui" : {
@@ -521,8 +542,8 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
521
542
"NaiveUI" ,
522
543
"A Vue 3 Component Library. Complete, Customizable, Uses TypeScript, Fast." ,
523
544
"naiveui__card" ,
545
+ "background: radial-gradient(#ad6434, #995020);" ,
524
546
"https://www.naiveui.com/en-US/os-theme" ,
525
- "background: radial-gradient(#ad6434, #995020);"
526
547
) ,
527
548
}
528
549
}
0 commit comments