Skip to content

Commit

Permalink
fix: icon fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Sep 28, 2023
1 parent a927ffb commit a843410
Show file tree
Hide file tree
Showing 15 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/images/logos/logo.svg" />
<link rel="stylesheet" href="/icon-font/aw-icon.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="twitter:site" content="@appwrite" />
%sveltekit.head%
Expand Down
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes
File renamed without changes
Binary file not shown.
Binary file not shown.
Binary file added src/icons/output/aw-icon.woff2
Binary file not shown.
File renamed without changes.
3 changes: 2 additions & 1 deletion src/icons/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import svgtofont from 'svgtofont';
import { resolve } from 'path';

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

export const generateIcons = async () => {
await svgtofont({
classNamePrefix: 'aw-icon',
src: src,
dist: resolve(process.cwd(), 'static/icon-font'),
dist: dist,
fontName: 'aw-icon',
styleTemplates: resolve(process.cwd(), 'src/icons/templates'),
css: {
Expand Down
1 change: 1 addition & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
</script>

<script lang="ts">
import '$icons/output/aw-icon.css';
import '@fontsource/inter/100.css';
import '@fontsource/inter/200.css';
import '@fontsource/inter/300.css';
Expand Down
Binary file removed static/icon-font/aw-icon.woff2
Binary file not shown.
1 change: 1 addition & 0 deletions svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const config = {
alias: {
$routes: './src/routes',
$scss: './src/scss',
$icons: './src/icons',
$appwrite: './node_modules/@appwrite.io/repo',
$markdoc: './src/markdoc'
}
Expand Down

0 comments on commit a843410

Please sign in to comment.