FossilRepo
Show search results in main area when wiki search has matches
Commit
385412136e63b1e07da382d8c19d042e153e4b5c0fbafe4fdd47be8a357e1c57
Parent
121d0a59baede84…
1 file changed
+10
| --- templates/fossil/partials/wiki_list_content.html | ||
| +++ templates/fossil/partials/wiki_list_content.html | ||
| @@ -9,10 +9,20 @@ | ||
| 9 | 9 | <div class="px-6 py-6"> |
| 10 | 10 | <div class="prose prose-invert prose-gray max-w-none"> |
| 11 | 11 | {{ home_content_html }} |
| 12 | 12 | </div> |
| 13 | 13 | </div> |
| 14 | + </div> | |
| 15 | + {% elif search and pages %} | |
| 16 | + <div class="rounded-lg bg-gray-800 border border-gray-700 divide-y divide-gray-700/70"> | |
| 17 | + {% for p in pages %} | |
| 18 | + <a href="{% url 'fossil:wiki_page' slug=project.slug page_name=p.name %}" | |
| 19 | + class="flex items-center justify-between px-5 py-3 hover:bg-gray-700/30 transition-colors group"> | |
| 20 | + <span class="text-sm font-medium text-gray-200 group-hover:text-brand-light">{{ p.name }}</span> | |
| 21 | + <svg class="h-4 w-4 text-gray-600 group-hover:text-brand-light" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /></svg> | |
| 22 | + </a> | |
| 23 | + {% endfor %} | |
| 14 | 24 | </div> |
| 15 | 25 | {% elif not pages %} |
| 16 | 26 | <div class="rounded-lg bg-gray-800 border border-gray-700 p-8 text-center"> |
| 17 | 27 | <p class="text-sm text-gray-500">{% if search %}No wiki pages matching "{{ search }}".{% else %}No wiki pages yet. Create a "Home" page to get started.{% endif %}</p> |
| 18 | 28 | </div> |
| 19 | 29 |
| --- templates/fossil/partials/wiki_list_content.html | |
| +++ templates/fossil/partials/wiki_list_content.html | |
| @@ -9,10 +9,20 @@ | |
| 9 | <div class="px-6 py-6"> |
| 10 | <div class="prose prose-invert prose-gray max-w-none"> |
| 11 | {{ home_content_html }} |
| 12 | </div> |
| 13 | </div> |
| 14 | </div> |
| 15 | {% elif not pages %} |
| 16 | <div class="rounded-lg bg-gray-800 border border-gray-700 p-8 text-center"> |
| 17 | <p class="text-sm text-gray-500">{% if search %}No wiki pages matching "{{ search }}".{% else %}No wiki pages yet. Create a "Home" page to get started.{% endif %}</p> |
| 18 | </div> |
| 19 |
| --- templates/fossil/partials/wiki_list_content.html | |
| +++ templates/fossil/partials/wiki_list_content.html | |
| @@ -9,10 +9,20 @@ | |
| 9 | <div class="px-6 py-6"> |
| 10 | <div class="prose prose-invert prose-gray max-w-none"> |
| 11 | {{ home_content_html }} |
| 12 | </div> |
| 13 | </div> |
| 14 | </div> |
| 15 | {% elif search and pages %} |
| 16 | <div class="rounded-lg bg-gray-800 border border-gray-700 divide-y divide-gray-700/70"> |
| 17 | {% for p in pages %} |
| 18 | <a href="{% url 'fossil:wiki_page' slug=project.slug page_name=p.name %}" |
| 19 | class="flex items-center justify-between px-5 py-3 hover:bg-gray-700/30 transition-colors group"> |
| 20 | <span class="text-sm font-medium text-gray-200 group-hover:text-brand-light">{{ p.name }}</span> |
| 21 | <svg class="h-4 w-4 text-gray-600 group-hover:text-brand-light" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /></svg> |
| 22 | </a> |
| 23 | {% endfor %} |
| 24 | </div> |
| 25 | {% elif not pages %} |
| 26 | <div class="rounded-lg bg-gray-800 border border-gray-700 p-8 text-center"> |
| 27 | <p class="text-sm text-gray-500">{% if search %}No wiki pages matching "{{ search }}".{% else %}No wiki pages yet. Create a "Home" page to get started.{% endif %}</p> |
| 28 | </div> |
| 29 |