File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { PagingNav, FileLayout } from './components/Docs.mjs'
1010import Typesense from "./components/Typesense.mjs"
1111import ProjectTemplate from "./components/ProjectTemplate.mjs"
1212import ProjectCreator from "./components/ProjectCreator.mjs"
13+ import VibeTemplate from "../pages/components/VibeTemplate.mjs"
1314
1415let client = null , Apps = [ ]
1516let AppData = {
@@ -57,6 +58,7 @@ const Components = {
5758 Typesense,
5859 ProjectTemplate,
5960 ProjectCreator,
61+ VibeTemplate,
6062}
6163const CustomElements = [
6264 'lite-youtube'
Original file line number Diff line number Diff line change @@ -57,9 +57,9 @@ export default {
5757 </a>
5858 </div>
5959 <div class="mt-6 not-prose flex flex-col items-center gap-3">
60- <span class="text-sm text-muted-foreground font-mono">{{ template }}.react-templates.net</span >
60+ <a :href="liveDemoHref" class="text-sm text-muted-foreground font-mono">{{ liveDemoHref.substring(8) }}</a >
6161 <div class="flex flex-wrap justify-center gap-4">
62- <a :href="'https://' + template + '.react-templates.net' "
62+ <a :href="liveDemoHref "
6363 class="group inline-flex items-center gap-2 px-4 py-2 bg-[#61DAFB] hover:bg-[#4fa8c7] text-gray-900 font-medium rounded-lg shadow-md hover:shadow-lg transition-all duration-300">
6464 <svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
6565 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" />
@@ -96,8 +96,23 @@ export default {
9696 } ,
9797 setup ( props ) {
9898 const command = computed ( ( ) => `npx create-net ${ props . template } MyProject` )
99+
100+ const reactTemplates = [
101+ 'react-static' ,
102+ 'react-spa' ,
103+ 'nextjs' ,
104+ 'next-rsc' ,
105+ 'next-static' ,
106+ ]
107+
108+ const liveDemoHref = computed ( ( ) =>
109+ 'https://' + props . template + ( reactTemplates . includes ( props . template )
110+ ? '.react-templates.net'
111+ : '.web-templates.io' ) )
112+
99113 return {
100- command
114+ command,
115+ liveDemoHref,
101116 }
102117 }
103118}
You can’t perform that action at this time.
0 commit comments