Skip to content

URL shortening landing page, built with Astro. Paste your link and shorten them as easy as 1, 2, 3! Powered with shrtcode API

Notifications You must be signed in to change notification settings

hny-codes/shortly-landing-page

Repository files navigation

Shortly Landing Page

A landing page for Shortly, where you can shorten your links/URLs with ease.

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 purpose of this challenge is to build a static landing page and replicate the given style sheet as close as possible. This project is built using Astro.

Shortened links are created utilizing the Shrtcode API. Requests are made via the built-in fetch API.

const API_BASE = 'https://api.shrtco.de/v2/';

...

export default async function getShortenLink(link: string) {
  const request: Promise<API_RESPONSE> = (await fetch(`${API_BASE}shorten?url=${link}`)).json();
  return request;
}

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

Built with

Useful Resources

About

URL shortening landing page, built with Astro. Paste your link and shorten them as easy as 1, 2, 3! Powered with shrtcode API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published