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

Links in extended menu layout get unneeded button with sphinx_rtd_theme v1 #1278

Open
MuellerSeb opened this issue Jan 15, 2022 · 2 comments · May be fixed by #1279
Open

Links in extended menu layout get unneeded button with sphinx_rtd_theme v1 #1278

MuellerSeb opened this issue Jan 15, 2022 · 2 comments · May be fixed by #1279
Labels
Bug A bug Needed: replication Bug replication is required

Comments

@MuellerSeb
Copy link

Problem

We have been using this theme since years and I just saw, that you finally released a v1 and we wanted to try it. Unfortunately we have added links to the menu by modifying _templates/layout.html in the following way:

{% extends "!layout.html" %}
  {% block menu %}
    <p class="link caption"><span class="link caption-text">Documentation</span></p>
    {{ super() }}
    <br />
    <p class="link caption"><span class="link caption-text">Links</span></p>
    <a href="https://github.com">GitHub</a>
  {% endblock %}

This was totally fine with v0.5 but with v1 all links get a button with no function added to the text:

<a href="https://github.com"><button class="toctree-expand" title="Open/close menu"></button>GitHub</a>

Is there a way to reproduce the old behavior?

Reproducible Project

https://github.com/GeoStat-Framework/GSTools

@MuellerSeb MuellerSeb added Bug A bug Needed: replication Bug replication is required labels Jan 15, 2022
MuellerSeb added a commit to GeoStat-Framework/GSTools that referenced this issue Jan 15, 2022
@nienn
Copy link
Contributor

nienn commented Jan 17, 2022

Hi @MuellerSeb, thank you for reporting this.

In v1 the Open/close menu button seems to be incorrectly added to some toctree items. I'll submit a PR to fix this.
While it's not merged however, there is one quick fix you can try by nesting your link inside an ul:

{% block menu %}
  <p class="link caption"><span class="link caption-text">Documentation</span></p>
  {{ super() }}
  <br />
  <p class="link caption"><span class="link caption-text">Links</span></p>
  <ul>
    <Li><a href="https://github.com">GitHub</a></Li>
  </ul>
{% endblock %}

Please let me know if this works for you.

@nienn nienn linked a pull request Jan 17, 2022 that will close this issue
@MuellerSeb
Copy link
Author

Works fine! Thanks.

MuellerSeb added a commit to GeoStat-Framework/GSTools that referenced this issue Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug Needed: replication Bug replication is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants