Skip to content

Commit

Permalink
chore: fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
itsacoyote committed Apr 26, 2024
1 parent 0ff3204 commit 02a0b37
Show file tree
Hide file tree
Showing 15 changed files with 1,833 additions and 112 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
}
}
],
"vue/singleline-html-element-content-newline": "off"
"vue/singleline-html-element-content-newline": "off",
"vue/html-self-closing": "off"
}
}
20 changes: 10 additions & 10 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
- name: Runs Prettier Formatter
run: bun run lint:prettier

spelling:
name: spelling
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install Dependencies
run: bun install
- name: Runs cSpell Spell Checker
run: bun run lint:spelling
# spelling:
# name: spelling
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: oven-sh/setup-bun@v1
# - name: Install Dependencies
# run: bun install
# - name: Runs cSpell Spell Checker
# run: bun run lint:spelling

markdown-lint:
name: markdown_lint
Expand Down
27 changes: 15 additions & 12 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup lang="ts">
import type { ParsedContent } from '@nuxt/content/dist/runtime/types'
import type { ParsedContent } from '@nuxt/content/dist/runtime/types';
const { seo } = useAppConfig()
const { seo } = useAppConfig();
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation());
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false
})
server: false,
});
useHead({
meta: [
Expand All @@ -28,7 +28,7 @@ useHead({
htmlAttrs: {
lang: 'en',
},
})
});
useSeoMeta({
titleTemplate: `%s - ${seo?.siteName}`,
Expand All @@ -42,29 +42,32 @@ useSeoMeta({
twitterSite: '@zksync',
twitterCreator: '@the_matter_labs',
twitterImageAlt: 'zkSync — Accelerating the mass adoption of crypto for personal sovereignty.',
})
});
defineOgImage({component: 'OgImageDocs'})
defineOgImage({ component: 'OgImageDocs' });
provide('navigation', navigation)
provide('navigation', navigation);
</script>

<template>
<div>
<NuxtLoadingIndicator />

<Header />
<AppHeader />

<UMain>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</UMain>

<Footer />
<AppFooter />

<ClientOnly>
<LazyUContentSearch :files="files" :navigation="navigation" />
<LazyUContentSearch
:files="files"
:navigation="navigation"
/>
</ClientOnly>

<UNotifications />
Expand Down
2 changes: 1 addition & 1 deletion components/Footer.vue → components/AppFooter.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
const { footer } = useAppConfig()
const { footer } = useAppConfig();
</script>

<template>
Expand Down
24 changes: 18 additions & 6 deletions components/Header.vue → components/AppHeader.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup lang="ts">
import type { NavItem } from '@nuxt/content/dist/runtime/types'
import type { NavItem } from '@nuxt/content/dist/runtime/types';
const navigation = inject<NavItem[]>('navigation', [])
const navigation = inject<NavItem[]>('navigation', []);
const { header } = useAppConfig()
const { header } = useAppConfig();
</script>

<template>
Expand All @@ -13,16 +13,28 @@ const { header } = useAppConfig()
<UColorModeImage v-bind="{ class: 'h-6 w-auto', ...header?.logo }" />
</template>
<template v-else>
Nuxt UI Pro <UBadge label="Docs" variant="subtle" class="mb-0.5" />
Nuxt UI Pro
<UBadge
label="Docs"
variant="subtle"
class="mb-0.5"
/>
</template>
</template>

<template v-if="header?.search" #center>
<template
v-if="header?.search"
#center
>
<UContentSearchButton class="hidden lg:flex" />
</template>

<template #right>
<UContentSearchButton v-if="header?.search" :label="null" class="lg:hidden" />
<UContentSearchButton
v-if="header?.search"
:label="null"
class="lg:hidden"
/>

<UColorModeButton v-if="header?.colorMode" />

Expand Down
1,695 changes: 1,686 additions & 9 deletions components/OgImage/OgImageDocs.vue

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion components/content/ImgPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
>
<defs>
<linearGradient
id="ffflux-gradient"
gradientTransform="rotate(327, 0.5, 0.5)"
x1="50%"
y1="0%"
x2="50%"
y2="100%"
id="ffflux-gradient"
>
<stop
stop-color="hsl(39, 93%, 53%)"
Expand Down
3 changes: 3 additions & 0 deletions cspell-config/cspell-misc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Nuxt
nuxt
nuxthq
7 changes: 5 additions & 2 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,18 @@
"swift",
"typescript",
"dict-zksync",
"dict-blockchain",
"dict-dev",
"dict-misc"
],
"dictionaryDefinitions": [
{
"name": "dict-zksync",
"addWords": true,
"path": "./cspell-config/cspell-zksync.txt"
},
{
"name": "dict-misc",
"addWords": true,
"path": "./cspell-config/cspell-misc.txt"
}
],
"allowCompoundWords": true,
Expand Down
31 changes: 17 additions & 14 deletions error.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<script setup lang="ts">
import type { NuxtError } from '#app'
import type { ParsedContent } from '@nuxt/content/dist/runtime/types'
import type { NuxtError } from '#app';
import type { ParsedContent } from '@nuxt/content/dist/runtime/types';
useSeoMeta({
title: 'Page not found',
description: 'We are sorry but this page could not be found.'
})
description: 'We are sorry but this page could not be found.',
});
defineProps({
error: {
type: Object as PropType<NuxtError>,
required: true
}
})
required: true,
},
});
useHead({
htmlAttrs: {
lang: 'en'
}
})
lang: 'en',
},
});
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation());
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false,
})
});
provide('navigation', navigation)
provide('navigation', navigation);
</script>

<template>
Expand All @@ -44,7 +44,10 @@ provide('navigation', navigation)
<Footer />

<ClientOnly>
<LazyUContentSearch :files="files" :navigation="navigation" />
<LazyUContentSearch
:files="files"
:navigation="navigation"
/>
</ClientOnly>

<UNotifications />
Expand Down
6 changes: 1 addition & 5 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"hosting": {
"public": ".output/public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}
}
Loading

0 comments on commit 02a0b37

Please sign in to comment.