diff --git a/.gitignore b/.gitignore index 2a6bc63a5c..54d5aaea29 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ interactive/public/shiki .svelte-kit .eslintcache vite.config.ts.timestamp-* +unocss-fonts/ diff --git a/examples/astro/src/layouts/main.astro b/examples/astro/src/layouts/main.astro index 63bee5d252..77efcda7c5 100644 --- a/examples/astro/src/layouts/main.astro +++ b/examples/astro/src/layouts/main.astro @@ -8,8 +8,9 @@ const { content } = Astro.props; {content.title} + - + diff --git a/examples/astro/src/pages/index.astro b/examples/astro/src/pages/index.astro index ccced8b8af..a6afb5aa05 100644 --- a/examples/astro/src/pages/index.astro +++ b/examples/astro/src/pages/index.astro @@ -13,9 +13,10 @@ import Button from '../components/Button.astro'; Astro + UnoCSS + - +
Markdown is also supported... diff --git a/examples/astro/uno.config.ts b/examples/astro/uno.config.ts index d608841f52..fc6cfdc0ae 100644 --- a/examples/astro/uno.config.ts +++ b/examples/astro/uno.config.ts @@ -2,10 +2,16 @@ import { defineConfig, presetIcons, presetUno, + presetWebFonts, transformerDirectives, } from 'unocss' export default defineConfig({ + theme: { + fontFamily: { + sans: 'sans-serif', + }, + }, shortcuts: [ { 'i-logo': 'i-logos-astro w-6em h-6em transform transition-800' }, ], @@ -20,5 +26,13 @@ export default defineConfig({ 'vertical-align': 'middle', }, }), + presetWebFonts({ + downloadLocally: true, + provider: 'google', + fonts: { + sans: 'Lato', + serif: 'Merriweather', + }, + }), ], }) diff --git a/examples/nuxt3/app.vue b/examples/nuxt3/app.vue index 68e1755a57..1bf638cb11 100644 --- a/examples/nuxt3/app.vue +++ b/examples/nuxt3/app.vue @@ -1,5 +1,5 @@