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

Commit f45ddaf

Browse files
Merge pull request #47 from chakra-ui/docs/add-logo-to-navbar
feat: add chakra logo to navbar
2 parents 71cae21 + 958780b commit f45ddaf

File tree

2 files changed

+66
-2
lines changed

2 files changed

+66
-2
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<template>
2+
<svg
3+
width="100%"
4+
height="100%"
5+
viewBox="0 0 181 181"
6+
xmlns="http://www.w3.org/2000/svg"
7+
style="
8+
fill-rule: evenodd;
9+
clip-rule: evenodd;
10+
stroke-linejoin: round;
11+
stroke-miterlimit: 2;
12+
"
13+
>
14+
<path
15+
d="M90.354,0.171c-49.372,0 -90,40.628 -90,90c0,49.373 40.628,90 90,90c49.373,0 90,-40.627 90,-90c0,-49.372 -40.627,-90 -90,-90Zm-28.2,144.167l24.417,-45l-28.209,0.541l54.684,-63.825l-23.625,46.617l33.208,-1.542l-60.475,63.209Z"
16+
style="fill: url(#_Linear1)"
17+
/>
18+
<defs>
19+
<linearGradient
20+
id="_Linear1"
21+
x1="0"
22+
y1="0"
23+
x2="1"
24+
y2="0"
25+
gradientUnits="userSpaceOnUse"
26+
gradientTransform="matrix(180,-0.741309,0.741309,180,0.354053,90.2243)"
27+
>
28+
<stop offset="0" style="stop-color: #41b883; stop-opacity: 1" />
29+
<stop offset="1" style="stop-color: #78ffbe; stop-opacity: 1" />
30+
</linearGradient>
31+
</defs>
32+
</svg>
33+
</template>
34+
35+
<script lang="ts">
36+
import { defineComponent } from 'vue'
37+
38+
export default defineComponent({
39+
name: 'ChakraUILogoIcon',
40+
})
41+
</script>

website/src/components/Navbar.vue

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<chakra.nav
33
h="60px"
44
w="100%"
5-
px="4"
5+
:px="[4, 10, 12]"
66
d="flex"
77
position="fixed"
88
align-items="center"
@@ -12,7 +12,28 @@
1212
border-top="6px solid"
1313
border-color="vue.500"
1414
>
15-
<CFlex align-items="center" :flex="{ base: 0, sm: 1 }" />
15+
<CFlex align-items="center" justify-content="flex-start" flex="1">
16+
<chakra.a
17+
aria-current="page"
18+
aria-label="Chakra UI Vue, Back to homepage"
19+
href="/"
20+
h="auto"
21+
d="flex"
22+
flex-direction="row"
23+
align-items="center"
24+
>
25+
<CBox w="45px" mr="2"><ChakraUILogoIcon /></CBox>
26+
<chakra.h1
27+
font-size="2xl"
28+
font-family="heading"
29+
letter-spacing="tighter"
30+
mt="8px"
31+
:d="{ base: 'none', md: 'block' }"
32+
>
33+
Chakra Chidori
34+
</chakra.h1>
35+
</chakra.a>
36+
</CFlex>
1637
<CFlex flex="1" justify-content="center">
1738
<CIcon name="search" mt="8px" />
1839
</CFlex>
@@ -78,6 +99,7 @@
7899
<script lang="ts">
79100
import { defineComponent } from 'vue'
80101
import { CBox, CFlex, CIconButton, CIcon } from '@chakra-ui/vue-next'
102+
import ChakraUILogoIcon from './ChakraLogoIcon.vue'
81103
82104
export default defineComponent({
83105
name: 'Navbar',
@@ -86,6 +108,7 @@ export default defineComponent({
86108
CFlex,
87109
CIconButton,
88110
CIcon,
111+
ChakraUILogoIcon,
89112
},
90113
})
91114
</script>

0 commit comments

Comments
 (0)