eigilnikolajsen / commit-mono

Commit Mono is an anonymous and neutral programming typeface.
https://commitmono.com/
1.28k stars 21 forks source link

fix(website): error on section link click event #33

Closed yitengjun closed 1 year ago

yitengjun commented 1 year ago

Hi, great typeface and website.

While browsing this impressive website, I noticed that the section transition links, such as "Next section" are not functioning properly.

CleanShot 2023-08-24 at 00 23 07

It seems the issue might be due to the absence of an event handler for the onclick="keyDown({key:'Digit~’})” set on the .download_button. While the key action event is set up, this click event appears to be missing.

In this PR, I've made the following corrections: • Ensured the onclick="keyDown({key:'Digit*’})” event functions correctly. • Modified so that when the above is corrected, the .active_key class is added to data-key-code="Digit*" at the appropriate times. This also resolves the issue where the .active_key class wasn't added during key action events for data-key-code="Digit*".

(another approach could be to modify the onclick event itself)

netlify[bot] commented 1 year ago

Deploy Preview for commitmono ready!

Name Link
Latest commit e0a80acb7cd4e955cfe07f3a7ac9d2f46aa0d77a
Latest deploy log https://app.netlify.com/sites/commitmono/deploys/64e626efcd4e2c00080569be
Deploy Preview https://deploy-preview-33--commitmono.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 configuration.

eigilnikolajsen commented 1 year ago

Hello! Thank you so much for spending time fixing this, and making me aware! Your solution is very clever and nice, but I've chosed to resolve it in a different way. Instead of fixing the script like you did, I decided to update the index.html file instead, because in my opinion this was part that was wrong. Sorry for not including your PR, but it was very helpful to me. You can see what I did here.