Design comparison
Solution retrospective
Hi! This is my version of the Space Tourism Website! I hope you'll like it. It's a single page application that uses Javascript to display the others pages with cool animations. The website is completely responsive. Enjoy!
Community feedback
- @MaxTarasevichPosted about 2 years ago
Hi Nicolas!
Great job! The animations look great! Especially on the CREW page.
Add a background color for the body - dark, due to the fact that the default body has a white background, and it takes time to load background pictures - a characteristic flashing appears, not very pleasing to the eye!
It's great that you decided to build your pages dynamically with JavaScript!
But, you have a lot of repetition in the code, for example: you create an element, assign a class to it, insert text content, and so many, many times!
Try to create a function that will do this! For example:
function createElement (el = 'div', className='',text=''){ let element = document.createElement(el) element.classList.add(className) element.innerText = text return element }
Then you can call this function as much as you like, creating the elements you need
const main = createElement('main') const h3 = createElement('h3', 'title', ' title text') const strong = createElement('strong', 'classForStrong', 'text')
I hope my feedback was helpful!
Marked as helpful0@Nico-2bPosted about 2 years ago@MaxTarasevich Hi! Thank you for your feedback! It will really helps me improve my skills!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord