-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test pr with new progress bar div (#7)
* updated readme with intents * Added Progressbar comp, just for test push * Update ProgressBar.astro Finally got swup bar technically working. * Update README.md --------- Co-authored-by: Martin Trapp <[email protected]>
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
--- | ||
<script> | ||
import "https://unpkg.com/@swup/progress-plugin@3" | ||
import { loading } from 'astro-vtbot/components/loading-indicator'; | ||
|
||
//@ts-ignore | ||
const plugin = new SwupProgressPlugin(); | ||
|
||
document.addEventListener('astro:after-swap', () => plugin.progressBar.installStyleElement()); | ||
|
||
loading(() => plugin.startShowingProgress(), () => plugin.stopShowingProgress()); | ||
</script> | ||
|
||
<style is:global> | ||
.swup-progress-bar { | ||
} | ||
</style> | ||
|