Skip to content

Commit

Permalink
new icons
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Jan 19, 2024
1 parent fb3ed6c commit 2a55363
Show file tree
Hide file tree
Showing 6 changed files with 1,115 additions and 1,007 deletions.
3 changes: 2 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineConfig } from 'astro/config'
import svelte from '@astrojs/svelte'
import icon from 'astro-icon'
import yaml from '@rollup/plugin-yaml'
import AstroPWA from '@vite-pwa/astro'
import rehypeExternalLinks from 'rehype-external-links'
Expand All @@ -10,7 +11,7 @@ const SITE = 'https://vmail.leopard.in.ua/'
export default defineConfig({
site: SITE,
base: '/',
integrations: [svelte(), AstroPWA({
integrations: [icon(), svelte(), AstroPWA({
injectRegister: null,
strategies: 'injectManifest',
registerType: 'prompt',
Expand Down
42 changes: 22 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
"format": "pnpify run prettier --plugin prettier-plugin-svelte --write src"
},
"dependencies": {
"@astrojs/svelte": "^5.0.1",
"@codemirror/commands": "^6.3.2",
"@astrojs/svelte": "^5.0.3",
"@codemirror/commands": "^6.3.3",
"@codemirror/lang-html": "6.4.7",
"@codemirror/language": "6.9.3",
"@codemirror/state": "6.3.3",
"@codemirror/view": "^6.22.3",
"@hotwired/turbo": "8.0.0-beta.1",
"@lezer/common": "^1.1.2",
"@codemirror/language": "6.10.0",
"@codemirror/state": "6.4.0",
"@codemirror/view": "^6.23.0",
"@hotwired/turbo": "8.0.0-beta.2",
"@lezer/common": "^1.2.1",
"@lezer/highlight": "^1.2.0",
"@rollup/plugin-yaml": "^4.1.2",
"@vite-pwa/astro": "^0.2.0",
"astro": "^4.0.5",
"astro-icon": "0.8.2",
"astro": "^4.2.1",
"astro-icon": "1.0.2",
"comlink": "^4.4.1",
"lodash": "4.17.21",
"normalize.css": "8.0.1",
"postcss": "8.4.32",
"postcss-import": "15.1.0",
"postcss": "8.4.33",
"postcss-import": "16.0.0",
"postcss-load-config": "^5.0.2",
"postcss-loader": "7.3.3",
"postcss-loader": "8.0.0",
"postcss-preset-env": "9.3.0",
"postcss-reporter": "7.0.5",
"postcss-reporter": "7.1.0",
"rehype-external-links": "^3.0.0",
"svelte": "4.2.8",
"vite": "^5.0.9",
"svelte": "4.2.9",
"vite": "^5.0.12",
"vite-plugin-pwa": "^0.17.4",
"workbox-background-sync": "^7.0.0",
"workbox-core": "^7.0.0",
Expand All @@ -52,13 +52,15 @@
"workbox-window": "7.0.0"
},
"devDependencies": {
"@iconify-json/mdi": "^1.1.64",
"@yarnpkg/pnpify": "^4.0.1",
"astro-eslint-parser": "^0.16.0",
"eslint": "8.55.0",
"eslint-plugin-astro": "^0.30.0",
"astro-eslint-parser": "^0.16.2",
"eslint": "8.56.0",
"eslint-plugin-astro": "^0.31.3",
"eslint-plugin-svelte3": "^4.0.0",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2"
"prettier": "^3.2.4",
"prettier-plugin-svelte": "^3.1.2",
"shikiji-core": "^0.10.0-beta.9"
},
"packageManager": "yarn@4.0.2"
}
4 changes: 2 additions & 2 deletions src/components/SvgIcon.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { Sprite } from 'astro-icon'
import { Icon } from 'astro-icon/components'
const { name, class: className, size = '1rem' } = Astro.props
---
<style define:vars={{ size }}>
Expand All @@ -21,5 +21,5 @@ const { name, class: className, size = '1rem' } = Astro.props
</style>

<div class:list={['svg-icon', className]}>
<Sprite pack="mdi" name={name} class="svg-icon-cnt" />
<Icon name={`mdi:${name}`} class="svg-icon-cnt" />
</div>
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />
11 changes: 4 additions & 7 deletions src/layouts/app.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
import { pwaInfo } from 'virtual:pwa-info'
import { Sprite } from 'astro-icon'
import Head from '@components/Head.astro'
import HeadAnalytic from '@components/HeadAnalytic.astro'
import DomInit from '@components/DomInit.astro'
Expand All @@ -19,11 +18,9 @@ const { title } = Astro.props
<HeadAnalytic />
</head>
<body>
<Sprite.Provider>
<DomInit />
<Hotwire />
<ServiceWorker />
<slot />
</Sprite.Provider>
<DomInit />
<Hotwire />
<ServiceWorker />
<slot />
</body>
</html>
Loading

0 comments on commit 2a55363

Please sign in to comment.