Skip to content

Commit 5f5b820

Browse files
committed
chore: cleanup landing page:
1 parent ed73980 commit 5f5b820

34 files changed

+5735
-226
lines changed

app.vue

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
<template>
22
<div>
3+
<chakra.div
4+
position="absolute"
5+
z-index="0"
6+
top="0"
7+
left="0"
8+
right="0"
9+
bg="pageBackgroundGradiant"
10+
min-h="100vh"
11+
pointer-events="none"
12+
/>
13+
<NuxtLoadingIndicator :height="5" color="#1aff75" />
314
<NuxtLayout>
415
<NuxtPage />
516
</NuxtLayout>
617
</div>
718
</template>
819

920
<script>
10-
import '@fontsource/ibm-plex-mono'
11-
import '@fontsource/dm-sans'
21+
import '@fontsource/ibm-plex-mono';
22+
import '@fontsource/dm-sans';
1223
</script>

components/SponsorButton.vue renamed to components/SponsorButton.server.vue

+3-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
2-
import { CBox, CIcon } from '@chakra-ui/vue-next'
3-
import siteConfig from '@/config/site-config'
2+
import { CBox, CIcon } from '@chakra-ui/vue-next';
3+
import siteConfig from '@/config/site-config';
44
</script>
55

66
<template>
@@ -12,27 +12,8 @@ import siteConfig from '@/config/site-config'
1212
:href="siteConfig.openCollective.url"
1313
target="_blank"
1414
rel="noopener noreferrer"
15-
bg="transparent"
16-
border-width="1px"
17-
border-color="currentColor"
18-
border-style="solid"
1915
px="1em"
20-
min-h="36px"
21-
border-radius="md"
22-
font-size="sm"
23-
color="currentColor"
24-
outline="0"
25-
transition="all 0.3s"
26-
:_hover="{
27-
bg: 'gray.100',
28-
borderColor: 'gray.300',
29-
}"
30-
:_active="{
31-
borderColor: 'gray.200',
32-
}"
33-
:_focus="{
34-
boxShadow: 'outline',
35-
}"
16+
variant="ghost"
3617
v-bind="$attrs"
3718
>
3819
<CIcon

components/TheNavbar.vue

+26-37
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,35 @@
22
import {
33
chakra,
44
useColorMode,
5-
useColorModeValue,
65
CHStack,
76
CFlex,
87
CIcon,
98
CIconButton,
10-
CLink
11-
} from '@chakra-ui/vue-next'
12-
import { useWindowScroll } from '@vueuse/core'
13-
import { computed, onMounted, ref } from 'vue'
14-
import SponsorButton from './SponsorButton.vue'
15-
// import { SearchButton } from "./AlgoliaSearch.vue"
16-
// import { MobileNavButton } from "./MobileNav.vue"
17-
import VersionSwitcher from './VersionSwitcher'
18-
import siteConfig from '@/config/site-config'
9+
CLink,
10+
useColorModeValue
11+
} from '@chakra-ui/vue-next';
12+
import { useWindowScroll } from '@vueuse/core';
13+
import { computed, onMounted, ref } from 'vue';
14+
import SponsorButton from './SponsorButton.server.vue';
15+
import VersionSwitcher from './VersionSwitcher';
16+
import siteConfig from '@/config/site-config';
1917
20-
const NuxtLink = resolveComponent('nuxt-link')
18+
const NuxtLink = resolveComponent('nuxt-link') as any;
2119
22-
const { toggleColorMode } = useColorMode()
23-
const text = useColorModeValue('dark', 'light')
24-
const switchIcon = useColorModeValue('moon', 'sun')
25-
const bg = useColorModeValue('white', 'gray.800')
20+
const { colorMode, toggleColorMode } = useColorMode();
21+
const headerRef = ref<{ $el: HTMLDivElement } | undefined>(undefined);
2622
27-
const headerRef = ref<{ $el: HTMLDivElement } | undefined>(undefined)
23+
const { y } = useWindowScroll();
2824
29-
const { y } = useWindowScroll()
30-
31-
const height = ref(0)
25+
const height = ref(0);
3226
3327
onMounted(() => {
34-
height.value = headerRef.value?.$el.getBoundingClientRect().height ?? 0
35-
})
28+
height.value = headerRef.value?.$el.getBoundingClientRect().height ?? 0;
29+
});
3630
3731
const headerShadow = computed(() => {
38-
return y.value > height.value ? 'sm' : undefined
39-
})
32+
return y.value > height.value ? 'sm' : undefined;
33+
});
4034
</script>
4135

4236
<template>
@@ -50,10 +44,9 @@ const headerShadow = computed(() => {
5044
left="0"
5145
right="0"
5246
width="full"
53-
:bg="bg"
5447
backdrop-filter="saturate(120%) blur(5px)"
55-
border-top="6px solid"
56-
border-color="emerald.500"
48+
border-bottom="1px solid"
49+
:border-color="useColorModeValue('blackAlpha.600', 'whiteAlpha.300').value"
5750
>
5851
<chakra.nav height="4.5rem" mx="auto" max-w="8xl">
5952
<!-- content -->
@@ -72,13 +65,7 @@ const headerShadow = computed(() => {
7265
</CFlex>
7366

7467
<!-- nav -->
75-
<CFlex
76-
justify="flex-end"
77-
w="100%"
78-
max-w="1100px"
79-
align="center"
80-
color="gray.400"
81-
>
68+
<CFlex justify="flex-end" w="100%" max-w="1100px" align="center">
8269
<!-- <SearchButton></SearchButton> -->
8370
<VersionSwitcher />
8471
<CHStack spacing="5" :display="{ base: 'none', md: 'flex' }">
@@ -128,14 +115,16 @@ const headerShadow = computed(() => {
128115
<CIconButton
129116
size="md"
130117
font-size="lg"
131-
:aria-label="`Switch to ${text} mode`"
132-
:title="`Switch to ${text} mode`"
118+
aria-label="Switch color mode"
133119
variant="ghost"
120+
type="button"
134121
color="current"
135122
:ml="{ base: '0', md: '3' }"
136-
:icon="switchIcon"
137123
@click="toggleColorMode"
138-
/>
124+
>
125+
<IconsMoonIcon v-if="colorMode === 'light'" />
126+
<IconsSunIcon v-else />
127+
</CIconButton>
139128
<SponsorButton ml="5" />
140129
<!-- <mobile-nav-button @click="isOpen = true"></mobile-nav-button> -->
141130
</CFlex>

0 commit comments

Comments
 (0)