design: neobrutalist_theme into main

This commit is contained in:
Per Stark
2025-09-17 10:00:55 +02:00
parent 62d909bb7e
commit 6ea51095e8
57 changed files with 1791 additions and 951 deletions

View File

@@ -1,8 +1,8 @@
{% if search_result is defined and search_result %}
<ul class="list shadow">
<ul class="nb-card p-0">
{% for result in search_result %}
<li class="list-row hover:bg-base-200/50 p-4">
<div class="w-10 h-10 flex-shrink-0 mr-4 self-start mt-1">
<li class="p-4 u-hairline hover:bg-base-200/40 flex gap-3">
<div class="w-10 h-10 flex-shrink-0 self-start mt-1 grid place-items-center border-2 border-neutral bg-base-100 shadow-[4px_4px_0_0_#000]">
{% if result.url_info and result.url_info.url %}
<div class="tooltip tooltip-right" data-tip="Web Link">
{% include "icons/link_icon.html" %}
@@ -17,10 +17,10 @@
</div>
{% endif %}
</div>
<div class="flex-grow min-w-0">
<h3 class="text-lg font-semibold mb-1">
<a hx-get="/content/{{ result.id }}/read" hx-target="#modal" hx-swap="innerHTML"
class="link link-hover link-primary">
<div class="flex-1 min-w-0">
<h3 class="text-lg font-extrabold mb-1 leading-snug">
<a hx-get="/content/{{ result.id }}/read" hx-target="#modal" hx-swap="innerHTML" class="nb-link">
{% set title_text = result.highlighted_url_title
| default(result.url_info.title if result.url_info else none, true)
| default(result.highlighted_file_name, true)
@@ -30,8 +30,7 @@
</a>
</h3>
<div class="markdown-content prose prose-sm text-sm text-base-content/80 mb-3 overflow-hidden line-clamp-6"
data-content="{{result.highlighted_text | escape}}">
<div class="markdown-content prose-tufte-compact text-base-content/80 mb-3 overflow-hidden line-clamp-6" data-content="{{result.highlighted_text | escape}}">
{% if result.highlighted_text %}
{{ result.highlighted_text | escape }}
{% elif result.text %}
@@ -41,43 +40,46 @@
{% endif %}
</div>
<div class="text-xs text-base-content/70 flex flex-wrap gap-x-4 gap-y-1 items-center">
<span class="inline-flex items-center"><strong class="font-medium mr-1">Category:</strong>
<span class="badge badge-soft badge-secondary badge-sm">{{ result.highlighted_category |
default(result.category, true) |
safe }}</span>
<div class="text-xs flex flex-wrap gap-x-4 gap-y-2 items-center">
<span class="inline-flex items-center">
<span class="uppercase tracking-wide opacity-60 mr-2">Category</span>
<span class="nb-badge">{{ result.highlighted_category | default(result.category, true) | safe }}</span>
</span>
{% if result.highlighted_context or result.context %}
<span class="inline-flex items-center"><strong class="font-medium mr-1">Context:</strong>
<span class="badge badge-sm badge-outline">{{ result.highlighted_context | default(result.context, true) |
safe }}</span>
<span class="inline-flex items-center min-w-0">
<span class="uppercase tracking-wide opacity-60 mr-2">Context</span>
<span class="nb-badge">{{ result.highlighted_context | default(result.context, true) | safe }}</span>
</span>
{% endif %}
{% if result.url_info and result.url_info.url %}
<span class="inline-flex items-center min-w-0"><strong class="font-medium mr-1">Source:</strong>
<a href="{{ result.url_info.url }}" target="_blank" class="link link-hover link-xs truncate"
title="{{ result.url_info.url }}">
<span class="inline-flex items-center min-w-0">
<span class="uppercase tracking-wide opacity-60 mr-2">Source</span>
<a href="{{ result.url_info.url }}" target="_blank" class="nb-link truncate" title="{{ result.url_info.url }}">
{{ result.highlighted_url | default(result.url_info.url ) | safe }}
</a>
</span>
{% endif %}
<span class="badge badge-ghost badge-sm">Score: {{ result.score }}</span>
<span class="inline-flex items-center">
<span class="uppercase tracking-wide opacity-60 mr-2">Score</span>
<span class="nb-badge">{{ result.score }}</span>
</span>
</div>
</div>
</li>
{% endfor %}
</ul>
</ul>
{% elif query_param is defined and query_param | trim != "" %}
<div class="p-4 text-center text-base-content/70">
<p class="text-xl font-semibold mb-2">No results found for "<strong>{{ query_param | escape }}</strong>".</p>
<p class="text-sm">Try using different keywords or checking for typos.</p>
</div>
<div class="nb-panel p-5 text-center">
<p class="text-xl font-extrabold mb-2">No results for “{{ query_param | escape }}.</p>
<p class="text-sm opacity-70">Try different keywords or check for typos.</p>
</div>
{% else %}
<div class="p-4 text-center text-base-content/70">
<p class="text-lg font-medium">Enter a term above to search your knowledge base.</p>
<p class="text-sm">Results will appear here.</p>
</div>
{% endif %}
<div class="nb-panel p-5 text-center">
<p class="text-lg font-semibold">Enter a term above to search your knowledge base.</p>
<p class="text-sm opacity-70">Results will appear here.</p>
</div>
{% endif %}