Spaces:
Paused
Paused
Add homepage
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454<!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>templates/index.htmlAdded+454