Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

All comments

  • Alvaro 70

    @BrazilianMemeMaster

    Submitted

    I'm just starting in WebDev, so I found it challenging enough. I could've used fetch to import the data.json file, but I couldn't figure out what logic would I have to use to place the data. So I just hardcoded the data into the html file. The CSS part I was probably the easiest part for me, but I'd appreciate any comments/suggestions on that! The most difficult part as I mentioned was the logic behind importing the json data to the html file, I really don't know what to do after i fetched it.

    @marianefelix

    Posted

    Hey, congrats on completing the challenge!

    First of all, I think you could center the main content on the page, following the design. How about the justify-content: center?

    Now, about the logic to show the data in html, I did this:

    • Used the fetch API to get the data from json file;
    • When I got the data, just called the listener function passing it. Then, since we know witch is the active link and the keys "daily", "monthly" and "weekly" are in the timeframes object in the data, you can use the active link to access the object that should be shown in the page.

    I don't know if this help, but I hope so. You can also check out my code on github. :)

    Marked as helpful

    0