Skip to content

Commit

Permalink
feat: ship unocss fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 29, 2024
1 parent ac2d73a commit c075b45
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ dist
.nuxt
.env
.idea/
public/assets/fonts
17 changes: 11 additions & 6 deletions app/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,24 @@ const online = useOnline()
<template>
<div>
<Logos mb-6 />
<Suspense>
<ClientOnly>
<ClientOnly>
<Suspense>
<PageView v-if="online" />
<div v-else text-gray:80>
You're offline
</div>
</ClientOnly>
<template #fallback>
<div italic op50>
<span animate-pulse>Loading...</span>
</div>
</template>
</Suspense>
<template #fallback>
<div italic op50>
<span animate-pulse>Loading...</span>
<div op50>
<span animate-pulse>...</span>
</div>
</template>
</Suspense>
</ClientOnly>
<InputEntry />
</div>
</template>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"vue-tsc": "^2.1.10"
},
"resolutions": {
"unplugin": "2.0.0-beta.1",
"vite": "^6.0.1",
"vite-plugin-inspect": "^0.10.1"
}
Expand Down
33 changes: 17 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions uno.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { createLocalFontProcessor } from '@unocss/preset-web-fonts/local'
import {
defineConfig,
presetAttributify,
Expand Down Expand Up @@ -27,6 +28,7 @@ export default defineConfig({
serif: 'DM Serif Display',
mono: 'DM Mono',
},
processors: createLocalFontProcessor(),
}),
],
transformers: [
Expand Down

0 comments on commit c075b45

Please sign in to comment.