Minor Project Report
Minor Project Report
I certify that
a. The work in this report is original and has been done by me.
b. I have followed the guidelines provided by the institute in preparing the report.
c. I have confirmed to the norms and guidelines given in the Ethical code of
conduct of the institute.
d. Whenever I have used materials (data, theoretical analysis, figures, and text)
from other sources, I have given due credit to them by citing them in the text
of the report and giving their details in the references. Further, I have taken
permission from the copyright owners of the sources, whenever necessary.
Signature of Student
Abstract
Weather Application is a web app based on languages html, css and javascript.
This app is made to check the live weather status of a place just by typing the name
of tha city. In this we make use of three files - .html, .css and .js All filesare linked
in html file.
On this app there is a search city box a user just have to type the city name in the box
and then the live weather status of the city is fetched by the app with the help of
OpenWeather API and displayed on the screen.
CONTENTS
Cover Page 01
Declaration 02
Abstract 03
• Web Designing
• Web Publishing
• Web Programming
• Database Management
Web development skills are demanded highly worldwide and paid well too. So
making career in web development is a great option. It is one of the easiest
accessible higher paid fields as you do not need a traditional university degree to
become qualified.
1.1 Front-End:-
A front-end dev takes care of layout, design and interactivity using HTML,
CSS and JavaScript. They take an idea from the drawing board and turn it into
reality.
What you see and what you use, such as the visual aspect of the website, the
drop-down menus and the text, are all brought together by the front-end dev,
who writes a series of programmes to bind and structure the elements, make
them look good and add interactivity. These programmes are run through a
browser.
1.2 Back-End:-
The backend developer engineers what is going on behind the scenes. This is
where the data is stored, and without this data, there would be no frontend.
The backend of the web consists of the server that hosts the website, an
application for running it and a database to contain the data.
The backend dev uses computer programmes to ensure that the server, the
application and the database run smoothly together.
In full stack development both front end and back end programming takes
place.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>t Heading</h1>
<p> Paragraph.</p>
</body>
</html>
• The <!DOCTYPE html> declaration defines that this document is an HTML5
document
• The <html> element is the root element of an HTML page
• The <head> element contains meta information about the HTML page
• The <title> element specifies a title for the HTML page (which is shown in the
browser's title bar or in the page's tab)
• The <body> element defines the document's body, and is a container for all
the visible contents, such as headings, paragraphs, images, hyperlinks, tables,
lists, etc.
An <input> element can be displayed in many ways, depending on the type attribute.
• External CSS
• Internal CSS
• Inline CSS
External CSS
With an external style sheet, you can change the look of an entire website by
changing just one file!
Each HTML page must include a reference to the external style sheet file inside the
<link> element, inside the head section.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="mystyle.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
style.css
body {
background-color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
Internal CSS
An internal style sheet may be used if one single HTML page has a unique
style.
The internal style is defined inside the <style> element, inside the head
section.
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
</body>
</html>
Inline CSS
An inline style may be used to apply a unique style for a single element.
To use inline styles, add the style attribute to the relevant element. The style
attribute can contain any CSS property.
<!DOCTYPE html>
<html>
<body>
</body>
</html>
5 JavaScript Introduction
document.getElementById("demo").innerHTML = "Hello";
document.getElementById("demo").style.fontSize = "40px";
document.getElementById("demo").style.display = "none";
document.getElementById("demo").style.display = "block";
5.1 JavaScript Syntax
JavaScript syntax is the set of rules, how JavaScript programs are constructed:
var name;
Function names can contain letters, digits, underscores, and dollar signs (same
rules as variables).
• objectName.propertyName
• objectName["propertyName"]
Object Methods
var person = {
firstName: "John",
lastName : "Doe",
id : 5566,
fullName : function() {
return this.firstName + " " + this.lastName;
}
};
6 Web API Introduction
Browser APIs
All browsers have a set of built-in Web APIs to support complex operations, and to help
accessing data.
To use these APIs, we will have to download the code from the Web.
Examples:
Html :-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Weather App</title>
</head>
<body>
<div class="app-main">
<div class="searchInputBox">
</div>
<div class="weather-body">
<div class="location-details">
</div>
<div class="weather-status">
<div class="img"></div>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
CSS :-
*{
margin: 0;
padding: 0;
box-sizing: border-box;
body {
background-image: url('12.jpg');
height: 100vh;
overflow: hidden;
background-repeat: no-repeat;
background-size: cover;
}
.app-main {
width: 70vh;
padding: 20px;
text-align: center;
.app-main > * {
margin-bottom: 10px;
.input-box {
width: 100%;
border: none;
outline: none;
color: #582233;
font-size: 1.2rem;
height: 50px;
border-radius: 5px;
padding: 0 10px;
text-align: center;
.input-box{
}
.weather-body{
display: none;
color: #582233;
padding: 20px;
line-height: 2rem;
border-radius: 10px;
height: 50vh;
.location-details{
font-weight: bold;
.weather-status{
padding: 20px;
.temp{
font-size: 50pt;
font-weight: 700;
margin: 20px 0;
.min-max, .weather {
font-size: 12pt;
font-weight: 600;
}
JAVASCRIPT:-
const weatherApi = {
key: "566b60ef3dbbdde5589a013ed682720a",
baseUrl: "https://api.openweathermap.org/data/2.5/weather"
if(event.keyCode == 13){
console.log(searchInputBox.value);
getWeatherReport(searchInputBox.value);
document.querySelector('.weather-body').style.display = "block";
});
function getWeatherReport(city){
fetch(`${weatherApi.baseUrl}?q=${city}&appid=${weatherApi.key}&units=metric`)
.then(weather => {
return weather.json();
}).then(showWeatherReport);
console.log(weather);
temperature.innerHTML = `${Math.round(weather.main.temp)}°C`;
weatherType.innerText = `${weather.weather[0].main}`;
date.innerText = dateManage(todayDate);
if(weatherType.textContent == 'Clear'){
document.body.style.backgroundImage = "url('image/clear.jpg')"
document.body.style.backgroundImage = "url('image/clouds.jpg')"
document.body.style.backgroundImage = "url('image/rainy.jpg')"
document.body.style.backgroundImage = "url('image/foggy-fog.gif')"
document.body.style.backgroundImage = "url('image/foggy-fog.gif')"
document.body.style.backgroundImage = "url('image/thunder.gif')"
// Date manage
function dateManage(dateArg){
let months = ["January", "February", "March", "April", "May", "June", "July", "August", "September",
"October", "November", "December"];
The scope of this project is to polish our skills, find weather of a particular place and to
accomplish goodgrades.
References
https://www.w3schools.com/