@christopher-adolphe
Posted
Hi @Jeth0214,
You did a great job for this challenge. š I have check your solution from your git repository and everything is nice and neat there. š I like the approach you have used for the portfolio. I only have the following suggestions.
- You should refrain from using
id
selectors in your CSS because it hinders on the reusability of style. - I saw that you are handling responsive images via JavaScript. I recently found that there is nice alternative to achieve the same result. Maybe you can give it a try. š Read more here
<picture>
<source media="(max-width: 799px)" srcset="elva-480w-close-portrait.jpg">
<source media="(min-width: 800px)" srcset="elva-800w.jpg">
<img src="elva-800w.jpg" alt="Chris standing up holding his daughter Elva">
</picture>
- You might want to wrap asynchronous logics in a
try...catch
block like this:
async function renderProjectsToTheView(width) {
try {
let response = await fetch("../assets/json/projects.json");
if (response.status === 200) {
data = await response.text();
} else {
throw new Error(`Error: ${response.statusText}`);
}
projects = JSON.parse(data);
device = checkDevice(width);
getProjectsData(projects, device);
} catch (error) {
console.log(error);
}
}
And yes, you can absolutely use this as your portfolio website but I would suggest you to spice it up a little bit more so that you come up with something unique because I think many have had the same idea of using this project as their own portfolio. š
I hope this helps.
Keep it up.
Marked as helpful
@Jeth0214
Posted
@christopher-adolphe Thanks for those tips. I learned new things. I will continue to create frontend challenge to put on my my portfolio. Then, I will put some changes to make my portfolio different from this one. Thanks
@christopher-adolphe
Posted
Hi @Jeth0214,
I'm happy to help š. I have yet to try the responsive image approach but I see you've already applied it. Well done!
Yes, that's the way to go š. I need to set myself some free time so that I can start my second challenge (it's a bit overdue now š ) and also think about my own portfolio too.
Best regards.