Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
Update to astro-icon v1
Browse files Browse the repository at this point in the history
  • Loading branch information
koyuawsmbrtn committed Jan 3, 2024
1 parent 144e322 commit 2fa424b
Show file tree
Hide file tree
Showing 9 changed files with 541 additions and 330 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# astro
.astro

# environment variables
.env
Expand Down
11 changes: 10 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import { defineConfig } from 'astro/config';
import mdx from "@astrojs/mdx";
import icon from "astro-icon";

// https://astro.build/config
export default defineConfig({
site: 'https://web.koyu.space',
integrations: [mdx()],
integrations: [
mdx(),
icon({
include: {
"simple-icons": ["*"],
"fa-solid": ["envelope"]
}
})
],
prefetch: {
prefetchAll: true
}
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@
"prepare": "husky install"
},
"devDependencies": {
"astro": "^4.0.7"
"astro": "^4.0.9"
},
"dependencies": {
"@astrojs/mdx": "^2.0.2",
"@astrojs/mdx": "^2.0.3",
"@astrojs/rss": "^4.0.1",
"astro-icon": "^0.8.2",
"@iconify-json/fa-solid": "^1.1.8",
"@iconify-json/ph": "^1.1.9",
"@iconify-json/simple-icons": "^1.1.86",
"astro-icon": "^1.0.2",
"astro-seo": "^0.8.0",
"husky-init": "^8.0.0",
"jquery": "^3.7.1",
"request": "^2.88.2",
"sanitize-html": "^2.11.0",
"sass": "^1.69.5",
"sass": "^1.69.7",
"twemoji": "^14.0.2"
}
}
2 changes: 1 addition & 1 deletion src/components/snow.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { Icon } from 'astro-icon';
import { Icon } from 'astro-icon/components';
---

<div id="snowbutton" transition:persist>
Expand Down
4 changes: 2 additions & 2 deletions src/components/social.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
import { Icon } from 'astro-icon';
import { Icon } from 'astro-icon/components';
import social from "../json/social.json";
---

<div id="socialbuttons">
{social.map((e) => (
<a href={e.url} class="social" target="_blank" rel="noopener me"><Icon pack={e.icon.style} name={e.icon.name} /></a>
<a href={e.url} class="social" target="_blank" rel="noopener me"><Icon name={e.icon.style + ":" + e.icon.name} /></a>
))}
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/components/warning.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
import Icon from "astro-icon";
import { Icon } from "astro-icon/components";
---

<br>
<div class="warning">
<Icon name="ph:warning-fill" />
<slot />
</div>
<br>
<br>
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" />
3 changes: 2 additions & 1 deletion src/scss/social.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.social > svg {
height: 24pt;
width: 24pt;
padding: 4px;
}

#socialbuttons {
text-align: center;
}
}
Loading

0 comments on commit 2fa424b

Please sign in to comment.