-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathhome.html
More file actions
52 lines (50 loc) · 1.26 KB
/
home.html
File metadata and controls
52 lines (50 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{% extends "base.html" %} {% block title %}Home{% endblock %} {% block content
%}
<h1 class="text-center">Notes</h1>
<div class="search-container">
<form action="{{ url_for('views.home') }}" method="get" class="search-form">
<input
type="text"
name="q"
placeholder="Search notes..."
value="{{ query or '' }}"
/>
<button type="submit">Search</button>
<a href="{{ url_for('views.clear_search') }}">
<button
type="button"
id="clear-search"
title="Clear search and show all notes"
>
Show all notes
</button>
</a>
{% if query %}<span class="search-info"
>Showing results for "{{ query }}"</span
>{% endif %}
</form>
</div>
<br />
{% if notes %}
<ul class="list-group">
{% for note in notes %}
<li class="list-group-item">
{{ note.data }}
<button type="button" class="close" onClick="deleteNote({{ note.id }})">
<span aria-hidden="true">×</span>
</button>
</li>
{% endfor %}
</ul>
{% else %}
<p>No notes found.</p>
{% endif %}
<br />
<form method="POST">
<textarea name="note" id="note" class="form-control"></textarea>
<br />
<div align="center">
<button type="submit" class="btn btn-primary">Add Note</button>
</div>
</form>
{% endblock %}