Skip to content

UX: Add navigation menu#50

Merged
keradus merged 4 commits intoPHP-CS-Fixer:generatorfrom
Kocal:navigation-menu
Feb 6, 2026
Merged

UX: Add navigation menu#50
keradus merged 4 commits intoPHP-CS-Fixer:generatorfrom
Kocal:navigation-menu

Conversation

@Kocal
Copy link
Copy Markdown
Contributor

@Kocal Kocal commented Feb 3, 2026

I always struggle to navigate on the website due to the lack of navigation menu.
Each time, I have to go back to the homepage to find the most useful links in a small paragraph (usage, rules, rule sets, ...) between other texts.

This PR add a basic but useful navigation menu, partially based on old menu CSS classe (I didn't see the menu CSS class being used somewhere?)
Capture d’écran 2026-02-03 à 08 26 28
Capture d’écran 2026-02-03 à 08 26 35

Note: I tried to use .nv instead of .nav, since .hd is used for header, .ft for footer, etc... but it conflict with a nv class generated by the code highlighter.

@Kocal
Copy link
Copy Markdown
Contributor Author

Kocal commented Feb 3, 2026

(cc @keradus, IDK if you have the notifications enabled)

Comment thread theme/layout.html Outdated
Comment thread theme/static/css/base.css
Comment thread theme/layout.html Outdated
Comment on lines +58 to +61
<li class="{% if pagename == 'doc/usage' or pagename.startswith('doc/usage') %}active{% endif %}"><a href="{{ pathto('doc/usage') }}">Usage</a></li>
<li class="{% if pagename == 'doc/rules/index' or pagename.startswith('doc/rules') %}active{% endif %}"><a href="{{ pathto('doc/rules/index') }}">Rules</a></li>
<li class="{% if pagename == 'doc/ruleSets/index' or pagename.startswith('doc/ruleSets') %}active{% endif %}"><a href="{{ pathto('doc/ruleSets/index') }}">Rule sets</a></li>
<li class="{% if pagename == 'doc/config' or pagename.startswith('doc/config') %}active{% endif %}"><a href="{{ pathto('doc/config') }}">Configuration</a></li>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall, love the idea!

can we have those, following user-flow?

  • installation
  • usage
  • config
  • rules
  • sets

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Comment thread theme/layout.html Outdated
</header>
{% endblock %}

{%- block navigation %}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe sth like this ?

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT?
Capture d’écran 2026-02-05 à 19 25 59

Comment thread theme/layout.html Outdated
Comment thread theme/static/css/base.css Outdated
@keradus keradus changed the title Add navigation menu UX: Add navigation menu Feb 6, 2026
@keradus
Copy link
Copy Markdown
Member

keradus commented Feb 6, 2026

Thank you

@keradus keradus merged commit f0525b9 into PHP-CS-Fixer:generator Feb 6, 2026
2 checks passed
@Kocal Kocal deleted the navigation-menu branch February 6, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants