space

Frontend Mentor - Space tourism website

Design preview for the Space tourism website coding challenge

Frontend Mentor - Space tourism website solution

This is a solution to the Space tourism website 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:

Screenshot

My process

Built with

What I learned

I learnt a lot through this project. this is my first time using some accessibity and aria features such as aria-control, aria-label, aria-hidden etc. I also learnt how to use the ‘data-‘ feature.

I learn new styling poperties like cramp, minmax, etc. For example, clamp can be used to set a font size to change throught the device sizes.

h1{
  font-size: clamp(90px, 10vw, 150px);
}

I also learnt how to use @support to implement stying that might not work on all devices, like ‘backdrop’. see example below;

@supports (backdrop-filter: blur(1.5rem)){
    .navigation{
        background: hsla(0, 0%, 100%, 0.034);
        backdrop-filter: blur(1.5rem)
    }
}

I also learnt how to call a clicked event and also trace it back to its parent up to the body

function changeContent(e){
    const targetTab = e.target;     //clicked tab
    const targetArticle = targetTab.getAttribute("aria-controls");  //Clicked tab's article
    const targetImages = targetTab.getAttribute("data-image");  //Clicked tab's image

    const tabContainer = targetTab.parentNode;
    const sectionContainer = tabContainer.parentNode;
    const mainContainer = sectionContainer.parentNode;
}

Continued development

Still trying to wrap my head around using some of the Javascript selector like this - [#${targetArticle}]). I still have a lot to improve on in javascript.

Useful resources

Author

Acknowledgments

A big thanks to Kevin Powell on Scrimba.com. His lecture really helped me alot before I started this challenge.