FossilRepo
Add wiki_list_content.html partial (missed in previous commit)
Commit
121d0a59baede84618c94162db37fb6d70e444418f83ff3f00d9f8d6b89be661
Parent
37e1f33696615a4…
1 file changed
+46
| --- a/templates/fossil/partials/wiki_list_content.html | ||
| +++ b/templates/fossil/partials/wiki_list_content.html | ||
| @@ -0,0 +1,46 @@ | ||
| 1 | +<div class="flex gap-6"> | |
| 2 | + <!-- Main content: home page or page index --> | |
| 3 | + <div class="flex-1 min-w-0"> | |
| 4 | + {% if home_page and not search %} | |
| 5 | + <div class="overflow-hidden rounded-lg bg-gray-800 shadow-sm border border-gray-700"> | |
| 6 | + <div class="px-6 py-4 border-b border-gray-700"> | |
| 7 | + <h2 class="text-lg font-semibold text-gray-100">{{ home_page.name }}</h2> | |
| 8 | + </div> | |
| 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 | + </dnotdiv> | |
| 14 | + {% elif search and pages %} | |
| 15 | + <div class="rounded-lg bg-gray-p-8 text-center"> | |
| 16 | + <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> | |
| 17 | + </div> | |
| 18 | + {% endif %} | |
| 19 | + </div> | |
| 20 | + | |
| 21 | + <!-- Right sidebar: all pages --> | |
| 22 | + <aside class="hidden lg:block w-52 flex-shrink-0"> | |
| 23 | + <div class="sticky top-6"> | |
| 24 | + <h3 class="text-xs font-semibold uppercase tracking-wider text-gray-500 mb-3">Wiki Pages</h3> | |
| 25 | + <nav class="space-y-0.5"> | |
| 26 | + {% for p in pages %} | |
| 27 | + <a href="{% url 'fossil:wiki_page' slug=project.slug page_name=p.name %}" | |
| 28 | + class="block rounded-md px-3 py-1.5 text-sm {% if p.name == 'Home' %}text-brand-light font-medium{% else %}text-gray-400{% endif %} hover:text-gray-200 hover:bg-gray-800/50"> | |
| 29 | + {% if p.name == "Home" %} | |
| 30 | + <span class="flex items-center gap-1.5"> | |
| 31 | + <svg class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12l8.954-8.955a1.126 1.126 0 011.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" /></svg> | |
| 32 | + {{ p.name }} | |
| 33 | + </span> | |
| 34 | + {% else %} | |
| 35 | + {{ p.name }} | |
| 36 | + {% endif %} | |
| 37 | + </a> | |
| 38 | + {% endfor %} | |
| 39 | + </nav> | |
| 40 | + {% if not pages %} | |
| 41 | + <p class="text-xs text-gray-600 px-3">No pages.</p> | |
| 42 | + {% endif %} | |
| 43 | + </div> | |
| 44 | + </aside> | |
| 45 | +</div> | |
| 46 | +{% include "includes/_pagination_manual.html" %} |
| --- a/templates/fossil/partials/wiki_list_content.html | |
| +++ b/templates/fossil/partials/wiki_list_content.html | |
| @@ -0,0 +1,46 @@ | |
| --- a/templates/fossil/partials/wiki_list_content.html | |
| +++ b/templates/fossil/partials/wiki_list_content.html | |
| @@ -0,0 +1,46 @@ | |
| 1 | <div class="flex gap-6"> |
| 2 | <!-- Main content: home page or page index --> |
| 3 | <div class="flex-1 min-w-0"> |
| 4 | {% if home_page and not search %} |
| 5 | <div class="overflow-hidden rounded-lg bg-gray-800 shadow-sm border border-gray-700"> |
| 6 | <div class="px-6 py-4 border-b border-gray-700"> |
| 7 | <h2 class="text-lg font-semibold text-gray-100">{{ home_page.name }}</h2> |
| 8 | </div> |
| 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 | </dnotdiv> |
| 14 | {% elif search and pages %} |
| 15 | <div class="rounded-lg bg-gray-p-8 text-center"> |
| 16 | <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> |
| 17 | </div> |
| 18 | {% endif %} |
| 19 | </div> |
| 20 | |
| 21 | <!-- Right sidebar: all pages --> |
| 22 | <aside class="hidden lg:block w-52 flex-shrink-0"> |
| 23 | <div class="sticky top-6"> |
| 24 | <h3 class="text-xs font-semibold uppercase tracking-wider text-gray-500 mb-3">Wiki Pages</h3> |
| 25 | <nav class="space-y-0.5"> |
| 26 | {% for p in pages %} |
| 27 | <a href="{% url 'fossil:wiki_page' slug=project.slug page_name=p.name %}" |
| 28 | class="block rounded-md px-3 py-1.5 text-sm {% if p.name == 'Home' %}text-brand-light font-medium{% else %}text-gray-400{% endif %} hover:text-gray-200 hover:bg-gray-800/50"> |
| 29 | {% if p.name == "Home" %} |
| 30 | <span class="flex items-center gap-1.5"> |
| 31 | <svg class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12l8.954-8.955a1.126 1.126 0 011.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" /></svg> |
| 32 | {{ p.name }} |
| 33 | </span> |
| 34 | {% else %} |
| 35 | {{ p.name }} |
| 36 | {% endif %} |
| 37 | </a> |
| 38 | {% endfor %} |
| 39 | </nav> |
| 40 | {% if not pages %} |
| 41 | <p class="text-xs text-gray-600 px-3">No pages.</p> |
| 42 | {% endif %} |
| 43 | </div> |
| 44 | </aside> |
| 45 | </div> |
| 46 | {% include "includes/_pagination_manual.html" %} |