From 60a3e32a94806ba201db19386bd8195ec0eaaaac Mon Sep 17 00:00:00 2001 From: eveeify Date: Thu, 28 Mar 2024 22:30:51 +1100 Subject: [PATCH] feat: iconify icons --- astro.config.ts | 11 ++- package.json | 123 +++++++++++++++-------------- src/assets/svgs/Discord.svg | 1 - src/assets/svgs/Github-white.svg | 1 - src/assets/svgs/Github.svg | 1 - src/components/shared/footer.astro | 52 +++--------- src/env.d.ts | 1 + 7 files changed, 82 insertions(+), 108 deletions(-) delete mode 100644 src/assets/svgs/Discord.svg delete mode 100644 src/assets/svgs/Github-white.svg delete mode 100644 src/assets/svgs/Github.svg diff --git a/astro.config.ts b/astro.config.ts index a828571..e58fff3 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -2,9 +2,10 @@ import mdx from "@astrojs/mdx"; import sitemap from "@astrojs/sitemap"; import metaTags from "astro-meta-tags"; import { defineConfig } from "astro/config"; - import tailwind from "@astrojs/tailwind"; +import icon from "astro-icon"; + // https://astro.build/config export default defineConfig({ site: "https://teaclient.net", @@ -15,7 +16,13 @@ export default defineConfig({ mdx(), metaTags(), sitemap(), - tailwind({ nesting: true, applyBaseStyles: true }), + tailwind({ + nesting: true, + applyBaseStyles: true, + }), + icon({ + iconDir: "src/icons", + }), ], redirects: { "/discord": "https://discord.gg/ejFTe4Hfnc", diff --git a/package.json b/package.json index 6072562..3eaa290 100644 --- a/package.json +++ b/package.json @@ -1,62 +1,65 @@ { - "name": "teaclient-website", - "type": "module", - "version": "0.0.1", - "scripts": { - "dev": "astro dev", - "preview": "astro preview", - "build": "astro build", - "astro": "astro", - "lint": "biome check --apply . && bun lint:css --fix", - "lint:css": "stylelint 'src/styles/**/*.css'", - "fmt": "biome format . --write", - "biome": "bunx @biomejs/biome", - "check": "biome check . && bun lint:css && bun astro check", - "postinstall": "husky install" - }, - "trustedDependencies": ["sharp"], - "stylelint": { - "extends": "stylelint-config-standard", - "plugins": ["stylelint-scss"], - "customSyntax": "postcss-scss", - "rules": { - "at-rule-no-unknown": null, - "selector-class-pattern": null, - "scss/at-rule-no-unknown": true, - "custom-property-pattern": null - } - }, - "commitlint": { - "extends": ["@commitlint/config-conventional"] - }, - "dependencies": { - "@astrojs/mdx": "^2.0.2", - "@astrojs/rss": "^3.0.0", - "@astrojs/sitemap": "^3.1.1", - "@astrojs/tailwind": "^5.1.0", - "@astrojs/ts-plugin": "^1.3.1", - "astro-meta-tags": "^0.2.1", - "astro-seo": "^0.8.0", - "axios": "^1.6.5", - "sass": "^1.71.1", - "sharp": "^0.33.2", - "tailwind-merge": "^2.2.1", - "tailwindcss": "^3.4.1", - "web-vitals": "^3.5.0" - }, - "devDependencies": { - "@astrojs/check": "^0.2.0", - "@biomejs/biome": "^1.5.3", - "@commitlint/cli": "^18.4.3", - "@commitlint/config-conventional": "^18.4.3", - "@types/node": "^20.8.3", - "astro": "^4.2.3", - "husky": "^8.0.3", - "postcss-scss": "^4.0.9", - "stylelint": "^15.11.0", - "stylelint-config-standard": "^34.0.0", - "stylelint-scss": "^6.2.1", - "typescript": "^5.2.2" - }, - "packageManager": "bun@1.0.25" + "name": "teaclient-website", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "preview": "astro preview", + "build": "astro build", + "astro": "astro", + "lint": "biome check --apply . && bun lint:css --fix", + "lint:css": "stylelint 'src/styles/**/*.css'", + "fmt": "biome format . --write", + "biome": "bunx @biomejs/biome", + "check": "biome check . && bun lint:css && bun astro check", + "postinstall": "husky install" + }, + "trustedDependencies": ["sharp"], + "stylelint": { + "extends": "stylelint-config-standard", + "plugins": ["stylelint-scss"], + "customSyntax": "postcss-scss", + "rules": { + "at-rule-no-unknown": null, + "selector-class-pattern": null, + "scss/at-rule-no-unknown": true, + "custom-property-pattern": null + } + }, + "commitlint": { + "extends": ["@commitlint/config-conventional"] + }, + "dependencies": { + "@astrojs/mdx": "^2.2.2", + "@astrojs/rss": "^3.0.0", + "@astrojs/sitemap": "^3.1.1", + "@astrojs/tailwind": "^5.1.0", + "@astrojs/ts-plugin": "^1.3.1", + "@iconify-json/ic": "^1.1.17", + "@iconify-json/mdi": "^1.1.64", + "astro-icon": "^1.1.0", + "astro-meta-tags": "^0.2.1", + "astro-seo": "^0.8.0", + "axios": "^1.6.5", + "sass": "^1.71.1", + "sharp": "^0.33.2", + "tailwind-merge": "^2.2.1", + "tailwindcss": "^3.4.1", + "web-vitals": "^3.5.0" + }, + "devDependencies": { + "@astrojs/check": "^0.2.0", + "@biomejs/biome": "^1.5.3", + "@commitlint/cli": "^18.4.3", + "@commitlint/config-conventional": "^18.4.3", + "@types/node": "^20.8.3", + "astro": "^4.5.10", + "husky": "^8.0.3", + "postcss-scss": "^4.0.9", + "stylelint": "^15.11.0", + "stylelint-config-standard": "^34.0.0", + "stylelint-scss": "^6.2.1", + "typescript": "^5.2.2" + }, + "packageManager": "bun@1.0.25" } diff --git a/src/assets/svgs/Discord.svg b/src/assets/svgs/Discord.svg deleted file mode 100644 index 4cadbc7..0000000 --- a/src/assets/svgs/Discord.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/Github-white.svg b/src/assets/svgs/Github-white.svg deleted file mode 100644 index d5e6491..0000000 --- a/src/assets/svgs/Github-white.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/svgs/Github.svg b/src/assets/svgs/Github.svg deleted file mode 100644 index 37fa923..0000000 --- a/src/assets/svgs/Github.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/shared/footer.astro b/src/components/shared/footer.astro index 6545923..b5084fa 100644 --- a/src/components/shared/footer.astro +++ b/src/components/shared/footer.astro @@ -1,54 +1,20 @@ --- -import { Image } from "astro:assets"; -import DiscordSVG from "@assets/svgs/Discord.svg"; -import GithubSVG from "@assets/svgs/Github-white.svg"; - -const logosizes = 36; +import { Icon } from 'astro-icon/components' +const logosizes = 26 --- - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/src/env.d.ts b/src/env.d.ts index f964fe0..acef35f 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1 +1,2 @@ +/// ///