ppoffice / hexo-theme-hueman

A redesign of Alx's wordpress theme Hueman, ported to Hexo.
http://ppoffice.github.io/hexo-theme-hueman/
GNU General Public License v2.0
1.17k stars 334 forks source link

Toggle Nav not working #97

Closed VirtuaCreative closed 8 years ago

VirtuaCreative commented 8 years ago

Hey there,

I'm setting up a new site in order to provide SSGs options for GitLab Pages and I chose your theme for Hexo. But the toggle navigation is not working: when we click on "menu" (smartphone screen), nothing happens. I believe there's a script tag missing somewhere.

Would you please help me to fix this?

Thanks.

ppoffice commented 8 years ago

Did you replace jQuery inside this theme? I find your jQuery file is not the same as this repo's.

VirtuaCreative commented 8 years ago

Thanks for replying!

No, I didn't... Copy-Paste only... What should I do then? Clone your repo again and replace themes\hueman\source\vendor\jquery\2.0.3\jquery.min.js? From which branch should I clone? Last time I cloned master's.

ppoffice commented 8 years ago

You can just replace jquery.min.js with the one downloaded from this repo, or simple download it from jQuery official site.

VirtuaCreative commented 8 years ago

I'm doing this right now! :) I copied your jquery from the gh-pages branch. I'll get back to you in a few min. Thanks again!

VirtuaCreative commented 8 years ago

Didn't work. Perhaps something related to the url and root set on the _config.yml? It would be odd, as the stylesheets and fonts are ok...

I'll try to replace:

url: http//mysite.com
root: "/hexo/"

by

url: http//mysite.com/hexo/
root: ""

And see if this works.

In the mean time, would you mind taking a look at the source to check if isn't it a <script> tag missing?

I appreciate your help! :)

VirtuaCreative commented 8 years ago

Got worse. broke all links. Now I'll try to replace jquery.min for jquery uncompressed. If doesn't work, I don't know whatever I could do.

VirtuaCreative commented 8 years ago

The links are back, but the toggle nav still doen't work...

Any help is much appreciated.

ppoffice commented 8 years ago

I think it has something to do with your deploy environment, not Hexo or this theme, I will look into this.

VirtuaCreative commented 8 years ago

Great! Thanks a lot! I'm not deploying the site, I'm just generating the public folder by running hexo generate. Could that be the problem?

ppoffice commented 8 years ago

I think I may find the problem. You should only put post and page files inside your blog's source folder. So please remove source/css, source/js, source/vendor.

VirtuaCreative commented 8 years ago

You mean this folder? ~\hexo\themes\hueman\source ? Do I remove the folder source or just its contents?

VirtuaCreative commented 8 years ago

I see, the contents are duplicated. Perhaps it's the opposite, you mean I need to remove from here: \hexo\source?

ppoffice commented 8 years ago

Delete css, js and vendor under hexo\source.

~\hexo\themes\hueman\source is a part of the theme.

VirtuaCreative commented 8 years ago

There we go! It's working now!

I deleted the folders from the source and added a tag to the <head>, which I've found in your site but wasn't in mine:

<script src="//s.swiftypecdn.com/install/v2/st.js" async=""></script>

But I'm not sure if that tag was that important! Anyway, it's working now! :D

Thanks a million!

I can add a comment here with the link to my project on GitLab with your theme. It's just for demonstration, "how to build a site with GitLab Pages" using different SSGs. Perhaps you can add it to your readme if you want. :) The project is in my test repo, but I'll transfer it to a definitive repo. Anyway, just a suggestion! Thanks again!

ppoffice commented 8 years ago

https://github.com/ppoffice/hexo-theme-hueman/wiki/Search#swiftype