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
Simplify navbar #3681
base: master
Are you sure you want to change the base?
Simplify navbar #3681
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, although the removal of the next_prev
block probably is a breaking change?
Good pointer, thanks. I've re-included it as an empty block here and amended the docs marginally. |
The removal of the "Edit on GitHub" text might obscure the purpose of the GitHub icon in the navbar. If this simplification is still desirable, I suggest amending this by adding an "Edit on GitHub" link at the bottom of a page instead, as is custom with a fair few other static site generator packages and other documentation generators alike. |
Good catch. Tho we should switch this up completely and just have a If we want to keep an "Edit this page" in the default theme, then that control should be in the page area not the nav bar area. |
</li> | ||
{%- endif %} | ||
{%- endblock %} | ||
{%- block next_prev %}{%- endblock %} | ||
|
||
{%- block repo %} | ||
{%- if page and page.edit_url %} | ||
<li class="nav-item"> | ||
<a href="{{ page.edit_url }}" class="nav-link"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a href="{{ page.edit_url }}" class="nav-link"> | |
<a href="{{ config.repo_url }}" class="nav-link"> |
{%- elif config.repo_name == 'GitLab' -%} | ||
<i class="fa-brands fa-gitlab"></i> {% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %} | ||
<i class="fa-brands fa-gitlab"></i><span class="d-lg-none ms-2">{% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<i class="fa-brands fa-gitlab"></i><span class="d-lg-none ms-2">{% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</span> | |
<i class="fa-brands fa-gitlab"></i><span class="d-lg-none ms-2">{{ config.repo_name }}</span> |
{%- elif config.repo_name == 'Bitbucket' -%} | ||
<i class="fa-brands fa-bitbucket"></i> {% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %} | ||
<i class="fa-brands fa-bitbucket"></i><span class="d-lg-none ms-2">{% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<i class="fa-brands fa-bitbucket"></i><span class="d-lg-none ms-2">{% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</span> | |
<i class="fa-brands fa-bitbucket"></i><span class="d-lg-none ms-2">{{ config.repo_name }}</span> |
|
||
{%- block repo %} | ||
{%- if page and page.edit_url %} | ||
<li class="nav-item"> | ||
<a href="{{ page.edit_url }}" class="nav-link"> | ||
{%- if config.repo_name == 'GitHub' -%} | ||
<i class="fa-brands fa-github"></i> {% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %} | ||
<i class="fa-brands fa-github"></i><span class="d-lg-none ms-2">{% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<i class="fa-brands fa-github"></i><span class="d-lg-none ms-2">{% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</span> | |
<i class="fa-brands fa-github"></i><span class="d-lg-none ms-2">{{ config.repo_name }}</span> |
{%- elif config.repo_name -%} | ||
{% trans repo_name=config.repo_name%}Edit on {{ repo_name }}{% endtrans %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{%- elif config.repo_name -%} | |
{% trans repo_name=config.repo_name%}Edit on {{ repo_name }}{% endtrans %} | |
{%- elif config.repo_name -%} | |
{{ config.repo_name }} |
Other docs packages often have edit buttons in the page area (indeed), and have it optional or to be enabled manually. I think that's a solid option, and agree it should be a page area element. In that sense (and I don't mean this snarkily), a navigation bar is for navigation. Anything not navigation or locating of pages like a navigation is possibly better off in the footer or page content. |
I think these are good choice, as it would make the navbar lighter ...except for the "search". Searching is so crucial that it deserves to be clearly visible IMHO, including the "Search" label, not only the small icon. The prev/next/edit indeed better belong to the page than the navbar. |
Refs #3680
next
/prev
controls.search
&repo
controls, except in expanded menu.expanded menu