Spaces:
Paused
Paused
Add notes search page
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>NotesHub - Search Notes</title>
<style> body { font-family: Arial, sans-serif; background: #f5f7fb; margin: 0; }
.container { width: 700px; 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; }
form { margin: 25px 0; }
input, select { width: 100%; padding: 12px; margin: 8px 0; box-sizing: border-box; border: 1px solid #ccc; border-radius: 5px; }
button { width: 100%; padding: 12px; background: #2f80ed; color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; }
.note { border: 1px solid #ddd; padding: 18px; margin-top: 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; }
.back { text-align: center; margin-top: 20px; }
.back a { color: #2f80ed; text-decoration: none; } </style></head>
<body>
<div class="container">
<h2>π Search College Notes</h2>
<form action="/search" method="GET">
<input type="text" name="subject" placeholder="Enter Subject Name" >
<select name="department"> <option value="">Select Department</option> <option value="Computer Science">Computer Science</option> <option value="Information Technology">Information Technology</option> <option value="Electronics">Electronics</option> <option value="Mechanical">Mechanical</option> <option value="Civil">Civil</option> </select>
<select name="semester"> <option value="">Select Semester</option> <option value="Semester 1">Semester 1</option> <option value="Semester 2">Semester 2</option> <option value="Semester 3">Semester 3</option> <option value="Semester 4">Semester 4</option> <option value="Semester 5">Semester 5</option> <option value="Semester 6">Semester 6</option> <option value="Semester 7">Semester 7</option> <option value="Semester 8">Semester 8</option> </select>
<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"> π Search Notes </button>
</form>
{% if notes %}
<h3>Search Results</h3>
{% 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 PDF </a>
</div>
{% endfor %}
{% else %}
<p style="text-align:center;"> No notes found. Try another search. </p>
{% endif %}
<div class="back"> <a href="/">β Back to Home</a> </div>
</div>
</body></html>templates/search.htmlAdded+195