Fs Lab Index Record
Fs Lab Index Record
Name : ……………………………………………
Register No: ……………………………………...
Year & Sec: ………………………………………
PSNA
College of Engineering & Technology
(An Autonomous Institution)
Reg.No.
Average:
EXP NO:
Develop A Portfolio Website For Yourself Which Gives Details About
DATE: Yourself For A Potential Recruiter.
AIM:
To develop a portfolio website that describes the information about personal details for
potential recruiter
ALGORITHM:
Index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Portfolio</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>Vishwaharan - Portfolio</h1>
</header>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="projects.html">Projects</a></li>
<li><a href="Education.html">Education</a></li>
<li><a href="Skills.html">Skills</a></li>
<li><a href="Contact.html">Contact</a></li>
</ul>
</nav>
<br>
<center>
<img src="img.png" alt="" height="50%" width="19%">
</center>
</body>
</html>
Style.css
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f1f1f1;
}
header {
background-color: red;
background-image: linear-gradient(to bottom right, red, yellow);
color: #fff;
padding: 20px;
text-align: center;
}
nav {
background-color: red;
background-image: linear-gradient(to bottom right, red, yellow);
color: #fff;
padding: 10px;
text-align: center;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
}
nav ul li {
display: inline-block;
margin-right: 10px;
}
nav ul li a {
color: #fff;
text-decoration: none;
padding: 5px 10px;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
}
h1 {
text-align: center;
margin-bottom: 20px;
}
.profile-image {
display: block;
margin: 0 auto;
width: 200px;
height: 200px;
border-radius: 50%;
object-fit: cover;
object-position: center;
}
.details {
margin-top: 20px;
}
.details p {
margin-bottom: 10px;
}
.details p strong {
font-weight: bold;
}
.skills {
margin-top: 20px;
}
.skills ul {
list-style-type: none;
padding: 0;
}
.skills li {
display: inline-block;
margin-right: 10px;
margin-bottom: 10px;
padding: 5px 10px;
background-color: #ccc;
border-radius: 3px;
}
Skills.html:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Portfolio</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>Vishwaharan - Portfolio</h1>
</header>
<br>
<div class="container">
<section id="about">
<h2>Skills</h2>
<ul>
<li>HTML</li><br>
<li>CSS</li><br>
<li>JavaScript</li><br>
<li>Python</li><br>
<li>Java</li>
</ul>
</div>
</section>
</div>
</body>
</html>
Projects.html:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Portfolio</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>Vishwaharan - Portfolio</h1>
</header>
<div class="container">
<section id="about">
<h2>Projects</h2>
<h3><b>Driver Drowsiness System</b></h3>
<p>Driver drowsiness detection is a car safety technology which helps prevent
accidents caused by the driver getting drowsy.
</p>
</div>
</section>
</div>
</body>
</html>
Education.html:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Portfolio</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>Vishwaharan - Portfolio</h1>
</header>
<br>
<div class="container">
<section id="about">
<h2>Education</h2>
<p><b>Higher Studies :</b></p>
<p>Chevalier Academy and Matriculation School</p>
<p><b>Degree in Inforamtion Technology : </b></p>
<p>PSNA College Of Engineering and Technology</p>
</div>
</section>
</div>
</body>
</html>
Contact.html:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Portfolio</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>Vishwaharan - Portfolio</h1>
</header>
<br>
<div class="container">
<section id="about">
<h2>Contact Me :</h2>
<ul>
<li>Email: [email protected]</li><br>
<li>Phone: 6385872619</li><br>
<li>LinkedIn: https://www.linkedin.com/in/vishwaharan-m-b57481227</li>
</ul>
</div>
</section>
</div>
</body>
</html>
OUTPUT:
Preparation 30
Performance 30
Record 40
Total 100
RESULT:
Thus the script to create website portfolio has been executed successfully.
EXP NO: 2
Create a web application to manage the TO-DO list of users, where users
DATE: can login and manage their to-do items.
AIM:
To create a web application to manage the TO-DO list of users, where users can login and
manage their to-do items.
ALGORITHM:
Login.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login page in HTML</title>
<style>
body
{
font-family:sans-serif;
background: -webkit-linear-gradient(to right, #155799, #159957);
background: linear-gradient(to right, #155799, #159957);
color:whitesmoke;
}
h1{
text-align: center;
}
form{
width:35rem;
margin: auto;
color:whitesmoke;
backdrop-filter: blur(16px) saturate(180%);
-webkit-backdrop-filter: blur(16px) saturate(180%);
background-color: rgba(11, 15, 13, 0.582);
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.125);
padding: 20px 25px;
}
input[type=text], input[type=password]{
width: 100%;
margin: 10px 0;
border-radius: 5px;
padding: 15px 18px;
box-sizing: border-box;
}
input[type=button] {
background-color: #030804;
color: white;
padding: 14px 20px;
border-radius: 5px;
margin: 7px 0;
width: 100%;
font-size: 18px;
}
.headingsContainer{
text-align: center;
}
.headingsContainer p{
color: gray;
}
.mainContainer{
padding: 16px;
}
.subcontainer{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.subcontainer a{
font-size: 16px;
margin-bottom: 12px;
}
span.forgotpsd a {
float: right;
color: whitesmoke;
padding-top: 16px;
}
.forgotpsd a{
color: rgb(74, 146, 235);
}
.forgotpsd a:link{
text-decoration: none;
}
.register{
color: white;
text-align: center;
}
.register a{
color: rgb(74, 146, 235);
}
.register a:link{
text-decoration: none;
}
@media screen and (max-width: 600px) {
form{
width: 25rem;
}
}
Todo.html :
<!DOCTYPE html>
<html lang="en">
<head>
<title>Simple To Do List</title>
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/5.15.2/css/all.min.css">
<style>
*,
*:before,
*:after{
padding: 0;
margin: 0;
box-sizing: border-box;
}
body{
height: 100vh;
color: #111111;
background: -webkit-linear-gradient(to right, #155799, #159957);
background: linear-gradient(to right, #155799, #159957);
}
.container{
width: 40%;
min-width: 450px;
position: absolute;
margin: auto;
left: 0;
right: 0;
top: 30px;
padding: 30px 40px;
}
#newtask{
position: relative;
background-color: #ffffff;
padding: 30px 20px;
border-radius: 5px;
box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
#newtask input{
width: 70%;
width: 70%;
height: 45px;
font-family: 'Poppins',sans-serif;
font-size: 15px;
border: 2px solid #d1d3d4;
padding: 12px;
color: #111111;
font-weight: 500;
position: relative;
border-radius: 5px;
}
#newtask input:focus{
outline: none;
border-color: #8052ec;
}
#newtask button{
position: relative;
float: right;
width: 20%;
height: 45px;
border-radius: 5px;
font-family: 'Poppins',sans-serif;
font-weight: 500;
font-size: 16px;
background-color: #8052ec;
border: none;
color: #ffffff;
cursor: pointer;
outline: none;
}
#tasks{
background-color: #ffffff;
padding: 30px 20px;
margin-top: 60px;
border-radius: 10px;
box-shadow: 0 15px 30px rgba(0,0,0,0.3);
width: 100%;
position: relative;
}
.task{
background-color: #ffffff;
height: 50px;
padding: 5px 10px;
margin-top: 10px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 2px solid #d1d3d4;
cursor: pointer;
}
.task span{
font-family: 'Poppins',sans-serif;
font-size: 15px;
font-weight: 400;
}
.task button{
background-color: #8052ec;
color: #ffffff;
height: 100%;
width: 40px;
border-radius: 5px;
border: none;
cursor: pointer;
outline: none;
}
.completed{
text-decoration: line-through;
}
</style>
</head>
<body>
<div class="container">
<div id="newtask">
<input type="text" placeholder="Task to be done..">
<button id="push">Add</button>
</div>
<div id="tasks"></div>
</div>
<script>
document.querySelector('#push').onclick = function(){
if(document.querySelector('#newtask input').value.length == 0){
alert("Please Enter a Task")
}
else{
document.querySelector('#tasks').innerHTML += `
<div class="task">
<span id="taskname">
${document.querySelector('#newtask input').value}
</span>
<button class="delete">
<i class="far fa-trash-alt"></i>
</button>
</div>
var current_tasks = document.querySelectorAll(".delete");
for(var i=0; i<current_tasks.length; i++){
current_tasks[i].onclick = function(){
this.parentNode.remove();
}
}
var tasks = document.querySelectorAll(".task");
for(var i=0; i<tasks.length; i++){
tasks[i].onclick = function(){
this.classList.toggle('completed');
}
}
document.querySelector("#newtask input").value = "";
}
}
</script>
</body>
</html>
OUTPUT:
Preparation 30
Performance 30
Record 40
Total 100
RESULT:
Thus the script to create to-do list has been executed successfully.
EXP NO:
Create a simple micro blogging application ( like twitter ) that allows
DATE: people to post their content which can be viewed by people who follow
them.
AIM:
Create a simple micro blogging application (like twitter) that allows people to post their
content which can be viewed by people who follow them
ALGORITHM:
Index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TechX</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<script src="script.js"></script>
<nav>
<div class="left">
<h2 style="color: Black">TechX</h2>
<div class="search_bar">
<i class="fa-solid fa-magnifying-glass"></i>
<input type="text" placeholder="Search">
</div>
</div>
</nav>
<div class="main">
<div class="left">
<div class="left">
<div class="img">
<img src="image/profile.png">
<p>Vishwaharan</p>
</div>
<div class="img">
<img src="image/friend.png">
<p>Friends</p>
</div>
<div class="img">
<img src="image/saved.png">
<p>Saved</p>
</div>
<div class="img">
<img src="image/group.png">
<p>Groups</p>
</div>
<div class="img">
<img src="image/marketplace.png">
<p>Marketplace</p>
</div>
<div class="img">
<img src="image/watch.png">
<p>Watch</p>
</div>
<hr>
</div>
</div>
<div class="center">
<div class="my_post">
<div class="post_top">
<img src="image/profile.png">
<input type="text" id="tweetInput" placeholder="What's on your mind?">
</div>
</div>
<div class="friends_post">
<div class="friend_post_top">
<div class="img_and_name">
<img src="image/profile.png">
<div class="friends_name">
<p class="friends_name">
Vishwaharan
</p>
<p class="time">10h.<i class="fa-solid fa-user-group"></i></p>
</div>
</div>
<div class="menu">
<i class="fa-solid fa-ellipsis"></i>
</div>
</div>
<center><p><b>Switzerland</b></p></center>
<br>
<img src="image/post_1.jpg" width="100%">
</div>
<div class="friends_post">
<div class="friend_post_top">
<div class="img_and_name">
<img src="image/contact_1.jpg">
<div class="friends_name">
<p class="friends_name">
Siva Prakash
</p>
<p class="time">6h.<i class="fa-solid fa-user-group"></i></p>
</div>
</div>
<div class="menu">
<i class="fa-solid fa-ellipsis"></i>
</div>
</div>
<center><p><b>Camping with Friends</b></p></center>
<br>
<img src="image/post_3.png" width="100%">
</div>
</div>
<div class="right">
<div class="right">
<div class="third_warpper">
<div class="contact_tag">
<h2>Followers</h2>
<div class="contact_icon">
<i class="fa-solid fa-magnifying-glass"></i>
</div>
</div>
<div class="contact">
<img src="image/contact_1.jpg">
<p>Siva Prakash</p>
</div>
<div class="contact">
<img src="image/contact_2.jpg">
<p>Bala Aravind</p>
</div>
<div class="contact">
<img src="image/contact_3.jpg">
<p>Trafalgar Law</p>
</div>
<div class="contact">
<img src="image/contact_4.jpg">
<p>Dark King Rayleigh</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Style.css:
Preparation 30
Performance 30
Record 40
Total 100
RESULT:
Thus the script to create micro-blogging website has been executed successfully.
EXP NO:
Create a food delivery website where users can order food from a
DATE: particular restaurant listed in the website
AIM:
To create a food delivery website where users can order food from a particular restaurant
listed in the website
ALGORITHM:
Index.html
<html>
<head>
<title>RESTAURANT WEBSITE</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" />
</head>
<body>
<div class="main">
<div class="header">
<div class="header-left">
<div class="header-right">
<ul>
<li><a href="#!">Home</a></li>
<li><a href="#!">About</a></li>
<li><a href="#!">Review</a></li>
<li><a href="#!">Contact</a></li>
</ul>
</div>
<div class="header-bottom">
<div class="header-font">Eat healthy food & Enjoy your life.</div>
</div>
</div>
<div class="content-part-3">
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<div class="content-part-3-left"><img src="images/menu/1.jpg" width="230"
height="155"></div>
<div class="content-part-3-right">
<div class="content-part-3-right-h4">Saravanabhavan</div>
Food, Folks and Fun all together.
<div class="margin_p3"><a href="menu.html" class="order-now">Order Now</a></div>
</div>
<div class="content-part-3-left"><img src="images/menu/2.jpg" width="230"
height="155"></div>
<div class="content-part-3-right">
<div class="content-part-3-right-h4">Hotel Aambur</div>
Spices have a story.
<div class="margin_p3"><a href="menu.html" class="order-now">Order
Now</a></div>
</div>
<div class="content-part-3-left"><img src="images/menu/3.jpg" width="230"
height="155"></div>
<div class="content-part-3-right">
<div class="content-part-3-right-h4">Hotel Anbu</div>
Like Mom’s house.
<div class="margin_p3"><a href="menu.html" class="order-now">Order
Now</a></div>
</div>
<div class="content-part-3-left"><img src="images/menu/4.jpg" width="230"
height="155"></div>
<div class="content-part-3-right">
<div class="content-part-3-right-h4">Hotel Aachis</div>
Listen to your tongue.
<div class="margin_p3"><a href="menu.html" class="order-now">Order
Now</a></div>
</div>
<div class="content-part-3-left"><img src="images/menu/5.jpg" width="230"
height="155"></div>
<div class="content-part-3-right">
<div class="content-part-3-right-h4">Hotel A2B</div>
Quality first.
<div class="margin_p3"><a href="menu.html" class="order-now">Order
Now</a></div>
</div>
<div class="content-part-3-left"><img src="images/menu/6.png" width="230"
height="155"></div>
<div class="content-part-3-right">
<div class="content-part-3-right-h4">Star biriyani</div>
You need a chicken dinner.
<div class="margin_p3"><a href="menu.html" class="order-now">Order
Now</a></div>
</div>
<div class="clearfix"></div>
</div>
</body>
</html>
Order.html
<html>
<head>
<title>RESTAURANT WEBSITE</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" />
<style>
body {
text-align: center;
padding: 40px 0;
}
h1 {
color: #88B04B;
font-family: "Nunito Sans", "Helvetica Neue", sans-serif;
font-weight: 900;
font-size: 40px;
margin-bottom: 10px;
}
p{
color: #404F5E;
font-family: "Nunito Sans", "Helvetica Neue", sans-serif;
font-size:20px;
margin: 0;
}
i{
color: #9ABC66;
font-size: 100px;
line-height: 200px;
margin-left:-15px;
}
</style>
</head>
<body>
<div class="main">
<div class="header">
<div class="header-right">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="#!">About</a></li>
<li><a href="#!">Review</a></li>
<li><a href="#!">Contact</a></li>
</ul>
</div>
<div class="header-bottom">
<div class="header-font">Eat healthy food & Enjoy your life.</div>
</div>
</div>
<div class="content-part-3">
<div class="card">
<br><br><br>
<div style="border-radius:200px; height:200px; width:200px; background: #F8FAF5;
margin:0 auto;">
<i class="checkmark">✓</i>
</div>
<h1>Order Success</h1>
<p>Food is preparing</p><br><br>
</div>
</div>
<div class="clearfix"></div>
</div>
</body>
</html>
Menu.html
<html>
<head>
<title>RESTAURANT WEBSITE</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" />
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="main">
<div class="header">
<div class="header-right">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="#!">About</a></li>
<li><a href="#!">Review</a></li>
<li><a href="#!">Contact</a></li>
</ul>
</div>
<div class="header-bottom">
<div class="header-font">Eat healthy food & Enjoy your life.</div>
</div>
</div>
<div class="content-part-3">
<div class="container">
<header>
<h1>Your Shopping Cart</h1>
<div class="shopping">
<img src="image/shopping.svg">
<span class="quantity">0</span>
</div>
</header>
<div class="list">
</div>
</div>
<div class="card">
<h1>Cart</h1>
<ul class="listCard">
</ul>
<div class="checkOut">
<div class="total">0</div>
<div class="closeShopping">
<a href="order.html">ORDER NOW</a></div>
</div>
<script src="app.js"></script>
</div>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</body>
</html>
Style.css:
let openShopping = },
document.querySelector('.shopping'); {
let closeShopping = id: 4,
document.querySelector('.closeShopping'); name: 'Burger',
let list = document.querySelector('.list'); image: 'c.png',
let listCard = price: 80
document.querySelector('.listCard'); },
let body = document.querySelector('body'); {
let total = document.querySelector('.total'); id: 5,
let quantity = name: 'Pepper Fish',
document.querySelector('.quantity'); image: '10.png',
price: 180
openShopping.addEventListener('click', },
()=>{ {
body.classList.add('active'); id: 6,
}) name: 'Grill Chicken',
closeShopping.addEventListener('click', image: '6.png',
()=>{ price: 300
body.classList.remove('active'); }
}) ];
let listCards = [];
let products = [ function initApp(){
{ products.forEach((value, key) =>{
id: 1, let newDiv =
name: 'Panner Fried Rice', document.createElement('div');
image: 'g.png', newDiv.classList.add('item');
price: 110 newDiv.innerHTML = `
}, <img
{ src="images/menu/${value.image}">
id: 2, <div
name: 'Schezwan Noodles', class="title">${value.name}</div>
image: 'h.png', <div
price: 95 class="price">${value.price.toLocaleStrin
}, g()}</div>
{ <button
id: 3, onclick="addToCard(${key})">ADD TO
name: 'Chicken lollipop', CART</button>`;
image: 'd.jfif', list.appendChild(newDiv);
price: 150 })
} <button
initApp(); onclick="changeQuantity(${key},
function addToCard(key){ ${value.quantity - 1})">-</button>
if(listCards[key] == null){ <div
listCards[key] = class="count">${value.quantity}</div>
JSON.parse(JSON.stringify(products[key]) <button
); onclick="changeQuantity(${key},
listCards[key].quantity = 1; ${value.quantity + 1})">+</button>
} </div>`;
reloadCart(); listCard.appendChild(newDiv);
} quantity.innerText = count;
function reloadCart(){ }
listCard.innerHTML = ''; })
let count = 0;
let totalPrice = 0; total.innerText =
listCards.forEach((value, key)=>{ totalPrice.toLocaleString();
totalPrice = totalPrice + value.price;
count = count + value.quantity; }
if(value != null){ function changeQuantity(key, quantity){
let newDiv = if(quantity == 0){
document.createElement('li'); delete listCards[key];
newDiv.innerHTML = ` }else{
<div><img listCards[key].quantity = quantity;
src="images/menu/${value.image}"/></di listCards[key].price = quantity *
v> products[key].price;
<div>${value.name}</div> }
reloadCart();
<div>${value.price.toLocaleString()}</div }
>
<div>
OUTPUT:
Preparation 30
Performance 30
Record 40
Total 100
RESULT:
Thus the script for Online food ordering website has been executed successfully.
EXP NO:
DATE: Develop a classifieds web application to buy and sell used products
AIM:
ALGORITHM:
Index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Shopsy</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
integrity="sha384-
oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay"
crossorigin="anonymous">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<nav class="navbar">
<img src="images/img.png" alt="" width="50px"> 
<p>Shopsy</p>
<div class="navbar-center">
<div class="navb">
<a class="active" href="#home">Home</a>
<a href="#news">About</a>
<a href="#contact">Products</a>
<a href="#about">Contact Us</a>
</div>
<div class="cart-btn">
<span class="nav-icon">
<i class="fas fa-cart-plus"></i>
</span>
<div class="cart-items">0</div>
</div>
</div>
</nav>
<header class="hero">
<div class="banner">
</div>
</header>
<section class="products">
<div class="section-title">
<h2>Used Products</h2>
</div>
<div class="products-center">
</div>
</section>
<div class="cart-overlay">
<div class="cart">
<span class="close-cart">
<i class="fas fa-window-close"></i>
</span>
<h2>Your cart</h2>
<div class="cart-content">
</div>
<div class="cart-footer">
<h3>your total: ₹ <span class="cart-total">0</span></h3>
<button class="clear-cart banner-btn">clear cart</button>
</div>
</div>
</div>
<script src="app.js"></script>
</body>
</html>
Style.css align-items: center;
background: rgb(231, 226, 221);
@import z-index: 1;
url("https://fonts.googleapis.com/css?famil }
y=Lato:400,700"); p{
:root { font-family: 'Segoe UI', Tahoma, Geneva,
--primaryColor: #f09d51; Verdana, sans-serif;
--mainWhite: #fff; font-weight: bold;
--mainBlack: #222; position: relative;
--mainGrey: #ececec; left: 35px;
--mainSpacing: 0.1rem; font-size: 20px;
--mainTransition: all 0.3s linear; }
} .navbar img{
*{ position: relative;
margin: 0; left: 30px;
padding: 0; }
box-sizing: border-box; .navbar-center {
} max-width: 1170px;
body { margin: 0 auto;
color: var(--mainBlack); display: flex;
background: var(--mainWhite); align-items: center;
font-family: "Lato", sans-serif; justify-content: space-between;
} padding: 0 1.5rem;
.navbar a { }
float: left; .nav-icon {
color: #f2f2f2; position: relative;
text-align: center; font-size: 1.5rem;
padding: 14px 16px; left: 80px;
text-decoration: none; }
font-weight: bold; .cart-btn {
font-size: 20px; position: relative;
} cursor: pointer;
.navbar-center a{ left: 50%;
color: black; }
} .cart-items {
.navbar { position: absolute;
position: sticky; top: -8px;
top: 0; left: 60px;
height: 60px; background: var(--primaryColor);
width: 100%; padding: 0 5px;
display: flex; border-radius: 30%;
color: var(--mainWhite); overflow: hidden;
} }
.hero { .bag-btn {
min-height: calc(100vh - 60px); position: absolute;
background: url("./images/hero- top: 70%;
bcg.jpeg") center no-repeat; right: 0;
background-size: 95%; background: var(--primaryColor);
} border: none;
.banner-btn { text-transform: uppercase;
padding: 1rem 3rem; padding: 0.5rem 0.75rem;
text-transform: uppercase; letter-spacing: var(--mainSpacing);
letter-spacing: var(--mainSpacing); font-weight: bold;
font-size: 1rem; transition: var(--mainTransition);
background: var(--primaryColor); transform: translateX(101%);
color: var(--mainBlack); cursor: pointer;
border: 1px solid var(--primaryColor); }
transition: var(--mainTransition); .bag-btn:hover {
cursor: pointer; color: var(--mainWhite);
} }
.products { .fa-shopping-cart {
padding: 4rem 0; margin-right: 0.5rem;
} }
.section-title h2 { .img-container:hover .bag-btn {
text-align: center; transform: translateX(0);
font-size: 2.5rem; }
margin-bottom: 5rem; .product-img {
text-transform: capitalize; display: block;
letter-spacing: var(--mainSpacing); width: 100%;
} min-height: 12rem;
.products-center { transition: var(--mainTransition);
width: 90vw; }
margin: 0 auto; .img-container:hover .product-img {
max-width: 1170px; opacity: 0.5;
display: grid; }
grid-template-columns: repeat(auto-fit, .product h3 {
minmax(260px, 1fr)); text-transform: capitalize;
grid-column-gap: 1.5rem; font-size: 1.1rem;
grid-row-gap: 2rem; margin-top: 1rem;
} letter-spacing: var(--mainSpacing);
.img-container { text-align: center;
position: relative; }
.product h4 { }
margin-top: 0.7rem; .close-cart {
letter-spacing: var(--mainSpacing); font-size: 1.7rem;
color: var(--primaryColor); cursor: pointer;
text-align: center; }
} .cart h2 {
.cart-overlay { text-transform: capitalize;
position: fixed; text-align: center;
top: 0; letter-spacing: var(--mainSpacing);
right: 0; margin-bottom: 2rem;
width: 100%; }
height: 100%; .cart-item {
transition: var(--mainTransition); display: grid;
background: rgb(240, 157, 81, 0.5); align-items: center;
z-index: 2; grid-template-columns: auto 1fr auto;
visibility: hidden; grid-column-gap: 1.5rem;
} margin: 1.5rem 0;
.cart { }
position: fixed; .cart-item img {
top: 0; width: 75px;
right: 0; height: 75px;
width: 100%; }
height: 100%; .cart-item h4 {
overflow: scroll; font-size: 0.85rem;
z-index: 3; text-transform: capitalize;
background: rgb(231, 226, 221); letter-spacing: var(--mainSpacing);
padding: 1.5rem; }
transition: var(--mainTransition); .cart-item h5 {
transform: translateX(100%); margin: 0.5rem 0;
} letter-spacing: var(--mainSpacing);
.showCart { }
transform: translateX(0); .item-amount {
} text-align: center;
.transparentBcg { }
visibility: visible; .remove-item {
} color: grey;
@media screen and (min-width: 768px) { cursor: pointer;
.cart { }
width: 30vw; .fa-chevron-up,
min-width: 450px; .fa-chevron-down {
} color: var(--primaryColor);
cursor: pointer; }
} .cart-footer h3 {
.cart-footer { text-transform: capitalize;
margin-top: 2rem; margin-bottom: 1rem;
letter-spacing: var(--mainSpacing); }
text-align: center;
App.js
cartContent.removeChild(removeItem.pare cartContent.removeChild(lowerAmount.pa
ntElement.parentElement); rentElement.parentElement);
this.removeItem(id); this.removeItem(id);
} }
else if }
(event.target.classList.contains('fa- });
chevron-up')) }
{ clearCart(){
let addAmount = event.target; let cartItems = cart.map(item
let id = addAmount.dataset.id; =>item.id);
let tempItem = cart.find(item => cartItems.forEach(id =>
item.id === id); this.removeItem(id));
tempItem.amount = console.log(cartContent.children);
tempItem.amount + 1; while (cartContent.children.lenght > 0){
Storage.saveCart(cart); cartContent.removeChild
this.setCartValues(cart); (cartContent.children[0]);
}
this.hideCart(); return products.find(product =>
} product.id=== id);
removeItem(id){ }
cart = cart.filter(item => item.id !==id); static saveCart(cart){
this.setCartValues(cart);
Storage.saveCart(cart); localStorage.setItem('cart',JSON.stringify(
let button = this.getSingleButton(id); cart))
button.disabled = false; }
button.innerHTML = `<i class= "fas fa- static getCart(){
shopping-cart"></i>add to cart`; return
} localStorage.getItem('cart')?JSON.parse(lo
getSingleButton(id){ calStorage.getItem('cart')):[]
return buttonsDOM.find(button => }
button.dataset.id === id); }
} document.addEventListener("DOMConten
} tLoaded",()=>{
class Storage{ const ui= new UI();
static saveProducts(products){ const products = new Products();
ui.setupApp();
localStorage.setItem("products",JSON.stri products.getProducts().then(products =>
ngify(products)); {ui.displayProducts(products)
} Storage.saveProducts(products);
static getProduct(id){ }).then(()=>{
let products ui.getBagButtons();
=JSON.parse(localStorage.getItem('produc ui.cartLogic();
ts')); });
});
Products.json :
{ {
"items": [ "sys": { "id": "2" },
{ "fields": {
"sys": { "id": "1" }, "title": "Apple Iphone 12",
"fields": { "price": 28000,
"title": "OPPO A78", "image": { "fields": { "file": { "url":
"price": 8000.00, "./images/product-2.jpeg" } } }
"image": { "fields": { "file": { "url": }
"./images/product-1.jpeg" } } } },
} {
}, "sys": { "id": "3" },
"fields": { }
"title": "OnePlus Nord CE 3", },
"price": 12000, {
"image": { "fields": { "file": { "url": "sys": { "id": "8" },
"./images/product-3.jpeg" } } } "fields": {
} "title": "Asus Vivobook 15",
}, "price": 25000,
{ "image": { "fields": { "file": { "url":
"sys": { "id": "4" }, "./images/product-8.jpeg" } } }
"fields": { }
"title": "Vivo T2X 5G", },
"price": 7000, {
"image": { "fields": { "file": { "url": "sys": {
"./images/product-4.jpeg" } } } "id": "9"
} },
}, "fields": {
{ "title": "Canon EOS 11000D",
"sys": { "id": "5" }, "price": 12500,
"fields": { "image": {
"title": "DELL Inspiron 15 3000", "fields": {
"price": 21000, "file": {
"image": { "fields": { "file": { "url": "url": "./images/product-9.jpeg"
"./images/product-5.jpeg" } } } }
} }
}, }
{ }
"sys": { "id": "6" }, },
"fields": { {
"title": "Acer Nitro 5", "sys": {
"price": 32000, "id": "10"
"image": { "fields": { "file": { "url": },
"./images/product-6.jpeg" } } } "fields": {
} "title": "Sony a7 III",
}, "price": 100000,
{ "image": {
"sys": { "id": "7" }, "fields": {
"fields": { "file": {
"title": "Lenovo Ideapad Slim 3", "url": "./images/product-10.jpeg"
"price": 20000, }
"image": { "fields": { "file": { "url": }
"./images/product-7.jpeg" } } } }
} {
}, "sys": {
{ "id": "12"
"sys": { },
"id": "11" "fields": {
}, "title": "Fujifilm X-T3",
"fields": { "price": 60000,
"title": "Nikon D850 SLR Camera", "image": {
"price": 175000, "fields": {
"image": { "file": {
"fields": { "url": "./images/product-12.jpeg"
"file": { }
"url": "./images/product-11.jpeg" }
} }
} }
} }
} ]
}, }
OUTPUT:
Preparation 30
Performance 30
Record 40
Total 100
RESULT:
Thus the script to create a classified website to buy and sell used products has been executed
successfully.
EXP NO:
Develop a leave management system for an organization where users
DATE: can apply different types of leaves such as casual leave and medical
leave. They also can view the available number of days
AIM:
To develop a leave management system for an organization where users can apply different
types of leaves such as casual leave and medical leave. They also can view the available
number of days
ALGORITHM:
Index.html
Form.html :
body { }
font-family: 'Segoe UI', Tahoma,
Geneva, Verdana, sans-serif; .leave-form h2,
margin: 0; .leave-summary h2 {
padding: 0; text-align: center;
background-color: #f0f0f0; /* Lighter color: #007BFF; /* Blue header text
background color */ color */
} }
Form.css :
body }
{ form{
font-family:sans-serif; width: 800px;
background: -webkit-linear-gradient(to height: 600px;
right, #155799, #159957); position: relative;
background: linear-gradient(to right, top: 40px;
#155799, #159957); margin: auto;
color:whitesmoke; color:whitesmoke;
} backdrop-filter: blur(16px)
html{ saturate(180%);
font-size: 30px; -webkit-backdrop-filter: blur(16px)
} saturate(180%);
background-color: rgba(11, 15, 13,
input{ 0.582);
font-size: 24px; border-radius: 12px;
} border: 1px solid rgba(255, 255, 255,
0.125);
h1{ padding: 30px;
text-align: center; }
input[type=text], input[type=password]{ justify-content: space-between;
width: 100%; }
margin: 10px 0; .subcontainer a{
border-radius: 5px; font-size: 16px;
padding: 15px 18px; margin-bottom: 12px;
box-sizing: border-box; }
} span.forgotpsd a {
input[type=submit] { float: right;
background-color: #030804; color: whitesmoke;
color: white; padding-top: 16px;
padding: 14px 20px; }
border-radius: 5px; .forgotpsd a{
margin: 7px 0; color: rgb(74, 146, 235);
width: 100%; }
font-size: 18px; .forgotpsd a:link{
} text-decoration: none;
.headingsContainer{ }
text-align: center;
} @media screen and (max-width: 600px) {
.headingsContainer p{ form{
color: gray; width: 25rem;
} }
.mainContainer{ }
padding: 16px;
} @media screen and (max-width: 400px) {
.subcontainer{ form{
display: flex; width: 20rem;
flex-direction: row; }
align-items: center; }
Script.js :
document.addEventListener('DOMContentLoaded', function () {
const leaveRequestForm = document.getElementById('leave-request-form');
const availableDaysElement = document.getElementById('available-days');
const leaveHistoryElement = document.getElementById('leaveHistory');
const leaveRecordsTable = document.getElementById('leave-records');
let availableDays = 20;
leaveRequestForm.addEventListener('submit', function (e) {
e.preventDefault();
const leaveType = document.getElementById('leave-type').value;
const leaveDays = parseInt(document.getElementById('leave-days').value);
function updateLeaveHistory(fromDate, toDate) {
const historyItem = document.createElement('li');
historyItem.textContent = `From: ${fromDate} - To: ${toDate}`;
leaveHistoryElement.appendChild(historyItem);
const leaveDays = (new Date(toDate) - new Date(fromDate)) / (1000 * 60 *
60 * 24) + 1;
leaveTaken += leaveDays;
updateLeaveInfo();
fromDateInput.value = '';
toDateInput.value = '';
}
if (leaveDays <= availableDays) {
availableDays -= leaveDays;
availableDaysElement.textContent = availableDays;
const newRow = document.createElement('tr');
newRow.innerHTML = `
<td>${new Date().toLocaleDateString()}</td>
<td>${leaveType}</td>
<td>${leaveDays}</td>
`;
leaveRecordsTable.appendChild(newRow);
leaveRequestForm.reset();
} else {
alert('Not enough available leave days.');
}
});
});
OUTPUT:
Preparation 30
Performance 30
Record 40
Total 100
RESULT:
Thus the script for leave management system has been executed successfully.
EXP NO:
Develop a simple dashboard for project management where the statuses
DATE: of various tasks are available. New tasks can be added and the status of
existing tasks can be changed among Pending, InProgress or Completed
AIM:
To develop a simple dashboard for project management where the statuses of various tasks
are available. New tasks can be added and the status of existing tasks can be changed among
Pending, InProgress or Completed.
ALGORITHM:
Task.html
Styles.css
body { }
font-family: Arial, sans-serif; .top-bar {
} background-color:rgb(5, 68, 104);
img{ color: #fff;
margin-left: 130px; text-align: center;
width: 50px; padding: 10px 0;
} border: 2px solid blue;
p{ border-radius: 10px;
font-size: 20px; margin-left:300px;
font-weight: bold; margin-right: 10px;
text-align: center; }
font-size: 16px;
.top-bar h2{ position: relative;
text-align: center; }
}
li{ .sidebar ul li a .icon{
list-style: none; color: #dee4ec;
} width: 30px;
.sidebar{ display: inline-block;
background: rgb(5, 68, 104); }
position: fixed; .sidebar ul li a:hover,
top: 0; .sidebar ul li a.active{
left: 0; color: #0c7db1;
width: 280px; background:white;
height: 100%; border-right: 2px solid rgb(5, 68, 104);
padding: 20px 0; }
transition: all 0.5s ease; .sidebar ul li a:hover .icon,
} .sidebar ul li a.active .icon{
.sidebar .profile{ color: #0c7db1;
margin-bottom: 30px; }
text-align: center; .sidebar ul li a:hover:before,
} .sidebar ul li a.active:before{
.sidebar .profile img{ display: block;
display: block; }
width: 100px; .section{
height: 100px; width: calc(100% - 225px);
border-radius: 50%; margin-left: 225px;
margin: 0 auto; transition: all 0.5s ease;
} }
.sidebar .profile h3{ .container {
color: #ffffff; margin-top: 30px;
margin: 10px 0 5px; margin-left: 325px; /* Adjust the margin
} to accommodate the sidebar width */
.sidebar .profile p{ }
color: rgb(206, 240, 253); .card {
font-size: 14px; border: none;
} box-shadow: 0 4px 8px rgba(0, 0, 0,
.sidebar ul li a{ 0.2);
display: block; transition: 0.3s;
padding: 13px 30px; padding: 20px;
border-bottom: 1px solid #10558d; text-align: center;
color: rgb(241, 237, 237); }
.card:hover { .chart-container {
box-shadow: 0 8px 16px rgba(0, 0, 0, margin-top: 30px;
0.2); margin-bottom: 50px;
} }
Chart.js :
var workloadByTasksData = { };
labels: ["Crystal Codebase", "Peter var taskByDurationData = {
Perfcycle", "Harry Helpsalot", "Roger labels: ["On Hold", "Planning",
Reports"], "Approved", "Pending
datasets: [{ Review","Completed","In Progress"],
label:"Tasks", datasets: [{
data: [40, 12, 25, 15], data: [18, 26, 9, 4, 33, 57],
backgroundColor: ["#007BFF", backgroundColor:
"#28A745", "#FFC107", "#DC3545"], ["yellow","blue","lightblue","red","lightgre
}] en","darkgreen"],
}; }]
var workloadByDurationData = { };
labels: ["Crystal Codebase", "Peter var workloadByTasksChart = new
Perfcycle", "Harry Helpsalot", "Roger Chart(document.getElementById("workloa
Reports"], dByTasksChart"), {
datasets: [{ type: "horizontalBar",
label:"Days", data: workloadByTasksData,
data: [30, 15, 20, 25], });
backgroundColor: ["#007BFF", var workloadByDurationChart = new
"#28A745", "#FFC107", "#DC3545"], Chart(document.getElementById("workloa
}] dByDurationChart"), {
}; type: "horizontalBar",
var taskByStatusData = { data: workloadByDurationData,
labels: ["On Hold", "Planning", });
"Approved", "Pending var taskByStatusChart = new
Review","Completed","In Progress"], Chart(document.getElementById("taskByS
datasets: [{ tatusChart"), {
data: [15, 20, 5, 15 ,35 , 10], type: "pie",
backgroundColor: data: taskByStatusData,
["yellow","blue","lightblue","red","lightgre });
en","darkgreen"],
}]
var taskByDurationChart = new type: "pie",
Chart(document.getElementById("taskBy data: taskByDurationData,
DurationChart"), { });
OUTPUT:
Preparation 30
Performance 30
Record 40
Total 100
RESULT:
Thus the script to create a simple dashboard for project management has been executed
successfully.
EXP NO:
Develop an online survey application where a collection of questions is
DATE: available and users are asked to answer any random 5 questions
AIM:
ALGORITHM:
Survey.html:
Chart.html :
Design.css :
html {
background-image: url(images/bg.png); main {
background-repeat: no-repeat; display: flex;
background-size: cover; justify-content: center;
font-family: 'Segoe UI', Tahoma, align-items: center;
Geneva, Verdana, sans-serif; font-size: 1.2em;
} }
h1 { form {
padding: 0.5rem; display: inline-block;
font-size: 1.8rem; background-color: rgba(255, 255, 255,
color: blanchedalmond; 0.9);
} padding: 4rem;
border-radius: 1.5em; grid-template: 1fr 1fr auto / 0.3fr 1fr
width: 650px; 0.3fr 1fr;
margin-bottom: 20px; row-gap: 0.5rem;
} padding: 1em;
}
.ll{
display: inline-block; input[type="radio"] {
border: 2px solid darkred; width: 1.25em;
padding: 1em; height: 1.25em;
border-radius: 1em; }
margin-top: 1em;
width: 100%; .qa {
} padding: 0.1rem;
}
button {
background-color: rgba(183, 24, 24, input[type="radio"] {
0.854); margin-left: 10px;
color: white; }
padding: 0.9em;
border-radius: 1rem; #q7 {
font-size: 1rem; display:grid;
} grid-template: 1fr / 0.3fr 1fr 0.3fr 1fr;
row-gap: 0.5rem;
.options { padding: 1em;
display:grid; }
Chart.js :
RESULT:
Thus the script to create a survey application has been executed successfully.