italanta / elewa-group

5 stars 105 forks source link

Make the header dynamic (light & dark mode) #406

Closed IanOdhiambo9 closed 1 year ago

IanOdhiambo9 commented 1 year ago

Make the header dynamic (light & dark mode)


Quick links: Summary | Description | Technical-Analysis | Acceptance-Criteria


Summary

As a user I want a header that is visible on both light and dark backgrounds

Description

The header component can be found in the layoutsModule. It's only added on the elewa-group-main-page.

To tackle this issue you'll need to add some dynamic classes to the header based on the active page, this classed will determine whether the header appears in light or dark mode. This logic should be done on the header component. Use Angular router to get active page, write a function that returns a class(es) based on page. Check on the full design linked below which pages have light header and dark header.

The header needs to appear as shown below

Screenshot 2023-03-06 at 09 23 13

Screenshot 2023-03-06 at 09 23 06

Please take note of all the design features

Link to full design:

https://xd.adobe.com/view/7b72572b-b40a-4618-bfa6-5500ab28f13b-2e21/grid

logo links

https://res.cloudinary.com/dyl3rncv3/image/upload/v1675690297/elewa-group-website/Icons/SVG/_Logo/Logo_Black_cndtcl.svg

https://res.cloudinary.com/dyl3rncv3/image/upload/v1675690297/elewa-group-website/Icons/SVG/_Logo/Logo_White_arvoyx.svg

Technical Analysis

This feature can be found in libs/elements/layout

Acceptance Criteria

  1. When rendered the component is pixel perfect compared to the design above.
  2. The component is clean and does not have more than 50 lines
  3. The component SCSS uses CSS variables for colour, font, ... Connected to the main style.scss
  4. The code is isolated to the libs/page/home package, unless a justified reason is specified.
  5. The component is aligned using CSS flex
  6. The design is responsive for screen, tablet and phone
  7. The image renders fast and has multiple srcsets
marcokumu commented 1 year ago

@IanOdhiambo9 kindly review