Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit bf2de18

Browse files
committed
feat: add discord hero
1 parent f45ddaf commit bf2de18

File tree

4 files changed

+87
-0
lines changed

4 files changed

+87
-0
lines changed

website/src/assets/custom-theme.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export default extendTheme({
1515
800: '#21533B',
1616
900: '#143223',
1717
},
18+
discord: {
19+
primary: '#7289DA',
20+
accessible: '#5570D2',
21+
},
1822
},
1923
fonts: {
2024
heading: `Inter, sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`,
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<template>
2+
<CFlex
3+
as="section"
4+
:flex-dir="['column', 'column', 'row']"
5+
align="center"
6+
justify="space-between"
7+
font-family="body"
8+
color="white"
9+
bg="discord.accessible"
10+
:h="['auto', 40]"
11+
:px="[4, 10, 12]"
12+
>
13+
<CFlex
14+
flex-dir="row"
15+
py="10"
16+
:mr="{ base: '0', sm: '10' }"
17+
:w="{ base: '100%', md: 'auto' }"
18+
>
19+
<CIcon name="discord" size="48px" mr="5" />
20+
<CBox>
21+
<chakra.h2 font-size="md" font-weight="bold" lineHeight="1.2" mb="1">
22+
Connect with the Chakra community
23+
</chakra.h2>
24+
<chakra.p>
25+
Feel free to ask questions, report issues, and meet new people.
26+
</chakra.p>
27+
</CBox>
28+
</CFlex>
29+
<CBox
30+
:w="{ base: 0, md: '10' }"
31+
h="100%"
32+
bg="vue.50"
33+
transform="skewX(20deg)"
34+
/>
35+
<CFlex
36+
flex-dir="row"
37+
py="10"
38+
h="100%"
39+
:w="{ base: '100%', md: 'auto' }"
40+
align="center"
41+
>
42+
<CButton
43+
as="a"
44+
text-decoration="none"
45+
aria-label="Join Discord channel"
46+
href="https://discord.gg/sq2Kp6x"
47+
target="_blank"
48+
rel="noopener noreferrer"
49+
size="lg"
50+
color="black"
51+
bg="white"
52+
shadow="lg"
53+
>
54+
Join the #Chakra Discord!
55+
</CButton>
56+
</CFlex>
57+
</CFlex>
58+
</template>
59+
60+
<script lang="ts">
61+
import { defineComponent } from 'vue'
62+
import { CFlex, CBox, CButton, CIcon } from '@chakra-ui/vue-next'
63+
64+
export default defineComponent({
65+
name: 'DiscordHero',
66+
components: {
67+
CFlex,
68+
CBox,
69+
CButton,
70+
CIcon,
71+
},
72+
})
73+
</script>

website/src/main.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ export const createApp = ViteSSG(App, { routes }, ({ app, isClient }) => {
3838
feStar,
3939
feTwitter,
4040
},
41+
extend: {
42+
discord: {
43+
path:
44+
'<path fill="currentColor" d="M297.216 243.2c0 15.616-11.52 28.416-26.112 28.416-14.336 0-26.112-12.8-26.112-28.416s11.52-28.416 26.112-28.416c14.592 0 26.112 12.8 26.112 28.416zm-119.552-28.416c-14.592 0-26.112 12.8-26.112 28.416s11.776 28.416 26.112 28.416c14.592 0 26.112-12.8 26.112-28.416.256-15.616-11.52-28.416-26.112-28.416zM448 52.736V512c-64.494-56.994-43.868-38.128-118.784-107.776l13.568 47.36H52.48C23.552 451.584 0 428.032 0 398.848V52.736C0 23.552 23.552 0 52.48 0h343.04C424.448 0 448 23.552 448 52.736zm-72.96 242.688c0-82.432-36.864-149.248-36.864-149.248-36.864-27.648-71.936-26.88-71.936-26.88l-3.584 4.096c43.52 13.312 63.744 32.512 63.744 32.512-60.811-33.329-132.244-33.335-191.232-7.424-9.472 4.352-15.104 7.424-15.104 7.424s21.248-20.224 67.328-33.536l-2.56-3.072s-35.072-.768-71.936 26.88c0 0-36.864 66.816-36.864 149.248 0 0 21.504 37.12 78.08 38.912 0 0 9.472-11.52 17.152-21.248-32.512-9.728-44.8-30.208-44.8-30.208 3.766 2.636 9.976 6.053 10.496 6.4 43.21 24.198 104.588 32.126 159.744 8.96 8.96-3.328 18.944-8.192 29.44-15.104 0 0-12.8 20.992-46.336 30.464 7.68 9.728 16.896 20.736 16.896 20.736 56.576-1.792 78.336-38.912 78.336-38.912z" fa-key="3" fill="currentColor"></path>',
45+
viewBox: '0 0 496 512',
46+
},
47+
},
4148
},
4249
})
4350

website/src/pages/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<Hero />
1010
<SandboxExample />
1111
<PilersHero />
12+
<DiscordHero />
1213
<Footer />
1314
</chakra.main>
1415
</template>
@@ -20,6 +21,7 @@ import PilersHero from '../components/home/PilersHero.vue'
2021
import Navbar from '../components/Navbar.vue'
2122
import Footer from '../components/home/Footer.vue'
2223
import SandboxExample from '../components/SandboxExample.vue'
24+
import DiscordHero from '../components/home/DiscordHero.vue'
2325
2426
export default defineComponent({
2527
name: 'Index',
@@ -29,6 +31,7 @@ export default defineComponent({
2931
Navbar,
3032
Footer,
3133
SandboxExample,
34+
DiscordHero,
3235
},
3336
})
3437
</script>

0 commit comments

Comments
 (0)