Skip to content

Commit

Permalink
icon font
Browse files Browse the repository at this point in the history
  • Loading branch information
TGlide committed Sep 1, 2023
1 parent 8077867 commit 8bcd9c8
Show file tree
Hide file tree
Showing 12 changed files with 559 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/images/logos/logo.svg" />
<link rel="stylesheet" href="https://unpkg.com/@appwrite.io/pink-icons" />
<link rel="stylesheet" href="/icon-font/aw-icon.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Appwrite Next</title>
%sveltekit.head%
Expand Down
6 changes: 3 additions & 3 deletions src/icons/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import svgtofont from 'svgtofont';
import SVGFixer from 'oslllo-svg-fixer';
import { resolve } from 'path';

const src = resolve(process.cwd(), 'svg');
const src = resolve(process.cwd(), 'src/icons/svg');

export const generateIcons = async () => {
await svgtofont({
classNamePrefix: 'aw-',
classNamePrefix: 'aw-icon',
src: src,
dist: resolve(process.cwd(), 'static/icon-font'),
fontName: 'icon',
fontName: 'aw-icon',
styleTemplates: resolve(process.cwd(), 'src/icons/templates'),
css: {
fontSize: '16px'
Expand Down
31 changes: 31 additions & 0 deletions static/icon-font/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
$aw-icon-arrow-down: "\ea01";
$aw-icon-arrow-ext-link: "\ea02";
$aw-icon-arrow-left: "\ea03";
$aw-icon-arrow-right: "\ea04";
$aw-icon-arrow-up: "\ea05";
$aw-icon-calendar: "\ea06";
$aw-icon-check: "\ea07";
$aw-icon-chevron-down: "\ea08";
$aw-icon-chevron-left: "\ea09";
$aw-icon-chevron-right: "\ea0a";
$aw-icon-chevron-up: "\ea0b";
$aw-icon-close: "\ea0c";
$aw-icon-copy: "\ea0d";
$aw-icon-dark: "\ea0e";
$aw-icon-discord: "\ea0f";
$aw-icon-divider-vertical: "\ea10";
$aw-icon-download: "\ea11";
$aw-icon-github: "\ea12";
$aw-icon-hamburger-menu: "\ea13";
$aw-icon-light: "\ea14";
$aw-icon-linkedin: "\ea15";
$aw-icon-location: "\ea16";
$aw-icon-logout-left: "\ea17";
$aw-icon-logout-right: "\ea18";
$aw-icon-minus: "\ea19";
$aw-icon-plus: "\ea1a";
$aw-icon-product-hunt: "\ea1b";
$aw-icon-search: "\ea1c";
$aw-icon-star: "\ea1d";
$aw-icon-twitter: "\ea1e";
$aw-icon-youtube: "\ea1f";
50 changes: 50 additions & 0 deletions static/icon-font/aw-icon.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@font-face {
font-family: "aw-icon";
font-display: swap;
src: url('aw-icon.eot'); /* IE9*/
src: url('aw-icon.eot#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("aw-icon.woff2") format("woff2"),
url("aw-icon.woff") format("woff"),
url('aw-icon.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('aw-icon.svg#aw-icon') format('svg'); /* iOS 4.1- */
}

[class^="aw-icon-"], [class*=" aw-icon-"] {
font-family: 'aw-icon' !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.aw-icon-arrow-down:before { content: "\ea01"; }
.aw-icon-arrow-ext-link:before { content: "\ea02"; }
.aw-icon-arrow-left:before { content: "\ea03"; }
.aw-icon-arrow-right:before { content: "\ea04"; }
.aw-icon-arrow-up:before { content: "\ea05"; }
.aw-icon-calendar:before { content: "\ea06"; }
.aw-icon-check:before { content: "\ea07"; }
.aw-icon-chevron-down:before { content: "\ea08"; }
.aw-icon-chevron-left:before { content: "\ea09"; }
.aw-icon-chevron-right:before { content: "\ea0a"; }
.aw-icon-chevron-up:before { content: "\ea0b"; }
.aw-icon-close:before { content: "\ea0c"; }
.aw-icon-copy:before { content: "\ea0d"; }
.aw-icon-dark:before { content: "\ea0e"; }
.aw-icon-discord:before { content: "\ea0f"; }
.aw-icon-divider-vertical:before { content: "\ea10"; }
.aw-icon-download:before { content: "\ea11"; }
.aw-icon-github:before { content: "\ea12"; }
.aw-icon-hamburger-menu:before { content: "\ea13"; }
.aw-icon-light:before { content: "\ea14"; }
.aw-icon-linkedin:before { content: "\ea15"; }
.aw-icon-location:before { content: "\ea16"; }
.aw-icon-logout-left:before { content: "\ea17"; }
.aw-icon-logout-right:before { content: "\ea18"; }
.aw-icon-minus:before { content: "\ea19"; }
.aw-icon-plus:before { content: "\ea1a"; }
.aw-icon-product-hunt:before { content: "\ea1b"; }
.aw-icon-search:before { content: "\ea1c"; }
.aw-icon-star:before { content: "\ea1d"; }
.aw-icon-twitter:before { content: "\ea1e"; }
.aw-icon-youtube:before { content: "\ea1f"; }
Binary file added static/icon-font/aw-icon.eot
Binary file not shown.
81 changes: 81 additions & 0 deletions static/icon-font/aw-icon.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
@font-face {font-family: "aw-icon";
src: url('aw-icon.eot'); /* IE9*/
src: url('aw-icon.eot#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("aw-icon.woff2") format("woff2"),
url("aw-icon.woff") format("woff"),
url('aw-icon.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('aw-icon.svg#aw-icon') format('svg'); /* iOS 4.1- */
}

[class^="aw-icon-"], [class*=" aw-icon-"] {
font-family: 'aw-icon' !important;
font-size: 16px;
font-display: swap;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.aw-icon-arrow-down:before { content: "\ea01"; }
.aw-icon-arrow-ext-link:before { content: "\ea02"; }
.aw-icon-arrow-left:before { content: "\ea03"; }
.aw-icon-arrow-right:before { content: "\ea04"; }
.aw-icon-arrow-up:before { content: "\ea05"; }
.aw-icon-calendar:before { content: "\ea06"; }
.aw-icon-check:before { content: "\ea07"; }
.aw-icon-chevron-down:before { content: "\ea08"; }
.aw-icon-chevron-left:before { content: "\ea09"; }
.aw-icon-chevron-right:before { content: "\ea0a"; }
.aw-icon-chevron-up:before { content: "\ea0b"; }
.aw-icon-close:before { content: "\ea0c"; }
.aw-icon-copy:before { content: "\ea0d"; }
.aw-icon-dark:before { content: "\ea0e"; }
.aw-icon-discord:before { content: "\ea0f"; }
.aw-icon-divider-vertical:before { content: "\ea10"; }
.aw-icon-download:before { content: "\ea11"; }
.aw-icon-github:before { content: "\ea12"; }
.aw-icon-hamburger-menu:before { content: "\ea13"; }
.aw-icon-light:before { content: "\ea14"; }
.aw-icon-linkedin:before { content: "\ea15"; }
.aw-icon-location:before { content: "\ea16"; }
.aw-icon-logout-left:before { content: "\ea17"; }
.aw-icon-logout-right:before { content: "\ea18"; }
.aw-icon-minus:before { content: "\ea19"; }
.aw-icon-plus:before { content: "\ea1a"; }
.aw-icon-product-hunt:before { content: "\ea1b"; }
.aw-icon-search:before { content: "\ea1c"; }
.aw-icon-star:before { content: "\ea1d"; }
.aw-icon-twitter:before { content: "\ea1e"; }
.aw-icon-youtube:before { content: "\ea1f"; }

$aw-icon-arrow-down: "\ea01";
$aw-icon-arrow-ext-link: "\ea02";
$aw-icon-arrow-left: "\ea03";
$aw-icon-arrow-right: "\ea04";
$aw-icon-arrow-up: "\ea05";
$aw-icon-calendar: "\ea06";
$aw-icon-check: "\ea07";
$aw-icon-chevron-down: "\ea08";
$aw-icon-chevron-left: "\ea09";
$aw-icon-chevron-right: "\ea0a";
$aw-icon-chevron-up: "\ea0b";
$aw-icon-close: "\ea0c";
$aw-icon-copy: "\ea0d";
$aw-icon-dark: "\ea0e";
$aw-icon-discord: "\ea0f";
$aw-icon-divider-vertical: "\ea10";
$aw-icon-download: "\ea11";
$aw-icon-github: "\ea12";
$aw-icon-hamburger-menu: "\ea13";
$aw-icon-light: "\ea14";
$aw-icon-linkedin: "\ea15";
$aw-icon-location: "\ea16";
$aw-icon-logout-left: "\ea17";
$aw-icon-logout-right: "\ea18";
$aw-icon-minus: "\ea19";
$aw-icon-plus: "\ea1a";
$aw-icon-product-hunt: "\ea1b";
$aw-icon-search: "\ea1c";
$aw-icon-star: "\ea1d";
$aw-icon-twitter: "\ea1e";
$aw-icon-youtube: "\ea1f";
Loading

0 comments on commit 8bcd9c8

Please sign in to comment.