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

Burger menu #47

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Burger menu #47

wants to merge 5 commits into from

Conversation

awalsh3
Copy link

@awalsh3 awalsh3 commented Aug 3, 2023

ISSUE: #6

This proposed PR adds a burger menu with drop-down links for mobile rendering. This uses tailwind css and plain vanilla javascript.

A few questions/notes:

  • It needs some styling decisions. I've left it as close to the main navbar as possible for now. Happy to adjust where needed.
  • The drop-down links inherit the same classes used by the _links.html.erb shared partial. To change the styling we could either add another partial for mobile links or add code to the existing links partial if any adjustments are needed?
  • I am having a little formatting issue with the drop-down vs the margin of the existing page. I am new to Turbo and not sure if there is something I am missing in the formatting. A quick fix is adding an id to the application template but I can work on a better solution.
  • Testing has all been manually done. What is the protocol for testing?

A start for now! Please let me know what can be improved.

Photos below:

Screenshot 2023-08-03 at 17 57 03.

Screenshot 2023-08-03 at 17 57 13.

Screenshot 2023-08-03 at 17 57 25

@@ -0,0 +1,26 @@
document.addEventListener('turbo:load', function () {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at this point this is just vanilla js stored in a folder for stimulus controllers.

why don't you use an actual stimulus controller? :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point! I am new to stimulus but I should follow the convention. I will work on it sometime this week. Thanks!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello @awalsh3 thanks for taking this issue.

I would like to suggest an alternative path at the same time with less JS or maybe none. the details/summary html tags can be used to create dropdowns. This is What Basecamp uses in Hey as an example

Here is an article on that subject but they are also several others available :

https://dev.to/ayushn21/details-summary-tags-html-s-best-kept-secret-4ak4

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok! I can take a look. So would you want something like this then? Talks, Speakers, Github icon and contribute button to dropdown on the right side?

Screenshot 2023-08-07 at 13 57 12

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I mentioned Basecamp/Hey it was more for the technical part not really the way it looks. Your personal site looks clean I am sure you can make a good judgement on what looks best. I don't have a very strong option on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants