From 80cf6ebb2798ee8146841a4ed2d0e48967f4afa0 Mon Sep 17 00:00:00 2001 From: Kris Koishigawa Date: Fri, 18 Sep 2020 17:45:36 +0900 Subject: [PATCH] fix: refactor html and css --- public/style.css | 6 ++--- views/index.html | 57 ++++++++++++++++++++---------------------------- 2 files changed, 26 insertions(+), 37 deletions(-) diff --git a/public/style.css b/public/style.css index f40d067..462a1bb 100644 --- a/public/style.css +++ b/public/style.css @@ -7,7 +7,7 @@ body { line-height: 1.4em; } -.container { +main { padding: 0; margin-top: 40px; } @@ -16,7 +16,7 @@ h3 { margin-top: 30px; } -.footer { +footer { margin-top: 40px; } @@ -54,8 +54,6 @@ a { } form { - border: solid 1px black; - border-radius: 5px; margin: 10px auto; padding: 20px; max-width: 600px; diff --git a/views/index.html b/views/index.html index 901de04..2bdbc0a 100644 --- a/views/index.html +++ b/views/index.html @@ -12,39 +12,30 @@ -
-

API Project: URL Shortener Microservice

-

User Story:

-
    -
  1. - I can POST a URL to [project_url]/api/shorturl/new and I will receive a shortened URL in the JSON - response.
    - Example: { "original_url": "www.google.com", "short_url": 1 } -
  2. -
  3. - If I pass an invalid URL that doesn't follow the http(s)://www.example.com(/more/routes) format, - the JSON response will contain an error like { "error": "invalid URL" }
    - HINT: To be sure that the submitted URL points to a valid site, you can use the function - dns.lookup(host, cb) from the dns core module. -
  4. -
  5. When I visit the shortened URL, it will redirect me to my original link.
  6. -
- -

Short URL Creation

-

Example: POST [project_url]/api/shorturl/new - https://www.google.com

-
- - - -
-

Example Usage:

- [this_project_url]/api/shorturl/3 - -

Will Redirect to:

-

https://forum.freecodecamp.org/

-
- +