-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from NfNitLoop/release-v0.5.0
Release v0.5.0
- Loading branch information
Showing
5 changed files
with
87 additions
and
17 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,24 @@ | ||
<!-- | ||
svelte-spa-router/active can't update when the nav links are changed. | ||
See: https://github.com/ItalyPaleAle/svelte-spa-router/issues/187 😢 | ||
This component works around that. | ||
--> | ||
<a class:active {href}><slot></slot></a> | ||
|
||
<script lang="ts"> | ||
import { location } from "svelte-spa-router" | ||
export let href: string | ||
// TODO: We'll likely need to make this more permissive if I ever decide | ||
// to try allowing ?params on hash URLs like: | ||
// #/post?replyTo=wharrgarbl. | ||
$: active = href === `#` + $location | ||
</script> | ||
|
||
<style> | ||
.active { | ||
color: black; | ||
} | ||
</style> |