Your challenge is to build out this landing page, integrate with the shrtcode API and get it looking as close to the design as possible.
Todo
- 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
Building your project
- Initialize your project as a public repository on GitHub.
- Publish the code to the repository. You will need to initialise git in the project folder first then adding the remote origin while in the terminal.
git init
git remote add origin https://github.com/user/repo.git
git add .
git commit -m "initial commit"
git push origin master
- Look through the design to start planning out how you'll tackle the project. This step is crucial to help you think ahead for CSS classes that you could create to make reusable styles.
- Before adding any styles, structure your content with HTML. Writing your HTML first can help focus your attention on creating well-structured content.
- Write out the base styles for your project, including general content styles, such as
font-family
andfont-size
. - Start adding styles to an external file as
styles.css
then load it inindex.html
.
<link rel="stylesheet" href="style.css">
- Use the fetch api to shorten links. You will need to create an external javascript file to do the logic then load it in the
index.html
just before the closing</body>
tag.
<script src="./app.js">