Created
August 5, 2025 14:54
-
-
Save digitalWestie/722fc8c28e10fd1c3ce23081e7d4d693 to your computer and use it in GitHub Desktop.
hamburger menu strategy for erb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <details class="relative [&>summary::-webkit-details-marker]:hidden [&>summary::marker]:hidden [&>summary]:list-none user-menu [&[open]>summary]:text-gray-600"> | |
| <summary class="cursor-pointer text-gray-400 border border-gray-400 rounded-full p-2" data-action="mouseenter->utility#openSummary toggle->utility#toggleSummaryStyle"> | |
| <%= user_icon("w-6 h-6 text-inherit") %> | |
| </summary> | |
| <div class="absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-50 border border-gray-200"> | |
| <%= link_to "View Profile", profile_path, class: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" %> | |
| <%= link_to "Edit Profile", edit_profile_path, class: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" %> | |
| <%= link_to "Settings", edit_user_registration_path, class: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" %> | |
| <%= link_to "Sign out", destroy_user_session_path, data: { turbo_method: :delete }, class: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" %> | |
| </div> | |
| </details> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment