This is a solution to the Shortly URL shortening API Challenge challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the site depending on their device's screen size
- Shorten any valid URL
- See a list of their shortened links, even after refreshing the browser
- Copy the shortened link to their clipboard in a single click
- Receive an error message when the
form
is submitted if:- The
input
field is empty
- The
- Solution URL: Frontend Mentor Solution
- Live Site URL: Url Shortly
- Semantic HTML5 markup
- SCSS custom properties
- Flexbox
- Mobile-first workflow
- ReactJs with Typescript
One thing I learned from this project is that there are ways to add interesting
CSS styling without having to add a empty html element by using the CSS
selector ::after
or ::before
.
For example, that blue line at the bottom of the card was created using this snippet:
.card {
&:not(:last-child):after {
content: '';
width: 0.5rem;
height: 5rem;
background: $cyan;
position: absolute;
top: 100%;
left: 49%;
z-index: 0;
}
}
- MDN Web Storage API - This helped me create show stortend urls the user have submitted in the past. Local storage is great when you need persistent data to be loaded on a website. learning this concept.
- Frontend Mentor - @kirontoo
- LinkedIn - Amy Nguyen-Dang