Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix loading on button, add link to root page on logo #3025

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions landing/src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const { isHome } = Astro.props;

<header class="flex justify-center mt-4 w-full">
<div class="absolute ml-2 top-0">
<Fragment class="shepherd-logo absolute ml-2" set:html={ShepherdHead} />
<a href="/">
<Fragment class="shepherd-logo absolute ml-2" set:html={ShepherdHead} />
</a>
</div>

<div
Expand Down Expand Up @@ -36,7 +38,7 @@ const { isHome } = Astro.props;
type="button"
>
Demo
</button>
</button>
</div>

<div class="flex lg:p-12">
Expand Down
12 changes: 6 additions & 6 deletions landing/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ import MainPage from '@layouts/MainPage.astro';
/>
</div>

<div slot='content'>
<div class='hero-including mt-8' id='hero-including'>
<h3 class='demo-heading font-heading text-2xl uppercase'>
<div slot="content">
<div class="hero-including mt-8" id="hero-including">
<h3 class="demo-heading font-heading text-2xl uppercase">
01. How to Include
</h3>
<div class='hero-example-code text-left'>
<div class="hero-example-code text-left">
<Code
code={`
<link rel="stylesheet" href="shepherd.js/dist/css/shepherd.css"/>
<script type="module" src="shepherd.js/dist/shepherd.mjs"></script>

`}
lang='js'
theme='nord'
lang="js"
theme="nord"
wrap
/>
</div>
Expand Down
8 changes: 1 addition & 7 deletions landing/src/pages/#.astro
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
import { actions } from 'astro:actions';
import { navigate } from 'astro:transitions/client';
document.addEventListener('astro:page-load', () => {
const buttons = document.querySelectorAll('button');
const buttons = document.querySelectorAll('[data-#-id]');

buttons.forEach((button) => {
button.addEventListener('click', async (event) => {
Expand Down Expand Up @@ -378,17 +378,11 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
console.log('Checkout result:', data, error, productPriceId);

if (!error) {
btn.disabled = false;
btn.innerHTML = originalText;
navigate(data);
} else {
btn.disabled = false;
btn.innerHTML = originalText;
console.error('Checkout error:', error);
}
} catch (error) {
btn.disabled = false;
btn.innerHTML = originalText;
console.error('An error occurred during checkout:', error);
} finally {
btn.disabled = false;
Expand Down