adiciona o buscador e cria views e templates para ele

This commit is contained in:
root
2025-03-07 15:31:53 +01:00
parent 1cd93f7955
commit 3f5ac79051
18 changed files with 378 additions and 235 deletions

View File

@ -46,7 +46,16 @@
.result-item:last-child {
border-bottom: none;
}
.pdf-link {
color: #e74c3c;
margin-left: 10px;
font-size: 0.8em;
text-decoration: none;
}
.result-title {
display: flex;
align-items: center;
justify-content: space-between;
color: #1a0dab;
font-weight: 500;
margin-bottom: 5px;
@ -218,12 +227,23 @@ document.getElementById('suggestionsBox').addEventListener('click', function(e)
{% endif %}
</div>
<h5 class="result-title">
<a href="#">{{ result.highlighted_title|safe }}</a>
<a href="{{ result.pdf_url }}" target="_blank">{{ result.highlighted_title|safe }}</a>
<a href="{{ result.pdf_url }}" target="_blank" class="pdf-link" title="Abrir PDF completo">
<i class="bi bi-file-pdf"></i>
</a>
</h5>
<div class="result-content">{{ result.highlighted_content|safe }}</div>
<div class="result-meta">
<i class="bi bi-calendar-date"></i> {{ result.uploaded_at|date:"d/m/Y" }}
</div>
<div class="result-meta">
<i class="bi bi-calendar-date"></i> {{ result.uploaded_at|date:"d/m/Y" }}
{% if result.matching_pages %}
<span class="ms-3">
<i class="bi bi-file-earmark-text"></i> Páginas encontradas:
{% for page in result.matching_pages %}
<a href="{{ result.pdf_url }}#page={{ page }}" target="_blank" class="badge bg-light text-dark">{{ page }}</a>
{% endfor %}
</span>
{% endif %}
</div>
</div>
{% endfor %}
</div>