Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weather Api Implementations #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,5 @@ dist

# TernJS port file
.tern-port

.DS_Store
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# weather-api-es
# Weather Api

## Installation for development
- Clone this repo
- Switch to `develop` branch
- Run the command in terminal `npm i` to install its modules
- Now finally run the command `npm start`. It will automatically open the project in borwser new tab. ``` Or ``` You can go manually to `http://localhost:8080/`

## Installation for Production
- Clone this repo
- Switch to `develop` branch
- Run the command in terminal `npm i` to install its modules
- Now finally run the command `npm run build` and open the `index.html` file in the browser.
59 changes: 59 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's search why do we use lang attribute and does browsers use it?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifies the language code for the element's content. link

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="./dist/css/style.min.css">
</head>
<body>
<div id="root"></div>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove it if it's not being used anywhere

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

<div class="wrapper">
<div class="search-box">
<form action="#" id="searchForm">
<div class="input-group">
<input type="search" id="searchInput" placeholder="Enter City Name" class="form-control" aria-label="Text input with segmented dropdown button">
<div class="input-group-append">
<button type="submit" class="btn btn-primary">Search</button>
</div>
</div>
</form>
</div>
<div class="main-content">
<div class="container">
<div class="alert alert-danger" role="alert" id="notFound" style="display: none;"></div>
<div id="weatherDetails" style="display: none;">
<div class="row">
<div class="col">
<span id="date"></span>
<div class="address">
<h1 id="city"></h1>
<span id="country"></span>
</div>
</div>
<div class="col">
<ul class="info-list">
<li>
<strong>Sun Rises</strong>:
<span id="sunRize"></span>
</li>
<li>
<strong>Sun Sets</strong>:
<span id="sunSet"></span>
</li>
<li>
<strong>Visibility</strong>:
<span id="visibility"></span>Km
</li>
</ul>
</div>
</div>
<div id="weather" class="row"></div>
</div>
</div>
</div>
</div>
<script src="./dist/js/bundle.js"></script>
</body>
</html>
Loading