How can I change the standard horizontal topmenu to a vertical dropdown menu?

I’m trying to change the standard horizontal topmenu in Magento 2 to a vertical menu like this:

https://i.stack.imgur.com/SGMNO.png

Source: https://www.portotheme.com/magento2/porto/demo29_en/

I know that topmenu.phtml is responsible for the menu but I’m struggeling to understand the logic behind it so that I can change the horizontal categories into a dropdown. Is it even possible? Any help would be very appreciated. Thank you.

submitted by /u/hapfr
[link] [comments]