gokarna-theme / gokarna-hugo

A minimal opinionated theme for Hugo
https://gokarna-hugo.netlify.app
GNU General Public License v3.0
357 stars 139 forks source link

Attach event listener with options #174

Closed davidkroell closed 1 year ago

davidkroell commented 1 year ago

Extracting the theme toggling into a separate function.

Background: I use fireship-io/flamethrower as a routing and prefetching utility in my page. On every navigation the event listeners were added to the toggle element. by using the option capture: true this does not happen anymore.

It does not brake code with this option, although I'll understand that this can be seen as a tailored solution for my problem. Feel free to close this PR with a wont-fix and I will keep it as my personal fork.

Yet I still think it improves readability.

netlify[bot] commented 1 year ago

Deploy Preview for gokarna-hugo ready!

Name Link
Latest commit 4212add5619044ccdc900a8347d48a7a8c9fb361
Latest deploy log https://app.netlify.com/sites/gokarna-hugo/deploys/6497ecafa2533800097ec9f1
Deploy Preview https://deploy-preview-174--gokarna-hugo.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

yashmehrotra commented 1 year ago

@davidkroell Can you rebase

davidkroell commented 1 year ago

@yashmehrotra just noticed the icons do not work. Waiting for #178

davidkroell commented 1 year ago

@yashmehrotra rebased the branch. It's working now.