Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Use hamburger menu TOC for module pages on small screens #2606

Merged
merged 7 commits into from
Oct 23, 2022

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Oct 21, 2022

Module HTML man page use hamburger menu TOC #2589 (comment) for screen width < 1024 px.

@tmszi tmszi added enhancement New feature or request manual Documentation related issues HTML Related code is in HTML JavaScript Related code is in JavaScript labels Oct 21, 2022
@tmszi tmszi added this to the 8.3.0 milestone Oct 21, 2022
To prevent the link path from being replaced with a local path during
addon installation.

Example:

`<a href="#description">DESCRIPTION</a>`

with

`<a href="file:///usr/lib64/grass83/docs/html/#description">DESCRIPTION</a>`
@tmszi
Copy link
Member Author

tmszi commented Oct 22, 2022

How to test this PR:

Core module HTML man page:

  1. Compile GG with this branch
  2. Launch GG
  3. GRASS nc_spm_08_grass7/landsat:~ > firefox-bin $GISBASE/docs/html/v.surf.rst.html
  4. Switch to responsive design in the Mozilla Firefox by Ctrl + Shift + M the keyboard shortcut
  5. Change responsive design screen size < 1024 px
  6. Test hamburger menu

Addon HTML man page:

  1. g.extension db.join
  2. GRASS nc_spm_08_grass7/landsat:~ > firefox-bin $GRASS_ADDON_BASE/docs/html/db.join.html
  3. Switch to responsive design in the Mozilla Firefox by Ctrl + Shift + M the keyboard shortcut
  4. Change responsive design screen size < 1024 px
  5. Test hamburger menu

@neteler
Copy link
Member

neteler commented Oct 22, 2022

I tested it locally, the menu looks good (incl. submenus!):

  • it seems that docs/html/hamburger_menu*.svg files aren't installed yet via Makefile.

@tmszi
Copy link
Member Author

tmszi commented Oct 22, 2022

* it seems that `docs/html/hamburger_menu*.svg` files aren't installed yet via Makefile.

Yes, you are right. I had these files copied manually. Thanks for the tip. Fixed with 6eb2856.

@neteler
Copy link
Member

neteler commented Oct 23, 2022

image

... looks good to me!

@tmszi tmszi merged commit b2435bf into OSGeo:main Oct 23, 2022
@tmszi tmszi deleted the implement-module-manual-hamburger-menu branch October 23, 2022 11:04
neteler pushed a commit that referenced this pull request Oct 23, 2022
… 1024 px (#2606)

* utils: module HTML man page use hamburger menu TOC for screen width < 1024 px

* Fix flake8, black errors.

* g.extension: copy CSS style file into addons docs HTML dir for every addon instalation

* g.extension: copy hamburger menu SVG image files into addons docs HTML dir for every addon instalation

* utils: set CSS class for every hamburger menu link list item

To prevent the link path from being replaced with a local path during
addon installation.

Example:

`<a href="#description">DESCRIPTION</a>`

with

`<a href="file:///usr/lib64/grass83/docs/html/#description">DESCRIPTION</a>`

* utils: fix space between HTML element attributes

* man: install module HTML man page hamburger menu TOC SVG images
@neteler neteler modified the milestones: 8.3.0, 8.2.1 Oct 23, 2022
@neteler
Copy link
Member

neteler commented Oct 23, 2022

@tmszi: I just realize it now: the SVG also need to be installed in the manuals/addons/ subdir:

https://grass.osgeo.org/grass82/manuals/addons/hamburger_menu.svg -> 404

@tmszi
Copy link
Member Author

tmszi commented Oct 23, 2022

@tmszi: I just realize it now: the SVG also need to be installed in the manuals/addons/ subdir:

https://grass.osgeo.org/grass82/manuals/addons/hamburger_menu.svg -> 404

When I tested it locally (addon installation), these two lines 15d5178 fixed this issue.

@tmszi
Copy link
Member Author

tmszi commented Oct 23, 2022

@tmszi
Copy link
Member Author

tmszi commented Oct 23, 2022

I found these pages doesn't have hamburger menu TOC:

https://grass.osgeo.org/grass82/manuals/full_index.html

https://grass.osgeo.org/grass82/manuals/keywords.html

and needed standalone hamburger TOC menu implementation.

ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
… 1024 px (OSGeo#2606)

* utils: module HTML man page use hamburger menu TOC for screen width < 1024 px

* Fix flake8, black errors.

* g.extension: copy CSS style file into addons docs HTML dir for every addon instalation

* g.extension: copy hamburger menu SVG image files into addons docs HTML dir for every addon instalation

* utils: set CSS class for every hamburger menu link list item

To prevent the link path from being replaced with a local path during
addon installation.

Example:

`<a href="#description">DESCRIPTION</a>`

with

`<a href="file:///usr/lib64/grass83/docs/html/#description">DESCRIPTION</a>`

* utils: fix space between HTML element attributes

* man: install module HTML man page hamburger menu TOC SVG images
marisn pushed a commit to marisn/grass that referenced this pull request Jun 2, 2023
… 1024 px (OSGeo#2606)

* utils: module HTML man page use hamburger menu TOC for screen width < 1024 px

* Fix flake8, black errors.

* g.extension: copy CSS style file into addons docs HTML dir for every addon instalation

* g.extension: copy hamburger menu SVG image files into addons docs HTML dir for every addon instalation

* utils: set CSS class for every hamburger menu link list item

To prevent the link path from being replaced with a local path during
addon installation.

Example:

`<a href="#description">DESCRIPTION</a>`

with

`<a href="file:///usr/lib64/grass83/docs/html/#description">DESCRIPTION</a>`

* utils: fix space between HTML element attributes

* man: install module HTML man page hamburger menu TOC SVG images
@wenzeslaus wenzeslaus changed the title utils: module HTML man page use hamburger menu TOC for screen width < 1024 px docs: module HTML man page use hamburger menu TOC for small screen width Jun 6, 2023
@wenzeslaus wenzeslaus changed the title docs: module HTML man page use hamburger menu TOC for small screen width docs: Use hamburger menu TOC for module pages on small screen width Jun 6, 2023
@wenzeslaus wenzeslaus changed the title docs: Use hamburger menu TOC for module pages on small screen width docs: Use hamburger menu TOC for module pages on small screens Jun 6, 2023
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
… 1024 px (OSGeo#2606)

* utils: module HTML man page use hamburger menu TOC for screen width < 1024 px

* Fix flake8, black errors.

* g.extension: copy CSS style file into addons docs HTML dir for every addon instalation

* g.extension: copy hamburger menu SVG image files into addons docs HTML dir for every addon instalation

* utils: set CSS class for every hamburger menu link list item

To prevent the link path from being replaced with a local path during
addon installation.

Example:

`<a href="#description">DESCRIPTION</a>`

with

`<a href="file:///usr/lib64/grass83/docs/html/#description">DESCRIPTION</a>`

* utils: fix space between HTML element attributes

* man: install module HTML man page hamburger menu TOC SVG images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request HTML Related code is in HTML JavaScript Related code is in JavaScript manual Documentation related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants