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

Sidebar menu - cant find how to... #59

Open
learningtime2025 opened this issue Nov 14, 2024 · 6 comments
Open

Sidebar menu - cant find how to... #59

learningtime2025 opened this issue Nov 14, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed ui

Comments

@learningtime2025
Copy link

Hi, i installed a new version of grav with admin, then i installed this theme from " Themes".
i need pages structure as this

01.home
02.first
-001.first_and_one
-002.first_and_two
03.2nd
-001.2nd_and_one
-002.2nd_and_two
04.contacts

all pages uses default.md

questions:

  1. i cant made all submenus items visible on page load.
  2. Why i need "1"? when submenus collapsed - to open them user must click on arrow, text itself or space between text and arrow is inactive. this is annoying for users especially on mobile devices.
@pmoreno-rodriguez
Copy link
Owner

Hello
In response to your questions:

  1. Are you perhaps referring to the fact that when you click on a child element, the parent menu on which it depends remains open?
  2. This is something I want to change in future versions. In the first versions of the theme, clicking on a parent menu would drop down the submenu, but some users suggested that the parent menu could also have the function of linking to a page, so I separated the link logic into the menu text on one side and the arrow on the other.

But I noticed that empty space between the menu text and the arrow.
If you want to help with this, I'd be happy, because I want to change it but I don't have much time right now. It would just be a few css tweaks, and maybe changing some of the navigation logic.

@pmoreno-rodriguez pmoreno-rodriguez self-assigned this Nov 16, 2024
@pmoreno-rodriguez pmoreno-rodriguez added enhancement New feature or request help wanted Extra attention is needed ui labels Nov 16, 2024
@learningtime2025
Copy link
Author

no.
When page loads - the default behavior is top level menu items collapsed.
When user click on it - it wont open. only click on arrow will open it.
As workaround i was hope to make all top level menu items is always expanded. it was possible about a year ago, when i test that theme for a first time.
i tried to solve it, but my css knowledge is not enough for that.

also, i found some things that could looks better. i'll make a list of them later.

@learningtime2025
Copy link
Author

Hi, some notes after update to 2.3.2

1---

sidebar.html.twig line 39 - change to something like:
<h2>{{ 'EDITORIAL.DEFAULT.MENU_TEXT'|t }}</h2>

2---

still can't open submenus in chrome with click on text of menuitem. (works with click only on arrow)

3---

base.html.twig after line 69 - add:

        {% block contentfooter %}
            {% include 'partials/contentfooter.html.twig' %}
        {% endblock %}

and create that file too... (can it be untouched with updates?)

@pmoreno-rodriguez
Copy link
Owner

1---
sidebar.html.twig line 39 - change to something like:

{{ 'EDITORIAL.DEFAULT.MENU_TEXT'|t }}

I've changed this for new version. Thanks

2---
still can't open submenus in chrome with click on text of menuitem. (works with click only on arrow)

The logic of menu items has changed since version 2.1.0. If the menu item is routable and has a link, the page it refers to will be displayed, if not it will do nothing, and thus the submenu will be opened with the arrow. Submenus can only be opened by clicking the arrow icon.

This is not wrong, I just need some time to change the way the menu works, which involves changes to the stylesheets, the navigation macro and the associated javascript code.

3---
base.html.twig after line 69 - add:

    {% block contentfooter %}
        {% include 'partials/contentfooter.html.twig' %}
    {% endblock %}

and create that file too... (can it be untouched with updates?)

{% include 'partials/footer.html.twig' %} is already included in the sidebar.html.twig file. For consistency with the original theme, a footer is not included outside of the sidebar.

@learningtime2025
Copy link
Author

Is the consistency with the original theme are the best choice?
I think - let it go the own way, and maybe it grows to something better.
For example - downloads.
In my project i need to put anydesk.exe file on my site,

because a unexperienced user might download it from the some fake site (there was such things when search engine shows some anydesk.com.something.com on the first page of search results), especially when you point them via phone.

so it would be good to see headings with description field.
and. maybe, twig will process not the header, but page content for making a good looking table (not sure that its possible in grav)

this was an example - some things could became better.
just like another footer. i made additional one for some cookies explaination links, and other stuff that will not fit to the sidebar.

@pmoreno-rodriguez
Copy link
Owner

HI @learningtime2025
This issue already has a few topics mixed in other than the title. Could you please separate these final comments (about the footer, headings with description field, etc)?
It would be much better for me to be able to improve the issue if I look at these problems separately. Please delete the comments that are not related to the sidebar menu and put them in other issues.
I won't be able to update it much for another 3-4 weeks, but I'll put all these suggestions on my to-do list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed ui
Projects
None yet
Development

No branches or pull requests

2 participants