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

task 2 #32

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
40 changes: 40 additions & 0 deletions calc.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
body{
background: #FF0099; /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #493240, #FF0099); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #493240, #FF0099); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */

}



.calc{
width: 400px;
height: 600px;
background: rgb(245, 156, 208);
margin-left: 550px;
margin-top: 80px;
}
#screen{
width: 85.4%;
margin-left: 30px;
height: 40px;
margin-top: 50px;
pointer-events: none;
border-radius: 5px 5px 5px 5px;
}
.btn{
width: 60px;
height: 45px;
margin-left: 30px;
margin-top: 50px;
background: rgb(243, 13, 109);
border-radius: 10px 10px 10px 10px;
}
#equal{
width: 248px;
height: 45px;
margin-left: 30px;
margin-top: 50px;
background: rgb(243, 13, 109);
border-radius: 10px 10px 10px 10px;
}
53 changes: 53 additions & 0 deletions calc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<html>
<head>
<title>Document</title>
<link rel="stylesheet" href="calc.css">
<script src="calc.js"></script>
</head>
<body>
<div class="main-body">
<div class="calc">
<div class="output">
<input type="text" id="screen">
</div>
<div class="buttons">
<div class="row">
<button id="equal" onclick="equalClick()" class="btn">=</button>
<button onclick="displayClear()" class="btn">C</button>
</div>
<div class="row">
<button onclick="buttonClick(7)" class="btn">7</button>
<button onclick="buttonClick(8)" class="btn">8</button>
<button onclick="buttonClick(9)" class="btn">9</button>
<button onclick="buttonClick('+')" class="btn">+</button>

</div>
<div class="row">
<button onclick="buttonClick(4)" class="btn">4</button>
<button onclick="buttonClick(5)" class="btn">5</button>
<button onclick="buttonClick(6)" class="btn">6</button>
<button onclick="buttonClick('-')" class="btn">-</button>

</div>
<div class="row">
<button onclick="buttonClick(1)" class="btn">1</button>
<button onclick="buttonClick(2)" class="btn">2</button>
<button onclick="buttonClick(3)" class="btn">3</button>
<button onclick="buttonClick('*')" class="btn">*</button>

</div>
<div class="row">
<button onclick="buttonClick('.')" class="btn">.</button>
<button onclick="buttonClick(0)" class="btn">0</button>
<button onclick="buttonClick('%')" class="btn">%</button>
<button onclick="buttonClick('/')" class="btn">/</button>
</div>

</div>

</div>

</div>

</body>
</html>
12 changes: 12 additions & 0 deletions calc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function buttonClick(val)
{
document.getElementById("screen").value+=val;
}
function displayClear(){
document.getElementById("screen").value=""
}
function equalClick(){
var text=document.getElementById("screen").value
var result=eval(text)
document.getElementById("screen").value=result
}
108 changes: 108 additions & 0 deletions contact.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatiblel" content="ie=edge">
<title>Contact form</title>
<link href="contactstyle.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Passion+One&family=Rancho&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Rancho&display=swap" rel="stylesheet">
</head>
<body>
<div class="heading1">
<h2>Amrutha Santhosh</h2>
<a href="index.html"> <span> Home </span> </a>
<a href="profile.html"> <span> About </span></a>
<a href="contact.html"> <span> Contact Me </span></a>
<a href="socialmedia.html"> <span> Social Media </span></a>


</div>
<div class="contactform"><h1><u>CONTACT FORM</u></h1></div>
<div class="desc">
<form>
<div class="name">
<h2 class="heading">Name</h2>
<input class="fname" type="text" name="first_name" required="">
<label class="flabel" for="first_name">First Name</label>
<input class="lname" type="text" name="last_name" required="">
<label class="llabel" for="last_name">Last Name</label>
</div>

<h2 class="heading">Age</h2>
<input class="age" type="number" name="age" min="0" required="">
<label class="agelabel" for="age">Age</label>

<h2 class="heading">Gender</h2>
<input class="male" id="male" name="gender" type="radio" required="">
<label class="mlabel" for="male">Male</label>
<input class="female" id="female" name="gender" type="radio" required="">
<label class="felabel" for="female">Female</label>
<input class="other" id="other" name="gender" type="radio" required="">
<label class="olabel" for="other">Other</label>

<h2 class="heading">Birthday</h2>
<input class="birth" type="date" name="birthday" required="">
<label class="birthlabel" for="birthday">Birthday</label>

<h2 class="heading">Email</h2>
<input class="email" type="email" name="email" required="">
<label class="elabel" for="email">Email</label>
<input class="password" type="password" name="password" minlength="8" required="">
<label class="plabel" for="password">Password</label>

<h2 class="heading">Phone</h2>
<input class="area" type="text" value="+91" name="area" required="">
<label class="alabel" for="area">Area Code</label>
<input class="phone" type="text" name="Phone" required="">
<label class="phlabel" for="phone-number">Phone Number</label>

<h2 class="heading">Subject</h2>
<input class="subject" type="text" name="subject" required="">
<label class="slabel" for="subject">Subject</label>

<h2 class="heading">Message</h2>
<textarea class="message" for=message></textarea>
<label class="melabel"for="message">Message</label>
<button class="sbutton" type="submit" value="send">Send</button>
<button class="rbutton" type="reset" value="reset">Reset</button>
</form>
</div>
</body>

</html>



































Loading