-
-
Notifications
You must be signed in to change notification settings - Fork 708
Kickstarter dialog #2302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Kickstarter dialog #2302
Changes from all commits
da1cfec
9c02ef0
e449e4c
3cbd472
9c28c6e
371d821
302b9b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,7 +67,6 @@ | |
| </a> | ||
| <i class="fa-solid fa-grip-vertical" slot="handle"></i> | ||
| </wa-comparison> | ||
| <script type="module" src="/js/web-awesome.js"></script> | ||
| {%- endif %} | ||
|
|
||
| <is-land class="elv-possum-island" on:visible on:idle on:load on:save-data="false" on:media="(prefers-reduced-motion: no-preference)"> | ||
|
|
@@ -80,4 +79,53 @@ | |
| </template> | ||
| </is-land> | ||
| </div> | ||
|
|
||
| <wa-dialog id="promo-dialog" class="promo-dialog" light-dismiss without-header> | ||
| <iframe class="video-player" src="https://player.vimeo.com/video/1168551192?h=6ba669b3ff&badge=0&autopause=0&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media; web-share" referrerpolicy="strict-origin-when-cross-origin" title="Now on Kickstarter: Build Awesome — Collaborate on Web Sites That Last"></iframe> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wouldn't expect Vimeo to be around for long: https://www.businessinsider.com/vimeo-laying-off-staff-after-billion-sale-to-bending-spoons-2026-1 |
||
| <div class="wa-stack wa-gap-2xl"> | ||
| <div class="wa-stack wa-gap-s promo-dialog-content"> | ||
| The same static site generation you know and love, now with endless Pro 'possum-bilties. But just like the other parts of the Awesomeverse, the core of Build Awesome will continue to be free and open source. | ||
| </div> | ||
| <div class="promo-footer wa-flank"> | ||
| <wa-button type="button" appearance="plain" data-dialog="close">Got It</wa-button> | ||
| <wa-button | ||
| variant="brand" | ||
| appearance="accent" | ||
| href="{{ config.kickstarterUrl }}" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Conceptually this ought to be an If the web component cannot load (network fluke or what have you) this link isn't actionable. |
||
| class="brand-font promo-dialog-ks-button"> | ||
| Support the Kickstarter! | ||
| </wa-button> | ||
| </div> | ||
| </div> | ||
|
|
||
| </wa-dialog> | ||
|
|
||
| <button id="reset-promo-dialog" onclick="localStorage.removeItem('ba-promo-dialog'); location.reload();">Reset Promo Dialog</button> | ||
| </header> | ||
|
|
||
| <script type="module"> | ||
| if (!localStorage.getItem('ba-promo-dialog')) { | ||
|
|
||
| // Wait for Web Awesome kit to load and register components | ||
| try { | ||
| await customElements.whenDefined('wa-dialog'); | ||
|
|
||
| const dialog = document.querySelector('#promo-dialog'); | ||
| const videoIframe = dialog.querySelector('.video-player'); | ||
|
|
||
| dialog.open = true; | ||
|
|
||
| // Save to localStorage and stop video when dialog is closed | ||
| dialog.addEventListener('wa-hide', () => { | ||
| localStorage.setItem('ba-promo-dialog', 'closed'); | ||
|
|
||
| // Stop the Vimeo video by sending a pause command | ||
| if (videoIframe && videoIframe.contentWindow) { | ||
| videoIframe.contentWindow.postMessage('{"method":"pause"}', '*'); | ||
| } | ||
| }, { once: true }); | ||
| } catch (error) { | ||
| console.error('Error loading dialog:', error); | ||
| } | ||
| } | ||
| </script> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -165,6 +165,10 @@ let eleventyComputed = { | |
| {%- else %} | ||
| <script src="/js/eleventy.js" type="module"></script> | ||
| {%- endif %} | ||
|
|
||
| <!-- Web Awesome Kit --> | ||
| <link rel="stylesheet" href="https://kit.webawesome.com/a2ff939369d44af1.css" crossorigin="anonymous"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it feasible to have SRI (Sub-Resource Integrity) here? In case Alternatively self-hosting. |
||
| <script src="https://kit.webawesome.com/a2ff939369d44af1.js" crossorigin="anonymous"></script> | ||
| </head> | ||
| <body> | ||
| {{ content | safe }} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.