Skip to content

This is a responsive URL shortener with shortcode API. Features include shortening valid URLs, copy-to-clipboard functionality, and error messaging.

Notifications You must be signed in to change notification settings

Drougnov/url-shortening-api-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Shortly URL shortening API Challenge solution

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.

Table of contents

Overview

The challenge

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

Screenshot

Url shortening api's screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow

What I learned

  • Get a element position using window.scrollY and getBoundingClientRect()
  • Scroll to specific position using window.scrollTo()
  • Foucs input field using .focus()
  • Check element's markup using .outerHTML
  • Copy value to clipboard using navigator.clipboard.writeText()

Continued development

  • Prevent users from shortening the already existed link

Useful resources

Author

About

This is a responsive URL shortener with shortcode API. Features include shortening valid URLs, copy-to-clipboard functionality, and error messaging.

Topics

Resources

Stars

Watchers

Forks