Skip to content

Commit 64aba18

Browse files
committed
svelte-pokedex: fix style imports
1 parent e8b8ce0 commit 64aba18

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

pokedex-app/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,12 @@ Breakdown:
8787
8888
I highly anticipate the process here, as this framework gets a decent amount of hype, but I've only worked with it rudimentarily.
8989
90-
I'm having trouble figuring out where and how to import my styles. Still no clue after 30m+ of searching. They changed the bundler to Vite a couple of months back, changind the workflow entirely.
90+
I'm having trouble figuring out where and how to import my global stylesheet. Still no clue after 30m+ of searching. They changed the bundler to Vite a couple of months back, changind the workflow entirely. Seems like the proper way is to import it via the top level `+layout.svelte` file. Feels a bit odd to me.
9191
92-
Time to implement: ~ 0.5h
92+
93+
Time to implement: ~ 1h
9394
9495
Breakdown:
95-
- App Setup and UI: 0.5h
96+
- App Setup and UI: 1h
9697
- Testing Setup: 0h
9798
- CI/CD: 0h

pokedex-app/svelte-pokedex/src/app.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<head>
44
<meta charset="utf-8" />
55
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
6-
<link rel="icon" href="%sveltekit.base%/src/app.css" />
76
<meta name="viewport" content="width=device-width" />
87
%sveltekit.head%
98
</head>
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<nav className="navigation container">
2-
<div className="logo">
3-
<a className="" href="/">
1+
<nav class="navigation container">
2+
<div class="logo">
3+
<a class="" href="/">
44
<img alt="Pokedex App" src="/images/pokedex-logo.png" width="120" />
55
</a>
66
</div>
77

8-
<div className="nav-items">
9-
<a href="/" className="button is-ghost">Home</a>
10-
<a href="/about" className="button is-ghost">About</a>
8+
<div class="nav-items">
9+
<a href="/" class="button is-ghost">Home</a>
10+
<a href="/about" class="button is-ghost">About</a>
1111
</div>
1212
</nav>

pokedex-app/svelte-pokedex/src/routes/+layout.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script>
2-
import 'bulma/css/bulma.min.css';
2+
import '~/bulma/css/bulma.min.css';
3+
import '@/app.css';
34
import Navigation from '../components/Navigation.svelte';
45
import Footer from '../components/Footer.svelte';
56
</script>

pokedex-app/svelte-pokedex/vite.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ const config = {
66
plugins: [sveltekit()],
77
resolve: {
88
alias: {
9-
bulma: path.resolve(__dirname, 'node_modules/bulma'),
9+
'@': path.resolve(__dirname, 'src'),
10+
'~': path.resolve(__dirname, 'node_modules'),
1011
}
1112
},
1213
server: {

0 commit comments

Comments
 (0)