Spaces:
Paused

NotesHub / templates /dashboard.html
Ragulselvakumar's picture
Add dashboard page
5356eb0 verified
Raw History Blame Contribute Delete
3.19 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NotesHub - My Notes</title>
<style>
body {
font-family: Arial, sans-serif;
background: #f5f7fb;
margin: 0;
}
.container {
width: 800px;
max-width: 90%;
margin: 40px auto;
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 3px 12px #ccc;
}
h2 {
text-align: center;
color: #243b55;
margin-bottom: 25px;
}
.note {
border: 1px solid #ddd;
padding: 20px;
margin-bottom: 15px;
border-radius: 8px;
}
.note h3 {
color: #243b55;
}
.download {
display: inline-block;
background: #2f80ed;
color: white;
padding: 9px 15px;
text-decoration: none;
border-radius: 5px;
margin-top: 8px;
}
.delete {
display: inline-block;
background: #d9534f;
color: white;
padding: 9px 15px;
text-decoration: none;
border-radius: 5px;
margin-top: 8px;
}
.back {
text-align: center;
margin-top: 25px;
}
.back a {
color: #2f80ed;
text-decoration: none;
}
</style>
</head>
<body>
<div class="container">
<h2>πŸ“š My Notes</h2>
{% if notes %}
{% for note in notes %}
<div class="note">
<h3>πŸ“„ {{ note["title"] }}</h3>
<p>
<b>Department:</b>
{{ note["department"] }}
</p>
<p>
<b>Semester:</b>
{{ note["semester"] }}
</p>
<p>
<b>Subject:</b>
{{ note["subject"] }}
</p>
<p>
<b>Unit:</b>
{{ note["unit"] }}
</p>
<a
href="/download/{{ note['filename'] }}"
class="download"
>
⬇️ Download
</a>
<a
href="/delete/{{ note['id'] }}"
class="delete"
onclick="return confirm('Are you sure you want to delete this note?');"
>
πŸ—‘οΈ Delete
</a>
</div>
{% endfor %}
{% else %}
<p style="text-align:center;">
You have not uploaded any notes yet.
</p>
<p style="text-align:center;">
<a href="/upload" class="download">
πŸ“€ Upload Your First Note
</a>
</p>
{% endif %}
<div class="back">
<a href="/">← Back to Home</a>
</div>
</div>
</body>
</html>