-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e5d6b3
commit cc8616c
Showing
32 changed files
with
5,784 additions
and
5,979 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
|
||
import { defineConfig } from 'astro/config'; | ||
import icon from 'astro-icon'; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({}); | ||
export default defineConfig({ | ||
integrations: [ | ||
icon({ | ||
include: { | ||
ic: ['*'], | ||
fe: ['*'], | ||
ri: ['*'], | ||
bi: ['*'], | ||
} | ||
}) | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="astro/client" /> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,63 @@ | ||
--- | ||
import { Icon } from 'astro-icon'; | ||
import { Icon } from "astro-icon/components"; | ||
const icon = "adjustment"; | ||
--- | ||
|
||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" type="image/x-icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<title>Astro Icon</title> | ||
<style lang="css"> | ||
[astro-icon] { | ||
color: blue; | ||
} | ||
[astro-icon="annotation"] { | ||
color: red; | ||
} | ||
[astro-icon="folder"] { | ||
color: green; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<h1>Welcome to Astro Icon!</h1> | ||
|
||
<p>The <code>Icon</code> component will optimize and inline any SVG file inside of <code>src/icons/</code></p> | ||
|
||
<p>Alternatively, see <a href="/sprite">the Sprite method</a>.</p> | ||
|
||
<article> | ||
<h2>Local</h2> | ||
<!-- This will inline your SVG directly --> | ||
<Icon size={24} name="adjustment" /> | ||
<Icon size={24} name="annotation" /> | ||
</article> | ||
|
||
<article> | ||
<h2>Custom remote source</h2> | ||
<!-- Pull your icon from a custom remote source --> | ||
<Icon size={24} pack="radix" name="github-logo" /> | ||
</article> | ||
|
||
<article> | ||
<h2>Custom SVG resolver</h2> | ||
<!-- Pull your icon from a custom remote source --> | ||
<Icon size={24} pack="custom" name="circle" /> | ||
</article> | ||
|
||
<article> | ||
<h2>Local dependencies</h2> | ||
<!-- Pull your icon from a local dependency --> | ||
<Icon size={24} pack="heroicons" name="arrow-sm-up" /> | ||
<Icon size={24} pack="heroicons" name="arrow-sm-right" /> | ||
<Icon size={24} pack="heroicons" name="arrow-sm-down" /> | ||
<Icon size={24} pack="heroicons" name="arrow-sm-left" /> | ||
</article> | ||
|
||
<article> | ||
<h2>Automatic icons from service</h2> | ||
<p>If you can find it on <a href="https://icones.js.org/">Icones</a>, you can render it here!</a></p> | ||
<!-- Pull your icon from the default remote service --> | ||
<Icon size={64} pack="ic" name="baseline-account-box" /> | ||
<Icon size={64} name="fe:building" /> | ||
<Icon size={64} name="ri:aliens-fill" /> | ||
</article> | ||
</body> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" type="image/x-icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<title>Astro Icon</title> | ||
<style lang="css"> | ||
[data-icon] { | ||
color: blue; | ||
} | ||
[data-icon="annotation"] { | ||
color: red; | ||
} | ||
[data-icon="deno"] { | ||
color: green; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<h1>Welcome to Astro Icon!</h1> | ||
|
||
<p> | ||
The <code>Icon</code> component will optimize and inline any SVG file inside | ||
of <code>src/icons/</code> | ||
</p> | ||
|
||
<article> | ||
<h2>Local</h2> | ||
<!-- This will inline your SVG directly --> | ||
<Icon size={24} name="adjustment" /> | ||
<Icon size={24} name={icon} /> | ||
<Icon size={24} name={icon} /> | ||
<Icon size={24} name="annotation" /> | ||
<Icon size={24} name="annotation" /> | ||
<Icon size={24} name="annotation" /> | ||
<Icon size={24} name="deno" /> | ||
<Icon name="deno" /> | ||
<Icon name="deno" /> | ||
</article> | ||
|
||
<article> | ||
<h2>Automatic icons from service</h2> | ||
<p> | ||
If you can find it on <a href="https://icones.js.org/">Icones</a>, you | ||
can render it here! | ||
</p> | ||
</article> | ||
<!-- Pull your icon from the default remote service --> | ||
<Icon size={32} name="ic:baseline-account-box" /> | ||
<Icon size={64} name="ic:baseline-account-box" /> | ||
<Icon size={80} name="ic:baseline-account-box" /> | ||
|
||
<Icon size={64} name="fe:building" /> | ||
<Icon size={64} name="ri:aliens-fill" /> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,29 @@ | ||
--- | ||
import { Icon } from 'astro-icon'; | ||
import { Icon } from "astro-icon/components"; | ||
--- | ||
|
||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" type="image/x-icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<title>Astro Icon</title> | ||
<style lang="css"> | ||
[data-icon] { | ||
color: blue; | ||
} | ||
[data-icon="annotation"] { | ||
color: red; | ||
} | ||
[data-icon="bi:stars"] { | ||
color: green; | ||
} | ||
</style> | ||
</head> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" type="image/x-icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<title>Astro Icon</title> | ||
<style lang="css"> | ||
[astro-icon] { | ||
color: blue; | ||
} | ||
[astro-icon="annotation"] { | ||
color: red; | ||
} | ||
[astro-icon="folder"] { | ||
color: green; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<h1>Welcome to Astro Icon!</h1> | ||
|
||
{[1,2,3].map(() => <Icon name="bi:stars" /> )} | ||
</body> | ||
<body> | ||
<h1>Welcome to Astro Icon!</h1> | ||
|
||
{[1, 2, 3].map(() => <Icon name="bi:stars" />)} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Icon } from './lib/Icon.astro' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Icon } from './lib/Icon.astro' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { AstroIntegration } from 'astro'; | ||
|
||
export interface AstroIconOptions { | ||
include: Record<string, ['*'] | string[]> | ||
} | ||
|
||
export default function icon(opts: AstroIconOptions): AstroIntegration; |
Oops, something went wrong.