Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
Binary file added .DS_Store
Binary file not shown.
Binary file added day1/.DS_Store
Binary file not shown.
22 changes: 22 additions & 0 deletions day1/ammu/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Zerodha login</title>

<link rel="stylesheet" href="style.css">
</head>
<body>
<div class = "login-box">

<img src="kite-logo.svg" alt="Kite Logo" class="logo">

<h2>Login to Kite</h2>
<input type = "text" placeholder="Phone or User ID">

<input type = "password" placeholder = "Password">
<button> Login</button>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions day1/ammu/kite-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions day1/ammu/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
body{
margin:0;
padding:0;
background: rgb(255, 255, 255);

height:100vh;

display:flex;
justify-content:center;
align-items:center;
}


.login-box{
width:320px;
background: white;
padding:40px;

border-radius:9px;
box-shadow: 0 4px 10px rgba(0,0,0,0.1);

text-align:center;


}
.logo{

width:60px;

margin-bottom:20px;

}
h2{
margin-bottom:25px;
color:#333;
}

input{
width:100;
padding:12px;
margin-bottom:15px;
border:1px solid #ddd;
border-radius:4px;
font-size:16px;
box-sizing:border-box;

}

button{
width: 100%;
padding: 12px;
background: orangered;
color: white;
border:none;
border-radius:4px;
font-size:16px;
cursor:pointer;
}

button:hover{
background: green;

}

Binary file added day3/.DS_Store
Binary file not shown.
46 changes: 46 additions & 0 deletions day3/assignment/assignment-amaan.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import fs from "fs";

// promisified version of readFile
function readFilePromisified(filePath){
return new Promise((resolve,reject) => {
fs.readFile(filePath,"utf-8",(err,data) => {
if(err){
reject("Error: " + err);
}else{
resolve(data);
}
});
});
}

// promisified version of setTimeout
function setTimeoutPromisified(ms){
return new Promise((resolve) => {
setTimeout(resolve,ms);
});
}

// async function for fetch
async function getData(url){
const response = await fetch(url);
// converting to json
const data = await response.json();
console.log(data);
}

// calling readFile
readFilePromisified("a.txt")
.then((data) => {
console.log("file content: " + data);
})
.catch((err) => {
console.log(err);
});

// calling setTimeout
setTimeoutPromisified(2000).then(() => {
console.log("done after 2 seconds");
});

// calling fetch
getData("https://jsonplaceholder.typicode.com/todos/1");