Skip to content

Align sun/moon icon in theme toggle with navbar items - #212

Open
delize wants to merge 24 commits into
gurusabarish:masterfrom
delize:align-theme-toggle-in-navbar
Open

Align sun/moon icon in theme toggle with navbar items#212
delize wants to merge 24 commits into
gurusabarish:masterfrom
delize:align-theme-toggle-in-navbar

Conversation

@delize

@delize delize commented Jan 22, 2025

Copy link
Copy Markdown
Contributor

This PR attempts to align the theme toggle selector with the rest of the navbar items, for a more professional look.

For example:
https://hugo-profile.netlify.app/
Screenshot 2025-01-22 at 6 26 06 PM

To:

Widescreen
Screenshot 2025-01-22 at 6 27 36 PM

Mobile / iPad
Screenshot 2025-01-22 at 6 28 23 PM

Nothing wrong with the current implementation, but the off-set theme toggle really bothers me UI / UX wise.

Comment thread static/css/header.css
Comment on lines 13 to 17
header .navbar .navbar-nav a {
color: var(--text-color) !important;
display: flex;
align-items: center; /* Vertically align all items */
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like this fix, definitely bothered me as well. However, with this implementation on mobile, the hamburger menu items are all aligned to the left (they were aligned to the center before). Personally, I like that aligned more, which thus would require this change

Suggested change
header .navbar .navbar-nav a {
color: var(--text-color) !important;
display: flex;
align-items: center; /* Vertically align all items */
}
header .navbar .navbar-nav a,
header .navbar .navbar-nav div {
color: var(--text-color) !important;
display: flex;
align-items: center; /* Vertically align all items */
justify-content: center /* Horizontally align all items */;
}

This ofc is up to @gurusabarish, however they see fit

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hey, not opposed to implementing this in the PR. Originally I only checked how this looked on Desktop, not mobile, but noticed it several weeks after the PR. I just was okay to live with it. When I'm back at a computer I'll see about trying to incorporate that change in to the PR.

Comment thread static/css/header.css Outdated
Comment thread static/css/header.css Outdated
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.