Files
FileRise/index.html
Sergey Svinolobov 2ccb8f55fe initial commit
2024-06-24 16:02:24 -04:00

159 lines
5.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>File Upload</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style>
.container {
margin-top: 10px;
}
.btn-upload {
background-color: #007bff;
color: white;
border-radius: 5px;
}
.btn-upload:disabled {
background-color: gray;
}
.btn-choose-file {
background-color: #6c757d;
color: white;
border-radius: 5px;
}
.file-list {
margin-top: 10px;
}
.progress {
margin-top: 10px;
height: 20px; /* Narrow progress bar */
width: 100%;
}
.progress-bar {
height: 100%; /* Fill the entire height */
}
table {
width: 100%;
border-collapse: collapse;
}
table, th, td {
border: 1px solid black;
}
th, td {
padding: 10px;
text-align: left;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
h2 {
font-size: 1.5em; /* Smaller font size */
}
.form-group {
margin-bottom: 5px; /* Reduce vertical space between form groups */
}
label {
font-size: 0.9em; /* Smaller font size */
}
.btn {
font-size: 0.9em; /* Smaller font size for buttons */
}
.align-items-center {
display: flex;
align-items: center;
}
.table th button {
background: none;
border: none;
color: inherit;
cursor: pointer;
padding: 0;
}
#loginForm, #uploadForm {
display: none;
}
.form-row {
align-items: flex-start; /* Align items by top */
}
.full-width {
width: 100%;
}
.btn-delete {
background-color: #dc3545;
color: white;
border: none;
padding: 5px 10px;
cursor: pointer;
border-radius: 5px;
}
.btn-delete:hover {
background-color: #c82333;
}
</style>
</head>
<body>
<div class="container">
<div class="row" id="loginForm">
<div class="col-md-6">
<form id="authForm" method="post">
<div class="form-row align-items-center">
<div class="form-group col-4 col-md-4">
<label for="loginUsername">User:</label>
<input type="text" class="form-control" id="loginUsername" name="username" required>
</div>
<div class="form-group col-4 col-md-4">
<label for="loginPassword">Password:</label>
<input type="password" class="form-control" id="loginPassword" name="password" required>
</div>
<div class="form-group col-4 col-md-4 align-items-center" style="padding-top: 26px;">
<button type="submit" class="btn btn-upload btn-block" style="transform: translateY(2px);">Login</button>
</div>
</div>
</form>
</div>
</div>
<div class="row" id="uploadForm">
<div class="col-md-12">
<form id="uploadFileForm" method="post" enctype="multipart/form-data">
<div class="form-row align-items-center">
<div class="form-group col-4 col-md-4" style="transform: translateY(4px);">
<label class="btn btn-choose-file btn-block">
Choose File <input type="file" id="file" name="file" required hidden>
</label>
</div>
<div class="form-group col-4 col-md-4">
<input type="submit" value="Upload" id="uploadBtn" class="btn btn-upload btn-block" disabled>
</div>
</div>
<div class="form-row">
<div class="form-group col-12 full-width">
<span id="fileName"></span>
</div>
</div>
<div class="form-row">
<div class="form-group col-12 full-width">
<div id="statusMessage" class="ml-0"></div>
</div>
</div>
<div class="form-row" id="progressRow" style="display: none;">
<div class="form-group col-12">
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 0%;" id="progressBar"></div>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="file-list">
<div id="fileList" class="full-width"></div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="auth.js"></script>
<script src="upload.js"></script>
<script src="displayFileList.js"></script>
</body>
</html>