[Hosted-Portals] Add a landing page to the name of the dropdown menu

Morten Høfft mhoefft at gbif.org
Wed Feb 24 09:42:19 UTC 2021


It isn't possible to do so. Most notably because it wouldn't work well on tablets.

On tablets you wouldn't be able to trigger the dropdown but would instead follow the link.
We could of course then try to differentiate between touching the arrow vs touching the text, but the click target area would be really small and make for a bad UI in my opinion.

On laptops/desktop there is the opposite issue, where there is a fair chance no one will ever notice that the top level item is clickable. This isn't an issue if all you do on that page is a short intro with links to the subpages, but if you have more content then it is a shame that laptop users won't notice.

It also put restraint on what we can do in the future if we decide to trigger dropdowns on click instead of the current hover. And it would make mobile navigation more convoluted if we decided to collapse menu items in the burger (those 3 lines) menu.

I see these options

Options 1
Keep the top level link and remove the dropdown.
The landing page would then link to the items previously in the dropdown (you could use a documentation<https://hp-base-theme.gbif-staging.org/layout/documentation> layout or compose a landing page using features<https://hp-base-theme.gbif-staging.org/layout/compose>)

Option 2
Create a dropdown with the content

  *   MenuItem
     *     Introduction (this would be the page you otherwise had attached to MenuItem)
     *     subitem 1
     *     subitem 2

And finally we can of course reconsider if we should support it if there is a general interest in it.

I will be happy to discuss workarounds for your particular task - just create an issue in your repo or write me an email.

Best
Morten
________________________________
From: Hosted-Portals <hosted-portals-bounces at lists.gbif.org> on behalf of Camila Andrea Plata Corredor <cplata at humboldt.org.co>
Sent: Wednesday, February 24, 2021 2:48 AM
To: hosted-portals at lists.gbif.org <hosted-portals at lists.gbif.org>
Subject: [Hosted-Portals] Add a landing page to the name of the dropdown menu

Dear all,

We have a question about the menu structure set at _config.yml, It is possible to add a landing page to the name of the dropdown menu?

For example, we would like to add the option to click in Layouts  (https://hp-base-theme.gbif-staging.org/) and open a page, for that we tried using the following structure, and other variants, but it didn't work:

- text: Name
  href: /Name
  menu: # Dropdown menu (one level deep only)
  - text: ...

[https://lh5.googleusercontent.com/9BQRnT2jw8OZ_cBsoe6iAhpi13uZn1sHPK38FVvUotwC3WkDItvWa2kbi51B-JsEUouCYbqLM3-gXjCm_UDgn49jfBlJX0r0Yd2Ni8k5KuiT9bevfKXEMiml-kLA73YeOfeL9HJ1]

It is possible to have such a landing page? How can we do it?

Thank you in advance,


--
Camila Andrea Plata Corredor
Equipo Coordinador                                                                                   Sistema de Información sobre Biodiversidad de Colombia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gbif.org/pipermail/hosted-portals/attachments/20210224/e161a96e/attachment.html>


More information about the Hosted-Portals mailing list