docs: disable blobity for mobile

This commit is contained in:
Braks
2022-04-11 11:30:10 +02:00
parent f011ea61b1
commit f06b224aa9
+20 -18
View File
@@ -8,26 +8,28 @@ const dark = useDark({
selector: 'html',
})
onMounted(() => {
const blobity = new Blobity({
color: dark.value ? '#ffffff' : '#000000',
invert: true,
zIndex: 0,
magnetic: false,
dotColor: '#10b981',
radius: 8,
focusableElementsOffsetX: 2,
focusableElementsOffsetY: 2,
mode: 'bouncy',
})
onBeforeUnmount(() => {
blobity.destroy()
})
})
const breakpoints = useBreakpoints(breakpointsTailwind)
onMounted(() => {
if (!breakpoints.isSmaller('md')) {
const blobity = new Blobity({
color: dark.value ? '#ffffff' : '#000000',
invert: true,
zIndex: 0,
magnetic: false,
dotColor: '#10b981',
radius: 8,
focusableElementsOffsetX: 2,
focusableElementsOffsetY: 2,
mode: 'bouncy',
})
onBeforeUnmount(() => {
blobity.destroy()
})
}
})
const { dimensions, instance, onPaneReady, getNodes, getNode, getEdge, updateEdge, edges } = useVueFlow({
nodes: [
{ id: 'intro', type: 'box', position: { x: 0, y: 0 } },