feat: Add start pro trial button.

This commit is contained in:
rajat-ht
2025-06-27 17:26:54 +05:30
parent 1f07a781e4
commit 8693be56ee
3 changed files with 14 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ interface EditorColumn {
description: string; description: string;
redirectUrl: string; redirectUrl: string;
highlighted?: boolean; highlighted?: boolean;
proTrialUrl?: string;
features: Feature[]; features: Feature[];
} }
@@ -32,6 +33,8 @@ const editorColumns: EditorColumn[] = [
redirectUrl: redirectUrl:
'https://www.mermaidchart.com/app/sign-up?utm_source=mermaid_js&utm_medium=editor_selection&utm_campaign=mermaid_chart&redirect=%2Fapp%2Fdiagrams%2Fnew', 'https://www.mermaidchart.com/app/sign-up?utm_source=mermaid_js&utm_medium=editor_selection&utm_campaign=mermaid_chart&redirect=%2Fapp%2Fdiagrams%2Fnew',
highlighted: true, highlighted: true,
proTrialUrl:
'https://www.mermaidchart.com/app/sign-up?utm_source=mermaid_js&utm_medium=editor_selection&utm_campaign=mermaid_chart_trial&redirect=%2Fapp%2Fuser%2Fbilling%2Fcheckout',
features: [ features: [
{ iconUrl: '/icons/folder.svg', featureName: 'Storage' }, { iconUrl: '/icons/folder.svg', featureName: 'Storage' },
{ iconUrl: '/icons/terminal.svg', featureName: 'Code editor' }, { iconUrl: '/icons/terminal.svg', featureName: 'Code editor' },
@@ -121,6 +124,14 @@ onUnmounted(() => {
> >
Start free Start free
</a> </a>
<a
v-if="column.proTrialUrl"
:href="column.proTrialUrl"
target="_blank"
class="mb-6 flex h-10 w-full text-white items-center justify-center rounded-xl bg-[#E0095F] hover:shadow-md"
>
Start Pro trial
</a>
<div class="h-px w-full bg-[#bedde3] mb-6"></div> <div class="h-px w-full bg-[#bedde3] mb-6"></div>
<ul class="w-full space-y-2"> <ul class="w-full space-y-2">
<li <li

View File

@@ -1,8 +1,8 @@
import type { MarkdownOptions } from 'vitepress'; import type { MarkdownOptions } from 'vitepress';
import { defineConfig } from 'vitepress'; import { defineConfig } from 'vitepress';
import packageJson from '../../../package.json' assert { type: 'json' }; import packageJson from '../../../package.json' assert { type: 'json' };
import MermaidExample from './mermaid-markdown-all.js';
import { addCanonicalUrls } from './canonical-urls.js'; import { addCanonicalUrls } from './canonical-urls.js';
import MermaidExample from './mermaid-markdown-all.js';
const allMarkdownTransformers: MarkdownOptions = { const allMarkdownTransformers: MarkdownOptions = {
// the shiki theme to highlight code blocks // the shiki theme to highlight code blocks
@@ -122,9 +122,7 @@ function nav() {
}, },
{ {
text: '💻 Open Editor', text: '💻 Open Editor',
link: 'https://mermaid.live/edit', link: '#',
target: '_blank',
rel: 'external',
}, },
]; ];
} }

View File

@@ -23,7 +23,7 @@ export default {
'home-hero-before': () => h(TopBar), 'home-hero-before': () => h(TopBar),
'doc-before': () => h(TopBar), 'doc-before': () => h(TopBar),
'layout-bottom': () => h(Tooltip), 'layout-bottom': () => h(Tooltip),
'home-hero-after': () => h(EditorSelectionModal), 'layout-top': () => h(EditorSelectionModal),
}); });
}, },
enhanceApp({ app, router }: EnhanceAppContext) { enhanceApp({ app, router }: EnhanceAppContext) {