- Clone the repository
- Join to the correct path of the clone
- Install LiveServer extension from Visual Studio Code [OPTIONAL]
- Click in "Go Live" from LiveServer extension
- Clone the repository
- Join to the correct path of the clone
- Open index.html in your favorite navigator
- Clone the repository
- Join to the correct path of the clone
- Execute:
yarn install
- Execute:
yarn dev
I made a website about car repair, but basically what I did was to take a design from the internet and implement it on my own without seeing the original code. All this was because I wanted to keep practicing CSS.
- CSS3
- Typescript
- HTML5
https://www.diegolibonati.com.ar/#/project/Automotive-Car
2024-01-11.12-49-14.mp4
With btnOpenNav
we get the button that will open the ship, with the btnCloseNav
button we will close the ship and finally with the navContainer
it will be that we will assign the class to open the ship or close:
const btnOpenNav = document.getElementById("btnOpen");
const btnCloseNav = document.getElementById("btnClose");
const navContainer = document.querySelector(".header_container-nav");
At this time we assign the click event. Depending on the button, a class will be added or removed from navContainer
, whether or not the btnOpenNav
button will be shown and not the btnCloseNav
will be shown or not:
btnOpenNav.addEventListener("click", ()=>{
navContainer.classList.add("show-nav");
btnOpenNav.classList.add("noshow-btn");
btnCloseNav.style.display = "block";
});
btnCloseNav.addEventListener("click", ()=>{
navContainer.classList.remove("show-nav");
btnOpenNav.classList.remove("noshow-btn");
btnCloseNav.style.display = "none";
});