Skip to content

natalia-sampaio/shortly

Repository files navigation

Shortly

HTML 5  CSS  Vue.js  JavaScript 

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

Screenshots

Links

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Compile and Minify for Production

npm run build

Lint with ESLint

npm run lint

My process

Built with

  • Semantic HTML5 markup
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • Responsive layout
  • Vue.js - JS framework

What I learned

This project was my first contact with Vue.js, I learned about the basics of list rendenring and event handling with Vue.js.

<template>
    <div class="shorten">
        <div class="shorten-form">
            <div class="shorten-form-box">
                <input v-model="url" type="url" placeholder="Shorten a link here..." 
                aria-label="input for url to be shortened"
                :class="['shorten-form__input', error ? 'error-input' :'']">
                <span v-if="error" class="error-message">Please add a link</span>
            </div>
            <button type="button" class="button button--shorten-form" 
            @click.prevent="shorten">
                <span class="link link--white">Shorten It!</span>
            </button>
        </div>
    </div>
</template>

Continued development

In future projects I want to improve the usage of Vue.js, especially about best practices with this framework.

Useful resources

  • Frontend Mentor - This helped me to find simple and well defined projects that I can use to learn new technologies while creating beautiful projects.
  • Vue.js Doc - The Vue.js documentation is very easy to read and it helped me a lot with my first steps.

Author

Acknowledgments

My husband @filipedanielski who is always supporting and encouraging me.

About

URL shortening API landing page.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published