okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
251 stars 134 forks source link

dropdown menu not working #859

Open monsieurcoconut opened 3 years ago

monsieurcoconut commented 3 years ago

Is this a BUG REPORT or FEATURE REQUEST?: bug

What happened: The drop down menu of the navigation bar in mobile or "narrow mode" ("hamburger button") is not working on the starter website.

How to reproduce it (as minimally and precisely as possible): Build the starter website based on https://about.okkur.org/syna/docs/installation/#using-starter

git clone --recurse-submodules https://git.okkur.org/syna-start
cd syna-start
hugo server -D

access the website at http://localhost:1313/ on firefox. Then shrink the browser window to switch the website to "narrow" view.

Environment:

stp-ip commented 3 years ago

Check with Hugo version v0.76.5 for now. Might be related to a bigger issue.

namkyodai commented 3 years ago

Using Hugo version 0.88.1 with Window extended but this issue is still persisted. Any recommendation? thanks

kshji commented 3 years ago

Same here. Both syna-start and about.syna site copy has same problem. webpack problems => mobile menu not working ?

Done also make, no helps.

hugo 0.88.1

Browser error console:

index.js:1 Uncaught ReferenceError: __webpack_require__ is not defined
    at eval (index.js:1)
    at Object../assets/js/index.js (syna-main.min.621de6e5b728ed26dca65e731c4f4f9e0c720b39d730104457e9eca34f8c7e35.js:1)
    at a (syna-main.min.621de6e5b728ed26dca65e731c4f4f9e0c720b39d730104457e9eca34f8c7e35.js:1)
    at syna-main.min.621de6e5b728ed26dca65e731c4f4f9e0c720b39d730104457e9eca34f8c7e35.js:1
    at syna-main.min.621de6e5b728ed26dca65e731c4f4f9e0c720b39d730104457e9eca34f8c7e35.js:1
eval @ index.js:1
./assets/js/index.js @ syna-main.min.621de6e5b728ed26dca65e731c4f4f9e0c720b39d730104457e9eca34f8c7e35.js:1
a @ syna-main.min.621de6e5b728ed26dca65e731c4f4f9e0c720b39d730104457e9eca34f8c7e35.js:1
(anonymous) @ syna-main.min.621de6e5b728ed26dca65e731c4f4f9e0c720b39d730104457e9eca34f8c7e35.js:1
(anonymous) @ syna-main.min.621de6e5b728ed26dca65e731c4f4f9e0c720b39d730104457e9eca34f8c7e35.js:1
search.js:1 Uncaught ReferenceError: __webpack_require__ is not defined
    at eval (search.js:1)
    at Object../assets/js/search.js (syna-search.min.3ce27877eba1d35d56eb2600a9dfa58d369972290668fd1b3522c5c7fea2acbf.js:1)
    at a (syna-search.min.3ce27877eba1d35d56eb2600a9dfa58d369972290668fd1b3522c5c7fea2acbf.js:1)
    at syna-search.min.3ce27877eba1d35d56eb2600a9dfa58d369972290668fd1b3522c5c7fea2acbf.js:1
    at syna-search.min.3ce27877eba1d35d56eb2600a9dfa58d369972290668fd1b3522c5c7fea2acbf.js:1

I tested Webpack Hugo demo Git. Works fine. Only done:

yarn build
hugo

And public include workin site. I have never need to handle webpack or webpack problem, so can't help ...

sujitks commented 2 years ago

I am also getting this behaviour. It shows the icon for showing the menu but does not work.

image
Fweeb commented 2 years ago

Running into this one as well on a couple of my sites. Not entirely sure where the culprit lives.

Marzal commented 2 years ago

Using Hugo v0.76.5 as recommended in the first comment works for me

https://gitlab.com/residuocerorm/residuocerorm.gitlab.io/-/blob/master/.gitlab-ci.yml#L2

Fweeb commented 2 years ago

Should've mentioned the version. I'm using Hugo v0.100.2.

I'm also on Arch Linux. Downgrading is... non-trivial.

Marzal commented 2 years ago

I would try some of the options in the official docu until Syna is able to use a more recen version:

https://gohugo.io/getting-started/installing#binary-cross-platform Binary or docker

PD: I'm also on Arch, but only for developtment, production is in Gitlab and is easier thanks to the Registry versions

stp-ip commented 2 years ago

One workaround that should work is to disable JS minification, which seems to have introduced this issue. Thank you all for understanding my limited time currently working on fixing the underlaying issue. Happy for contributions as always :)

[minify]
disableJS = true
Marzal commented 2 years ago

[minify] disableJS = true

Thanks, it work's

For more info https://github.com/okkur/syna/issues/865