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 modified README.md
93 changes: 93 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<!DOCTYPE html>
<!-- Coding By CodingNepal - youtube.com/codingnepal -->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>File Upload JavaScript with Progress Ba | CodingNepal</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
</head>
<body>

<div class="wrapper">
<div class="box">
<header>Your Slides go here.....</header>
<form action="#">
<input class="file-input" type="file" name="file" hidden>
<i class="fas fa-cloud-upload-alt"></i>
<p>Browse File to Upload</p>
</form>
<section class="progress-area">
<li class="row">
<i class="fas fa-file-alt"></i>
<div class="content">
<div class="details">
<span class="name">report.pdf • Uploading</span>
<span class="percent">20 %</span>
</div>
<div class="progress-bar">
<div class="progress" style="width: 20%"></div>
</div>
</div>
</li>
</section>
<section class="uploaded-area">
<li class="row">
<div class="content upload">
<i class="fas fa-file-alt"></i>
<div class="details">
<span class="name">report.pdf • Uploaded</span>
<span class="size">3.6 mB</span>
</div>
</div>
<i class="fas fa-check"></i>
</li>
</section>
</div>

<div class="box">
<header style="margin-bottom: 20px;">And out pops the Summary.</header>
<a href="summary.pdf" download>
<section class="progress-area">
<li class="row">
<i class="fas fa-file-alt"></i>
<div class="content">
<div class="details">
<span class="name">Summary • Generating</span>
<span class="percent">20 %</span>
</div>
<div class="progress-bar">
<div class="progress" style="width: 20%"></div>
</div>
</div>
</li>
</section>
</a>
<a href="summary.pdf" download>
<section class="uploaded-area">

<li class="row">
<div class="content upload">
<i class="fas fa-file-alt"></i>
<div class="details">
<span class="name">Summary.pdf • Generated</span>
<span class="size">2.31 mB</span>
</div>
</div>
<i class="fas fa-check"></i>
</li>
</section>
</a>
</div>
</div>
<script>
const form = document.querySelector("form"),
fileInput = document.querySelector(".file-input");
form.addEventListener("click", () =>{
fileInput.click();
});
</script>

</body>
</html>
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ pandas
requests
paytmchecksum
langchain
openai
pypdf
1 change: 1 addition & 0 deletions result.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

147 changes: 147 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
body{
display: flex;
justify-content: center;
min-height: 100vh;
background: #6990F2;
margin: 0;
}

::selection{
color: #fff;
background: #6990F2;
}
.wrapper {
display: flex;
flex-direction: column; /* stack boxes vertically */
align-items: center; /* center horizontally on desktop screens */
background: #6990F2;
border-radius: 10px;
margin: 30px;
}
.box {
background:rgb(9, 52, 243);
width:80%;
margin: 50px;
border-radius: 5px;
padding: 10px 20px;
}
@media screen and (max-width: 767px) { /* for mobile screens up to 767px width */
.wrapper {
width: 80%; /* full width */
margin: 0; /* remove horizontal margin */
}
.box {
width: 100%; /* full width */
margin-bottom: 10px; /* add vertical margin between boxes */
}
}

.box header{
color: rgb(179, 209, 219);
font-size: 27px;
font-weight: 600;
text-align: center;
}
.box form{
height: 167px;
display: flex;
cursor: pointer;
margin: 20px;
align-items: center;
justify-content: center;
flex-direction: column;
border-radius: 5px;
border: 2px dashed #6990F2;
}
form :where(i, p){
color: #6990F2;
}
form i{
font-size: 50px;
}
form p{
margin-top: 15px;
font-size: 16px;
}

section .row{
margin-bottom: 10px;
background: #E9F0FF;
list-style: none;
padding: 15px 20px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: space-between;
}
section .row i{
color: #6990F2;
font-size: 30px;
}
section .details span{
font-size: 14px;
}
.progress-area .row .content{
width: 100%;
margin-left: 15px;
}
.progress-area .details{
display: flex;
align-items: center;
margin-bottom: 7px;
justify-content: space-between;
}
.progress-area .content .progress-bar{
height: 6px;
width: 100%;
margin-bottom: 4px;
background: #fff;
border-radius: 30px;
}
.content .progress-bar .progress{
height: 100%;
width: 0%;
background: #6990F2;
border-radius: inherit;
}
.uploaded-area{
max-height: 232px;
overflow-y: scroll;
}
.uploaded-area.onprogress{
max-height: 150px;
}
.uploaded-area::-webkit-scrollbar{
width: 0px;
}
.uploaded-area .row .content{
display: flex;
align-items: center;
}
.uploaded-area .row .details{
display: flex;
margin-left: 15px;
flex-direction: column;
}
.uploaded-area .row .details .size{
color: #404040;
font-size: 11px;
}
.uploaded-area i.fa-check{
font-size: 16px;
}
a {
color:inherit;
text-decoration: inherit;
}
header {
color: #fff;
}