Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Easybank landing page solution

This is a solution to the Easybank landing page challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • See hover states for all interactive elements on the page

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • SASS - Sass StyleSheet language
  • Vanilla JS

What I learned

I learned how to make use of the SASS stylesheet language in a real time project. And also how to make proper use of the CSS grid, and CSS flexbox properties in an actual website design proces.

I learned about seperation of concerns in SASS, placing styles of similar intent in thesame sass file.

I also learned how to implement animations in a website design, as seen in the sass snippet below

.has-fade{
    visibility: hidden;
}

@keyframes fadeIn {
    from{
        visibility: hidden;
        opacity: 0;
    }

    1%{
        visibility: visible;
        opacity: 0;
    }

    to{ 
        visibility: visible;
        opacity: 1;
    }
}

.fade-in{
    animation: fadeIn 200ms ease-in-out forwards;
}


@keyframes fadeOut {
    from{
        visibility: visible;
        opacity: 1;
    }

    99%{
        visibility: visible;
        opacity: 0;
    }

    to{ 
        visibility: hidden;
        opacity: 0;
    }
}

.fade-out{
    animation: fadeOut 300ms ease-in-out forwards;
}

Appart from SASS, i learned how to use JavaScript to affect or implement a mobile navigation with an overlay as seen in the snippet below

const mobileBtn = document.querySelector("#mobileBtn");
const header = document.querySelector(".header");
const body = document.querySelector("body");
const fadeElements = document.querySelectorAll(".has-fade");

mobileBtn.addEventListener('click', function(){

    if(header.classList.contains('open')){
        body.classList.remove('no-scroll');
        header.classList.remove('open'); //close mobile menu

        fadeElements.forEach(function(element){
            element.classList.remove('fade-in');
            element.classList.add('fade-out');
        });

    }else{ // open mobile menu
        body.classList.add('no-scroll');
        header.classList.add('open');

        fadeElements.forEach(function(element){
            element.classList.remove('fade-out');
            element.classList.add('fade-in');
        });
    }
  
});

I also learned about the CSS positioning properties.

For more information about SASS, i'll recommend the official SASS documentation SASS documentation to learn more.

Continued development

In my future projects, i'll continue focusing on the use of sass in modern website designs and also how to make use of javascript in different areas of my design.

Useful resources

Author

About

This is a solution to the Easybank landing page challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages