gwtproject / gwt-site

Sources of the pages of the gwtproject.org website.
150 stars 333 forks source link

Remove javascript code for mobile menu #48

Open jDramaix opened 9 years ago

jDramaix commented 9 years ago

For the time being we use a jQuery plugin in order to display the website menu on mobile. We should remove this code and use GQuery instead to build the mobile menu.

nweeger commented 9 years ago

Is anyone working on this issue? If no I can try to find some time to rewrite flexnav in gwtquery...

manolo commented 9 years ago

I had thought to port flexnav as a gquery plugin, but I have not found the time yet. It's fantastic if you have the time. I can help if you have any issue or review your code.

jDramaix commented 9 years ago

That would be nice !

nweeger commented 9 years ago

Most of the code will probably end up in gwt-site-webapp, to replace global.js.

Should I put the plugin's code in that project? Or create a separate project, either under gwtquery-plugins's name, or my own repository & package names?

About the various styles used, I'm thinking of merely copying the style.css resulting from the "compilation" by grunt, extracting the part about the plugin to the plugin if applicable, and putting the rest in either gwt-site or gwt-site-webapp.

nweeger commented 9 years ago

Where is the opening of the navigation menu handled? I can't find anything related to the "closed" class...

jDramaix commented 9 years ago

Where is the opening of the navigation menu handled? I can't find anything related to the "closed" class...

in src/main/resources/main.tpl

nweeger commented 9 years ago

Sorry, I meant where that class is added/removed when you hover around the menu...

jDramaix commented 9 years ago

This is done in the gwt code present in that project

nweeger commented 9 years ago

I must be stupid, but in https://gwt.googlesource.com/gwt-site-webapp/+/master/src/main/java/com/google/gwt/site/webapp/client/GWTProjectEntryPoint.java I can't find any reference to either "nav", "navigation", "closed", or any other similar name related to the menu...

jDramaix commented 9 years ago

Nop you're not stupid :-) The code is not merged yet into master

jDramaix commented 9 years ago

You can checkout the code by doing:

git fetch https://gwt.googlesource.com/gwt-site-webapp refs/changes/31/12531/1 && git checkout FETCH_HEAD
nweeger commented 9 years ago

Hello.

Sorry it took so long, but I think the rewrite in GWT/GWTQuery is globally ok.

You can see the result on http://nekoko.fr/gwt-flexnav/

Though I'm not exactly sure of the intended effect, so I can't guarantee all is ok...

Regards

jDramaix commented 9 years ago

The menu doesn't open when I test on my nexus 5

jDramaix commented 9 years ago

Do you put the code for the flex-nav rewrite somewhere ?

nweeger commented 9 years ago

Code is on:

Are you sure the menu actually works on the gwtproject.org site? I tried reducing my browser window, display did switch to mobile view, but clicking on the menu didn't do anything. And I don't see the "lg-screen" class the flexnav plugin should put on the navigation bar, either.

manolo commented 9 years ago

Definitively the menu is not working in mobile. I will take a look, also I'll review your plugin. BTW, menu does not work in your result url.