Spaces:
Paused

NotesHub / templates /index.html
Ragulselvakumar's picture
Add homepage
7e1aad1 verified
Raw History Blame Contribute Delete
9.1 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NotesHub</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}
body {
background: #f5f7fb;
color: #222;
}
header {
background: #243b55;
color: white;
text-align: center;
padding: 25px 10px;
}
header h1 {
font-size: 32px;
margin-bottom: 8px;
}
header p {
font-size: 16px;
}
nav {
background: #1d3045;
padding: 15px;
text-align: center;
}
nav a {
color: white;
text-decoration: none;
margin: 0 12px;
font-weight: bold;
}
nav a:hover {
color: #ffd166;
}
.hero {
text-align: center;
padding: 55px 20px;
background: white;
}
.hero h2 {
color: #243b55;
font-size: 30px;
margin-bottom: 15px;
}
.hero p {
color: #555;
margin-bottom: 25px;
}
.btn {
display: inline-block;
padding: 11px 20px;
background: #2f80ed;
color: white;
text-decoration: none;
border-radius: 6px;
border: none;
cursor: pointer;
margin: 5px;
}
.btn:hover {
background: #1c64c6;
}
.section {
padding: 40px 8%;
}
.section h2 {
text-align: center;
color: #243b55;
margin-bottom: 25px;
}
.features {
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
}
.feature {
background: white;
width: 260px;
padding: 25px;
text-align: center;
border-radius: 10px;
box-shadow: 0 3px 10px #ddd;
}
.feature .icon {
font-size: 35px;
margin-bottom: 10px;
}
.feature h3 {
color: #243b55;
margin-bottom: 10px;
}
.search-box {
max-width: 600px;
margin: auto;
background: white;
padding: 25px;
border-radius: 10px;
box-shadow: 0 3px 10px #ddd;
text-align: center;
}
.search-box input,
.search-box select {
width: 100%;
padding: 12px;
margin: 8px 0;
border: 1px solid #ccc;
border-radius: 5px;
}
.notes {
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
}
.note-card {
width: 280px;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 3px 10px #ddd;
}
.note-card h3 {
color: #243b55;
margin-bottom: 12px;
}
.note-card p {
margin: 7px 0;
}
footer {
background: #243b55;
color: white;
text-align: center;
padding: 20px;
margin-top: 30px;
}
@media (max-width: 700px) {
header h1 {
font-size: 25px;
}
nav a {
display: inline-block;
margin: 7px;
font-size: 14px;
}
.hero h2 {
font-size: 24px;
}
}
</style>
</head>
<body>
<!-- HEADER -->
<header>
<h1>πŸ“š NotesHub</h1>
<p>
College Notes Sharing and Management System
</p>
<p>
Share β€’ Search β€’ View β€’ Download Notes
</p>
</header>
<!-- NAVIGATION -->
<nav>
<a href="/">Home</a>
<a href="/login">Login</a>
<a href="/register">Register</a>
<a href="/upload">Upload Notes</a>
<a href="/search">Search Notes</a>
{% if session.get("student_id") %}
<a href="/dashboard">My Notes</a>
<a href="/logout">Logout</a>
{% endif %}
</nav>
<!-- HERO -->
<section class="hero">
<h2>
Welcome to NotesHub
</h2>
<p>
This platform helps students to upload, share,
search and download college study notes easily.
</p>
{% if session.get("student_id") %}
<p>
Welcome, <b>{{ session.get("student_name") }}</b>! πŸ‘‹
</p>
<a href="/dashboard" class="btn">
My Dashboard
</a>
{% else %}
<a href="/login" class="btn">
Login
</a>
<a href="/register" class="btn">
Register
</a>
{% endif %}
</section>
<!-- FEATURES -->
<section class="section">
<h2>What You Can Do</h2>
<div class="features">
<div class="feature">
<div class="icon">πŸ“€</div>
<h3>Upload Notes</h3>
<p>
Upload your college PDF notes
and share them with students.
</p>
</div>
<div class="feature">
<div class="icon">πŸ”</div>
<h3>Search Notes</h3>
<p>
Search notes by subject and unit
easily.
</p>
</div>
<div class="feature">
<div class="icon">πŸ“₯</div>
<h3>Download Notes</h3>
<p>
Download useful PDF notes
for offline study.
</p>
</div>
</div>
</section>
<!-- SEARCH -->
<section class="section">
<h2>Search Notes</h2>
<div class="search-box">
<form action="/search" method="GET">
<input
type="text"
name="subject"
placeholder="Enter subject name"
>
<select name="unit">
<option value="">
Select Unit
</option>
<option value="Unit 1">Unit 1</option>
<option value="Unit 2">Unit 2</option>
<option value="Unit 3">Unit 3</option>
<option value="Unit 4">Unit 4</option>
<option value="Unit 5">Unit 5</option>
</select>
<button type="submit" class="btn">
πŸ” Search
</button>
</form>
</div>
</section>
<!-- AVAILABLE NOTES -->
<section class="section">
<h2>Available Notes</h2>
<div class="notes">
{% if notes %}
{% for note in notes %}
<div class="note-card">
<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>
<p>
<b>Uploaded by:</b>
{{ note["uploader"] or "Student" }}
</p>
<a
href="/download/{{ note['filename'] }}"
class="btn"
>
⬇️ Download
</a>
</div>
{% endfor %}
{% else %}
<p style="text-align:center; width:100%;">
No notes uploaded yet.
</p>
{% endif %}
</div>
</section>
<!-- FOOTER -->
<footer>
<p>
Β© 2026 NotesHub
</p>
<p>
College Notes Sharing and Management System
</p>
</footer>
</body>
</html>