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

Commit 2860f75

Browse files
Merge pull request #54 from chakra-ui/docs/discord-strip
Docs: Discord hero
2 parents aa0a7d1 + ed872a6 commit 2860f75

File tree

7 files changed

+91
-7
lines changed

7 files changed

+91
-7
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"`,

website/src/components/Navbar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
aria-label="Join Discord channel"
7777
target="_blank"
7878
rel="noopener noreferrer"
79-
href="https://github.com/chakra-ui/chakra-ui-vue"
80-
icon="message-circle"
79+
href="https://discord.gg/sq2Kp6x"
80+
icon="discord"
8181
/>
8282
</CBox>
8383
<CBox as="li">
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<template>
2+
<CFlex
3+
as="section"
4+
:flex-dir="['column', 'column', 'column', 'row']"
5+
align="center"
6+
justify="space-between"
7+
font-family="body"
8+
color="white"
9+
bg="discord.accessible"
10+
:h="['auto', 'auto', 'auto', 40]"
11+
:px="[4, 10, 12]"
12+
>
13+
<CFlex
14+
flex-dir="row"
15+
flex="1"
16+
py="10"
17+
:mr="{ base: '0', lg: '10' }"
18+
:w="{ base: '100%', lg: 'auto' }"
19+
>
20+
<CIcon name="discord" size="48px" mr="5" />
21+
<CBox>
22+
<chakra.h2 font-size="md" font-weight="bold" lineHeight="1.2" mb="1">
23+
Connect with the Chakra community
24+
</chakra.h2>
25+
<chakra.p>
26+
Feel free to ask questions, report issues, and meet new people.
27+
</chakra.p>
28+
</CBox>
29+
</CFlex>
30+
<CFlex
31+
flex-dir="row"
32+
:pt="{ base: '0', lg: '10' }"
33+
pb="10"
34+
h="100%"
35+
:w="{ base: '100%', lg: 'auto' }"
36+
align="center"
37+
>
38+
<CButton
39+
as="a"
40+
text-decoration="none"
41+
aria-label="Join Discord channel"
42+
href="https://discord.gg/sq2Kp6x"
43+
target="_blank"
44+
rel="noopener noreferrer"
45+
size="lg"
46+
color="black"
47+
bg="white"
48+
shadow="lg"
49+
:w="{ base: '100%', lg: 'auto' }"
50+
>
51+
Join the #Chakra Discord!
52+
</CButton>
53+
</CFlex>
54+
</CFlex>
55+
</template>
56+
57+
<script lang="ts">
58+
import { defineComponent } from 'vue'
59+
import { CFlex, CBox, CButton, CIcon } from '@chakra-ui/vue-next'
60+
61+
export default defineComponent({
62+
name: 'DiscordHero',
63+
components: {
64+
CFlex,
65+
CBox,
66+
CButton,
67+
CIcon,
68+
},
69+
})
70+
</script>

website/src/components/home/Footer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
aria-label="Join Discord channel"
3131
target="_blank"
3232
rel="noopener noreferrer"
33-
href="https://github.com/chakra-ui/chakra-ui-vue"
33+
href="https://discord.gg/sq2Kp6x"
3434
:_hover="{ color: 'vue.500' }"
3535
mx="4"
3636
>
37-
<CIcon name="message-circle" mt="8px" />
37+
<CIcon name="discord" mt="8px" />
3838
</chakra.a>
3939
</CFlex>
4040
</template>

website/src/components/home/PilersHero.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
py="10"
1616
:px="{ base: '3', sm: '10' }"
1717
>
18-
<CBox m="3">
18+
<CBox my="3" :mx="{ base: '0', sm: '3' }">
1919
<CFlex align-items="center" mb="5">
2020
<CFlex
2121
justify-content="center"
@@ -33,7 +33,7 @@
3333
Chakra UI strictly follows WAI-ARIA standards. All components come with
3434
proper attributes and keyboard interactions out of the box.
3535
</CBox>
36-
<CBox m="3">
36+
<CBox my="3" :mx="{ base: '0', sm: '3' }">
3737
<CFlex align-items="center" mb="5">
3838
<CFlex
3939
justify-content="center"
@@ -51,7 +51,7 @@
5151
Quickly and easily reference values from your theme throughout your
5252
entire application, on any component.
5353
</CBox>
54-
<CBox m="3">
54+
<CBox m="3" :mx="{ base: '0', sm: '3' }">
5555
<CFlex align-items="center" mb="5">
5656
<CFlex
5757
justify-content="center"

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)