Home Projects Portfolio Dashboard Export PDF Log in

Enhancing Estetica with Dark Mode and Navbar Improvements

This post details the recent updates to the Estetica project, focusing on the implementation of dark mode and enhancements to the navigation bar, aimed at improving user experience and accessibility.

The Goal

The primary goal was to provide users with the option to switch to a dark mode theme, reducing eye strain and improving visibility in low-light conditions. Simultaneously, improvements to the navigation bar were intended to streamline user navigation and enhance the overall site usability.

Implementing Dark Mode

The implementation of dark mode involved several steps, primarily revolving around CSS. The approach focused on creating a set of CSS variables that define the color scheme for both light and dark modes. A JavaScript function toggles a class on the root element, switching between the two sets of color variables.

:root {
  --bg-color: #ffffff; /* Light mode background */
  --text-color: #000000; /* Light mode text */
}

.dark-mode {
  --bg-color: #000000; /* Dark mode background */
  --text-color: #ffffff; /* Dark mode text */
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

Navbar Enhancements

The navigation bar was updated to improve responsiveness and clarity. Changes included:

  • Simplifying the menu structure.
  • Ensuring proper rendering on various screen sizes using media queries.
  • Improving the contrast and visibility of navigation links.

These improvements provide a better user experience on both desktop and mobile devices.

Key Takeaways

Implementing dark mode and improving navigation involves careful planning and attention to detail. By using CSS variables, it's possible to create a flexible and maintainable system for managing color schemes. Responsiveness is key. Always test changes across multiple devices to ensure a consistent user experience.


Generated with Gitvlg.com

Enhancing Estetica with Dark Mode and Navbar Improvements
AGUSTINΑ ΜΕΝΑ

AGUSTINΑ ΜΕΝΑ

Author

Share: