make the css imports part of the svelte template

main
Yanick Champoux 2021-06-13 12:18:29 -04:00
parent 95646cebd8
commit ec63a80d42
2 changed files with 17 additions and 7 deletions

View File

@ -4,10 +4,6 @@
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/bulma/bulma.css" />
<link rel="stylesheet" href="/fonts/faktos.css">
<link rel="stylesheet" href="/fonts/dosis/dosis.css">
<link rel='stylesheet' href='/global.css'>
%svelte.head%
</head>
<body>

View File

@ -1,6 +1,20 @@
<App />
<script>
import App from '../components/App.svelte';
</script>
<svelte:head>
{#each stylesheets as href (href)}
<link rel="stylesheet" {href} />
{/each}
</svelte:head>
<script>
import { base } from "$app/paths";
import App from "../components/App.svelte";
const stylesheets = [
"/bulma/bulma.css",
"/fonts/faktos.css",
"/fonts/dosis/dosis.css",
"/global.css",
].map((ss) => base + ss);
</script>