11import { NuxtConfig } from "@nuxt/schema"
22import { Dependency } from "../../utils/addPackageDependency"
33
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 } => {
512 const html = ` <div class="card ${ cardClass } ">
613 <div class="card__body">
714 <h2 class="card__title">
@@ -11,11 +18,22 @@ const generateModuleHTMLSnippet = (title: string, description: string, cardClass
1118 ${ description }
1219 </p>
1320 </div>
14- <p class="card__action">
21+ ${ exampleLink ? (
22+ `<p class="card__action">
1523 <a class="card__link" href="${ documentationLink } " target="_blank">
1624 Read documentation
1725 </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+ ) }
1937 </div>`
2038 const css = `.${ cardClass } { ${ styles } }`
2139 return {
@@ -378,8 +396,9 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
378396 "Prisma ORM" ,
379397 "Prisma unlocks a new level of developer experience when working with databases thanks to its intuitive data model, automated migrations, type-safety & auto-completion." ,
380398 "prisma__card" ,
399+ "background: radial-gradient(#3fbafe, #5A67D8FF);" ,
381400 "https://sidebase.io/sidebase/components/prisma" ,
382- "background: radial-gradient(#3fbafe, #5A67D8FF); "
401+ "/prisma "
383402 ) ,
384403 } ,
385404 "auth" : {
@@ -415,8 +434,9 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
415434 "Authentication" ,
416435 "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)" ,
417436 "auth__card" ,
437+ "background: radial-gradient(#0FCF97, #0B9A71);" ,
418438 "https://sidebase.io/nuxt-auth/getting-started" ,
419- "background: radial-gradient(#0FCF97, #0B9A71); "
439+ "/protected "
420440 ) ,
421441 } ,
422442 "trpc" : {
@@ -479,8 +499,9 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
479499 "tRPC" ,
480500 "tRPC allows you to easily build & consume fully typesafe APIs without schemas or code generation." ,
481501 "trpc__card" ,
502+ "background: radial-gradient(#a07ccf, #926dc2);" ,
482503 "https://sidebase.io/sidebase/components/trpc" ,
483- "background: radial-gradient(#a07ccf, #926dc2); "
504+ "/trpc "
484505 ) ,
485506 } ,
486507 "tailwind" : {
@@ -500,8 +521,8 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
500521 "TailwindCSS" ,
501522 "Rapidly build modern websites without ever leaving your HTML." ,
502523 "tailwind__card" ,
524+ "background: radial-gradient(#7466e3, #5a4ad9);" ,
503525 "https://sidebase.io/sidebase/components/tailwindcss" ,
504- "background: radial-gradient(#7466e3, #5a4ad9);"
505526 ) ,
506527 } ,
507528 "naiveui" : {
@@ -521,8 +542,8 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
521542 "NaiveUI" ,
522543 "A Vue 3 Component Library. Complete, Customizable, Uses TypeScript, Fast." ,
523544 "naiveui__card" ,
545+ "background: radial-gradient(#ad6434, #995020);" ,
524546 "https://www.naiveui.com/en-US/os-theme" ,
525- "background: radial-gradient(#ad6434, #995020);"
526547 ) ,
527548 }
528549}
0 commit comments