Skip to content

Commit 7b28769

Browse files
committed
feat: add dark/light discord iframe
1 parent 319f438 commit 7b28769

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

components/midori/community.vue

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1+
<script setup lang="ts">
2+
import useDark from './use-dark'
3+
4+
const isDark = useDark()
5+
</script>
6+
17
<template>
28
<article
3-
class="flex justify-between flex-col lg:flex-row-reverse items-center w-full max-w-6xl mx-auto my-8 gap-12"
4-
>
9+
class="flex justify-between flex-col lg:flex-row-reverse items-center w-full max-w-6xl mx-auto my-8 gap-12">
510
<section class="flex flex-col w-full max-w-lg">
611
<header class="flex flex-col justify-center items-start">
7-
<h2
8-
class="text-2xl md:text-3xl leading-tight font-medium text-gray-400 mb-2"
9-
>
12+
<h2 class="text-2xl md:text-3xl leading-tight font-medium text-gray-400 mb-2">
1013
Can't find what you're looking for?
1114
</h2>
1215
<h2
13-
class="text-5xl leading-tight font-semibold text-gray-400 mb-4 bg-clip-text text-transparent bg-gradient-to-tl from-fuchsia-500 to-blue-500"
14-
>
16+
class="text-5xl leading-tight font-semibold text-gray-400 mb-4 bg-clip-text text-transparent bg-gradient-to-tl from-fuchsia-500 to-blue-500">
1517
Join the community
1618
</h2>
1719
</header>
@@ -23,13 +25,10 @@
2325
</p>
2426
</section>
2527
<section class="flex flex-col w-full max-w-xl rounded-lg overflow-hidden">
26-
<iframe
27-
class="w-full h-64"
28-
src="https://discord.com/widget?id=1044804142461362206&theme=dark"
29-
allowtransparency="true"
30-
frameborder="0"
31-
sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
32-
/>
28+
<iframe class="w-full h-64"
29+
:src="'https://discord.com/widget?id=1044804142461362206&theme=' + (isDark ? 'dark' : 'light')"
30+
allowtransparency="true" frameborder="0"
31+
sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts" />
3332
</section>
3433
</article>
3534
</template>

0 commit comments

Comments
 (0)