Skip to content

Commit

Permalink
fix(talk): show gradient cursor logic
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv committed Apr 15, 2024
1 parent 0b1c729 commit ed97f46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion talk/global-bottom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const blur = computed(() => 140 * +(formatter.value.growSize || 1) * scaleFactor
const followMouse = computed(() => formatter.value.growFollow || pressed.value)
const left = computed(() => (followMouse.value ? mouseX.value : formatter.value.growX ?? '80'))
const top = computed(() => (followMouse.value ? mouseY.value : formatter.value.growY ?? '30'))
const showCursor = computed(() => formatter.value.gradCursor ?? true)
const transitionClass = ref('')
function updateClass() {
Expand All @@ -74,7 +75,7 @@ watchEffect(() => {
<template>
<span
absolute pointer-events-none rounded-full z-100 mix-blend-plus-lighter bg-gradient-to-r shape="[-45deg]"
from="$vp-c-brand" to="#009ff7" :class="[transitionClass, currentSlideRoute.path !== '1' ? 'op75 dark:op50' : '!op-0']"
from="$vp-c-brand" to="#009ff7" :class="[transitionClass, showCursor ? 'op75 dark:op50' : '!op-0']"
:style="{
top: `${top}%`,
left: `${left}%`,
Expand Down

0 comments on commit ed97f46

Please sign in to comment.