@@ -6,122 +6,38 @@ interface Taglines {
6
6
url: string ;
7
7
}
8
8
9
- const allTaglines: { [key : string ]: { design: number ; taglines: Taglines [] } } = {
10
- A: {
11
- design: 1 ,
12
- taglines: [
13
- {
14
- label: ' Replace ChatGPT Pro, Mermaid.live, and Lucid Chart with Mermaid Chart' ,
15
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=AIbundle_A' ,
16
- },
17
- {
18
- label: ' Diagram live with teammates in Mermaid Chart' ,
19
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=teams_A' ,
20
- },
21
- {
22
- label: ' Use the Visual Editor in Mermaid Chart to design and build diagrams' ,
23
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=visual_editor_A' ,
24
- },
25
- {
26
- label: ' Explore the Mermaid Whiteboard from the creators of Mermaid' ,
27
- url: ' https://www.mermaidchart.com/whiteboard?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=whiteboard_A' ,
28
- },
29
- ],
9
+ const taglines: Taglines [] = [
10
+ {
11
+ label: ' Replace ChatGPT Pro, Mermaid.live, and Lucid Chart with Mermaid Chart' ,
12
+ url: ' https://www.mermaidchart.com/mermaid-ai?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=aibundle' ,
30
13
},
31
- B: {
32
- design: 2 ,
33
- taglines: [
34
- {
35
- label: ' Replace ChatGPT Pro, Mermaid.live, and Lucid Chart with Mermaid Chart' ,
36
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=AIbundle_B' ,
37
- },
38
- {
39
- label: ' Diagram live with teammates in Mermaid Chart' ,
40
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=teams_B' ,
41
- },
42
- {
43
- label: ' Use the Visual Editor in Mermaid Chart to design and build diagrams' ,
44
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=visual_editor_B' ,
45
- },
46
- {
47
- label: ' Explore the Mermaid Whiteboard from the creators of Mermaid' ,
48
- url: ' https://www.mermaidchart.com/whiteboard?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=whiteboard_B' ,
49
- },
50
- ],
14
+ {
15
+ label: ' Diagram live with teammates in Mermaid Chart' ,
16
+ url: ' https://www.mermaidchart.com/landing?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=team_collaboration' ,
51
17
},
52
- C: {
53
- design: 1 ,
54
- taglines: [
55
- {
56
- label: ' Replace ChatGPT Pro, Mermaid.live, and Lucid Chart with Mermaid Pro' ,
57
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=AIbundle_C' ,
58
- },
59
- {
60
- label: ' Diagram live with teammates in Mermaid Pro' ,
61
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=teams_C' ,
62
- },
63
- {
64
- label: ' Use the Visual Editor in Mermaid Pro to design and build diagrams' ,
65
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=visual_editor_C' ,
66
- },
67
- {
68
- label: ' Explore the Mermaid Whiteboard from the creators of Mermaid' ,
69
- url: ' https://www.mermaidchart.com/whiteboard?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=whiteboard_A' ,
70
- },
71
- ],
18
+ {
19
+ label: ' Use the Visual Editor in Mermaid Chart to design and build diagrams' ,
20
+ url: ' https://www.mermaidchart.com/landing?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=visual_editor' ,
72
21
},
73
- D: {
74
- design: 2 ,
75
- taglines: [
76
- {
77
- label: ' Replace ChatGPT Pro, Mermaid.live, and Lucid Chart with Mermaid Pro' ,
78
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=AIbundle_D' ,
79
- },
80
- {
81
- label: ' Diagram live with teammates in Mermaid Pro' ,
82
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=teams_D' ,
83
- },
84
- {
85
- label: ' Use the Visual Editor in Mermaid Pro to design and build diagrams' ,
86
- url: ' https://www.mermaidchart.com/play?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=visual_editor_D' ,
87
- },
88
- {
89
- label: ' Explore the Mermaid Whiteboard from the creators of Mermaid' ,
90
- url: ' https://www.mermaidchart.com/whiteboard?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=whiteboard_B' ,
91
- },
92
- ],
22
+ {
23
+ label: ' Explore the Mermaid Whiteboard from the creators of Mermaid' ,
24
+ url: ' https://www.mermaidchart.com/whiteboard?utm_source=mermaid_js&utm_medium=banner_ad&utm_campaign=whiteboard' ,
93
25
},
94
- };
95
-
96
- // Initialize with default values
97
- const design: Ref <number > = ref (1 );
98
- const taglines: Ref <Taglines []> = ref ([]);
99
- const index: Ref <number > = ref (0 );
26
+ ];
100
27
28
+ let index = ref (Math .floor (Math .random () * taglines .length ));
101
29
onMounted (() => {
102
- // Select a random variant on client side
103
- const variant =
104
- Object .values (allTaglines )[Math .floor (Math .random () * Object .values (allTaglines ).length )];
105
- design .value = variant .design ;
106
- taglines .value = variant .taglines ;
107
- index .value = Math .floor (Math .random () * taglines .value .length );
108
-
109
- // Set up the interval for cycling through taglines
110
30
setInterval (() => {
111
- index .value = (index .value + 1 ) % taglines .value . length ;
31
+ index .value = (index .value + 1 ) % taglines .length ;
112
32
}, 5_000 );
113
33
});
114
34
</script >
115
35
116
36
<template >
117
- <div
118
- :class =" [design === 1 ? 'bg-gradient-to-r from-[#bd34fe] to-[#ff3670] ' : 'bg-[#E0095F]']"
119
- class =" mb-4 w-full top-bar flex p-2"
120
- >
37
+ <div class =" mb-4 w-full top-bar flex p-2 bg-[#E0095F]" >
121
38
<p class =" w-full tracking-wide fade-text text-sm" >
122
39
<transition name =" fade" mode =" out-in" >
123
40
<a
124
- v-if =" taglines.length > 0 && taglines[index]"
125
41
:key =" index"
126
42
:href =" taglines[index].url"
127
43
target =" _blank"
0 commit comments