mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-27 04:06:39 +02:00
chore: update as per PR comment
This commit is contained in:
@@ -22,17 +22,25 @@ const taglines: Taglines[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const index: Ref<number> = ref(0);
|
const index: Ref<number> = ref(0);
|
||||||
|
const isPaused: Ref<boolean> = ref(false);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
index.value = Math.floor(Math.random() * taglines.length);
|
index.value = Math.floor(Math.random() * taglines.length);
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
|
if (isPaused.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
index.value = (index.value + 1) % taglines.length;
|
index.value = (index.value + 1) % taglines.length;
|
||||||
}, 5_000);
|
}, 5_000);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="mb-4 w-full top-bar flex p-2 bg-[#E0095F]">
|
<div
|
||||||
|
class="mb-4 w-full top-bar flex p-2 bg-[#E0095F]"
|
||||||
|
@mouseenter="isPaused = true"
|
||||||
|
@mouseleave="isPaused = false"
|
||||||
|
>
|
||||||
<p class="w-full tracking-wide fade-text text-xl">
|
<p class="w-full tracking-wide fade-text text-xl">
|
||||||
<transition name="fade" mode="out-in">
|
<transition name="fade" mode="out-in">
|
||||||
<a
|
<a
|
||||||
|
Reference in New Issue
Block a user