unfolding-io / nebulix

Nebulix, a Fast & Green Theme Based on Astro + Static CMS + Snipcart
https://nebulix.unfolding.io/
Other
232 stars 112 forks source link

Mailgun and scroll fixes #22

Closed headphonejames closed 9 months ago

headphonejames commented 9 months ago

I fixed the mailgun edge function so it works :) Also included a minor tweak that prevented scrolling on mobile after clicking on an anchor link.

Amazing template - very grateful for it! Thanks!

netlify[bot] commented 9 months ago

Deploy request for nebulix pending review.

Visit the deploys page to approve it

Name Link
Latest commit a3d77c54932f5efa50f2d9e43bd1225683564e8b
preetamslot commented 9 months ago

@headphonejames Thanks for the pull request!! I see you cleaned up the Mailgun function, thanks. I had tested this and I got emails from mailgun.

I see you removed the FROM_EMAIL_ADDRESS, but for some people this is important. lets say I have a cms@mydomain.com for the from address and the email should go to office@another-domain.com. In mailgun I would have to verify all email domains.

If you could put back the from then Ill approve!

About the scroll bug on mobile, could you explain the bug?

This controls the navbar position, so it only shows when it's on top or you are scrolling up

[data-is-scrolling-up="false"][data-is-top="false"] {
 .nav {
  @apply -translate-y-full;
  }
}

so if you would not like this on mobile, you can change this to:

[data-is-scrolling-up="false"][data-is-top="false"] {
 .nav {
  @apply md:-translate-y-full;
  }
}

https://github.com/unfolding-io/nebulix/blob/c7b8b30ed6d8608e7978904ec91f132251e4a1b1/src/styles/global.css#L488

Thanks again for the pointers!

headphonejames commented 9 months ago

Thanks for your code review! I added the FROM_EMAIL_ADDRESS and tested it out.

I removed the CSS attribute change. The bug for scrolling on mobile is that when I click a link on the website that is an anchor tag (like #projects), the website scrolls to the anchor tag and then does not allow scrolling after landing on the anchor tag part of the page. I traced it back to that code. When I disabled that flag, the issue went away. I will see if there is a cleaner fix for this.

Thanks much!

preetamslot commented 9 months ago

Thanks! I will try to replicate the scroll bug