https://github.com/raphico/space-tourism
Frontend Mentor - Space tourism website solution
https://github.com/raphico/space-tourism
framermotion reactjs
Last synced: 3 days ago
JSON representation
Frontend Mentor - Space tourism website solution
- Host: GitHub
- URL: https://github.com/raphico/space-tourism
- Owner: Raphico
- Created: 2023-03-25T23:29:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-04T11:09:07.000Z (over 2 years ago)
- Last Synced: 2025-01-19T12:14:27.001Z (9 months ago)
- Topics: framermotion, reactjs
- Language: JavaScript
- Homepage: https://space-tourism-raphico.vercel.app
- Size: 2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Frontend Mentor - Space tourism website solution
This is a solution to the [Space tourism website challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/space-tourism-multipage-website-gRWj1URZ3). Frontend Mentor challenges help you improve your coding skills by building realistic projects.
## Table of contents
- [Overview](#overview)
- [The challenge](#the-challenge)
- [Screenshot](#screenshot)
- [Links](#links)
- [Built with](#built-with)
- [What I learned](#what-i-learned)
- [Author](#author)## Overview
### The challenge
Users should be able to:
- View the optimal layout for each of the website's pages depending on their device's screen size
- See hover states for all interactive elements on the page
- View each page and be able to toggle between the tabs to see new information### Screenshot

### Links
- Solution URL: [Add solution URL here](https://github.com/Raphico/space-tourism)
- Live Site URL: [Add live site URL here](https://space-tourism-nine-hazel.vercel.app/)### Built with
- React
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
- Framer-motion### What I learned
Dynamic imports in react
```jsx
const imgSrc = await import(some_path).default
```dynamic variable in react based on break point
```jsx
const mediaQuery = "(min-width: 52em)"
const imgSrc = await import(`${images[window.matchMedia(mediaQuery).matches ? 'portrait' : 'landscape']}/* @vite-ignore */`);
```## Author
- Frontend Mentor - [@raphico](https://www.frontendmentor.io/profile/raphico)
- Twitter - [@Raphico_OA](https://www.twitter.com/Raphico_OA)