It's been a long time since I made the last challenge from FrontEndMentor.
It was fun to make.
Still I could not figure out how to use my json file with fetch and I tried many ways but nothing worked, so I cheated a bit and just created an object containing data.json
Last challenge from Frontend Mentor. It was really difficult. It is still a bit glitchy, it looks like the first time you're loading the page you could not display countries details, but after refreshing it seems to be working properly...
Anyway thanks a lot Frontend Mentor for giving us the opportunity to create so many projects, I really feel like I improved since I began, and many thanks to the community for the kind comments and help.
I guess I'll now learn how are SASS and React working.
Have a great day everybody 🤗
Edit : Added night mode, thank you @Palgramming for helping me being less lazy
It was really interesting playing around with APIs. Will try other APIs to improve.
It is working for me, let me know if everything works properly on your computer too 😊
(I only have like 900 calls left on ipify so it might not be working anymore soon)
I tried to make some small discreet animations to give the website a smooth look.
You can control the slider with arrow keys.
I like the overall look of it but I'm a bit uncomfortable with big pictures and responsive... I don't really like how I made it responsive but I could not find a better way.
Nothing new with this one, another landing page, pretty fun to make because of all the flex elements.
If you, like me, are struggling with the header picture, don't forget you need to set a position to your div (I used position: relative) to give it a Z-index. Makes everything way simpler.
I did not expect this project to be so difficult. Would it be easier using a framework ? I don't know any yet because I would like to be good with Vanilla JS before using something else.
I had to think a lot with this one, like how to prevent user from :
typing more than one operator at a time ( e.g. 7++2)
using multiple dots on a single number ( e.g. 3.00.5)
typing a dot without a number before ( e.g. .3)
I also had an idea for the theme switcher :
I'm putting all my DOM elements into an array, and interating through it with a forEach(), this way I'm using one line of code instead of one line for each DOM element I wish to change.
I made the toggle by myself this time, without getting any help or ressources on the internet, I'm pretty proud of it.
I used the .replace(/x/g, "*"); function, which replaces all the x by *, which makes it more readable for the user.
It would be a nice addition to allow the user to type on his keyboard instead of clicking.
However I have no clue how to manage the responsive part (everything breaks below 500px), do you know if there is a way to stretch the whole phone part like you would do with an img having a width: 90% property ?