lxndrblz / anatole

Anatole is a minimalistic two-column theme for Hugo.
https://themes.gohugo.io/themes/anatole/
MIT License
650 stars 356 forks source link

fix: change navbar-burger click js selector when using toc #423

Closed fran6k closed 1 year ago

fran6k commented 1 year ago

Description

when use toc in a page, navbar-burger will can't open correctly because anatole-header.js which control nav--active select wrong element. it should select navbar-burge's nav but actually select TableOfContent's nav

Issue Number:


Additional Information (Optional)


Checklist

Yes, I included all necessary artefacts, including:


Testing Checklist

Yes, I ensured that all of the following scenarios were tested:


Notify the following users

netlify[bot] commented 1 year ago

Deploy Preview for anatole-demo ready!

Name Link
Latest commit 3a89a1c6bc7b62022c060bc85866a0fce9d45113
Latest deploy log https://app.netlify.com/sites/anatole-demo/deploys/63c9679d98d80200095143ec
Deploy Preview https://deploy-preview-423--anatole-demo.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.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

lxndrblz commented 1 year ago

@febifrank Thanks for your PR.

I am having a bit of trouble reproducing this bug. When I enable toc for a post, switch the view to mobile I am still able to open and close the menu. Can you please describe more in depth how I could reproduce it?

fran6k commented 1 year ago

@febifrank Thanks for your PR.

I am having a bit of trouble reproducing this bug. When I enable toc for a post, switch the view to mobile I am still able to open and close the menu. Can you please describe more in depth how I could reproduce it?

i'm sry for reply lately. i try to reproducing this bug and i get the same situation with you. i find i have this problem because i rewrite the toc's render location in single.html i'm sry sincerely for take up your time