Add search feature using grep.

This commit is contained in:
2025-08-31 01:19:08 -05:00
parent 5d760b4cdf
commit f3e708922f
4 changed files with 121 additions and 2 deletions

8
templates/search.css Normal file
View File

@@ -0,0 +1,8 @@
#results {
list-style-type: none;
padding: 0;
}
#results li {
border-bottom: 1px solid;
}

21
templates/search.html Normal file
View File

@@ -0,0 +1,21 @@
{% extends "base.html" %}
{% block styles %}
{{ super() }}
<link rel="StyleSheet" href="/search.css" type="text/css" media="screen" />
{% endblock styles %}
{% block content %}
<ul id="results">
{% for result in results %}
<li>
<h2><a href="{{ relative_root | safe }}{{ result.page.url }}">{{ result.page.full_name }}</a></h2>
{% for line in result.matches %}
<p>{{ line | safe }}</p>
{% endfor %}
</li>
{% endfor %}
</ul>
{% endblock content %}