Skip to content

Commit

Permalink
test pr with new progress bar div (#7)
Browse files Browse the repository at this point in the history
* 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
k16e-me and martrapp authored Jan 26, 2024
1 parent 9b9dba7 commit 5a3df2b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A current deployment of tech demos and the documentation can be found at https:/
* Wanting support in understanding and debugging view transitions or simply want a second pair of eyes on your view transition settings?
* Looking for reusable animations or special transition effects?

The `astro-vtbot`package isn't a monolithic library. Use the components you need and only pay bandwidth for those.
The `astro-vtbot`package isn't a monolithic library. Use the components you need and only pay bandwidth for those.
|Component|Brotli bytes added|
|-------|-----------------|
Linter 🧹 |~2k
Expand All @@ -46,7 +46,7 @@ Visit [the documentation](https://events-3bg.pages.dev/components/) of the reusa

- `Zoom` and `Swing` animations and the `<AnimationsStyle/>` component allows for extended styling options.

- `<Portal/>` component that forces all view transitions through a portal/loading page.
- `<Portal/>` component that forces all view transitions through a portal/loading page.

- `<NoScroll/>` keep the current vertical and horizontal scroll position when transitioning to the next page.

Expand Down
19 changes: 19 additions & 0 deletions components/ProgressBar.astro
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>

0 comments on commit 5a3df2b

Please sign in to comment.