Skip to content

Commit

Permalink
Merge pull request #1559 from mermaid-js/promo-updates
Browse files Browse the repository at this point in the history
Remove Product Hunt promos and Update taglines
  • Loading branch information
sidharthv96 authored Oct 22, 2024
2 parents cc963db + 659e82e commit 2fe3df5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 29 deletions.
19 changes: 0 additions & 19 deletions src/lib/components/Navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,6 @@
<span class="text-lg font-bold">
<a href="/">Mermaid<span class="text-xs font-thin">v{version}</span> Live Editor</a>
</span>
<div class="ml-8 flex items-center gap-4">
<a
href="https://www.producthunt.com/posts/mermaid-whiteboard"
target="_blank"
class="decoration font-semibold underline decoration-orange-500 decoration-2 underline-offset-4">
We're live on Product Hunt!
</a>
<span>
<a
href="https://www.producthunt.com/posts/mermaid-whiteboard?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-mermaid&#0045;whiteboard"
target="_blank"
><img
src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=486720&theme=light"
alt="Mermaid&#0032;Whiteboard - Drag&#0032;&#0038;&#0032;Drop&#0032;your&#0032;Nodes&#0032;with&#0032;Mermaid&#0039;s&#0032;new&#0032;Whiteboard&#0033; | Product Hunt"
style="width: 150px; height: 54px;"
width="250"
height="54" /></a>
</span>
</div>
</div>

<label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@
}
const taglines: Taglines[] = [
{
label: 'Explore the Mermaid Whiteboard from the creators of Mermaid',
url: 'https://docs.mermaidchart.com/guides/whiteboard?utm_source=mermaid_live_editor&utm_medium=banner_ad&utm_campaign=whiteboard'
},
{
label: 'Use the Visual Editor in Mermaid Chart to design and build diagrams',
url: 'https://www.mermaidchart.com/landing?utm_source=mermaid_live_editor&utm_medium=banner_ad&utm_campaign=visual_editor'
url: 'https://www.mermaidchart.com/play?utm_source=mermaid_live_editor&utm_medium=banner_ad&utm_campaign=visual_editor'
},
{
label: 'Diagram live with teammates in Mermaid Chart',
url: 'https://www.mermaidchart.com/landing?utm_source=mermaid_live_editor&utm_medium=banner_ad&utm_campaign=teams'
url: 'https://www.mermaidchart.com/play?utm_source=mermaid_live_editor&utm_medium=banner_ad&utm_campaign=teams'
},
{
label: 'Skip the rough draft with Mermaid AI in Mermaid Chart',
url: 'https://www.mermaidchart.com/mermaid-ai?utm_source=mermaid_live_editor&utm_medium=banner_ad&utm_campaign=mermaid_ai'
label: 'Replace ChatGPT Pro, Mermaid.live, and LucidChart with Mermaid Pro',
url: 'https://www.mermaidchart.com/play?utm_source=mermaid_live_editor&utm_medium=banner_ad&utm_campaign=AIbundle'
}
];
Expand All @@ -28,7 +32,7 @@
const interval = setInterval(() => {
index = (index + 1) % taglines.length;
currentTagline = taglines[index];
}, 60_000);
}, 40_000);
onDestroy(() => {
clearInterval(interval);
Expand All @@ -45,7 +49,7 @@
out:fade={{ duration: 1000 }}>
<span class="text-sm tracking-wider">{currentTagline.label}</span>
<button class="rounded bg-[#111113] p-1 px-2 text-sm font-semibold tracking-wide"
>Try it now</button>
>Try now</button>
</a>
{/key}
</div>
8 changes: 4 additions & 4 deletions src/lib/util/promos/promo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { writable, type Writable, get } from 'svelte/store';
import { persist, localStorage } from '../persist';
import August2024 from './August2024.svelte';
import October2024 from './October2024.svelte';
import { env } from '$lib/util/env';

interface Promotion {
Expand All @@ -12,10 +12,10 @@ interface Promotion {

const promotions: Promotion[] = [
{
id: 'promo-2024',
startDate: new Date('2024-08-01'),
id: 'promo-october-2024',
startDate: new Date('2024-10-22'),
endDate: new Date('2024-12-31'),
component: August2024
component: October2024
}
];

Expand Down

0 comments on commit 2fe3df5

Please sign in to comment.