<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Panel</title>
</head>
<body>
<header>
<h1>Admin Panel</h1>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Files</a></li>
<li><a href="#">Settings</a></li>
</ul>
</nav>
</header>
<div class="container">
<h2>View Files</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Size</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>file1.txt</td>
<td>10 KB</td>
<td>
<button class="view-btn" onclick="viewFile('file1.txt')">View</button>
<button class="delete-btn" onclick="deleteFile('file1.txt')">Delete</button>
</td>
</tr>
<tr>
<td>file2.pdf</td>
<td>100 KB</td>
<td>
<button class="view-btn" onclick="viewFile('file2.pdf')">View</button>
<button class="delete-btn" onclick="deleteFile('file2.pdf')">Delete</button>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: #fff;
padding: 10px 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
nav ul {
list-style-type: none;
margin: 55px;
padding: 0;
text-align: center;
justify-content: center;
}
nav ul li {
display: inline;
margin-right: 10px;
}
nav ul li a {
color: #fff;
text-decoration: none;
}
.container {
margin: 20px;
}
table {
width: 100%;
border-collapse: collapse;
}
table th, table td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
table th {
background-color: #f2f2f2;
}
.delete-btn, .view-btn {
background-color: #4CAF50;
color: white;
padding: 8px 12px;
border: none;
cursor: pointer;
}
.delete-btn:hover, .view-btn:hover {
background-color: #45a049;
}
</style>
<script>
function viewFile(filename) {
console.log('Viewing file:', filename);
}
function deleteFile(filename) {
console.log('Deleting file:', filename);
}
</script>