FossilRepo

fossilrepo / templates / fossil / partials / wiki_list_content.html
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
</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
{% endif %}
30
</div>
31
32
<!-- Right sidebar: all pages -->
33
<aside class="hidden lg:block w-52 flex-shrink-0">
34
<div class="sticky top-6">
35
<h3 class="text-xs font-semibold uppercase tracking-wider text-gray-500 mb-3">Wiki Pages</h3>
36
<nav class="space-y-0.5">
37
{% for p in pages %}
38
<a href="{% url 'fossil:wiki_page' slug=project.slug page_name=p.name %}"
39
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">
40
{% if p.name == "Home" %}
41
<span class="flex items-center gap-1.5">
42
<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>
43
{{ p.name }}
44
</span>
45
{% else %}
46
{{ p.name }}
47
{% endif %}
48
</a>
49
{% endfor %}
50
</nav>
51
{% if not pages %}
52
<p class="text-xs text-gray-600 px-3">No pages.</p>
53
{% endif %}
54
</div>
55
</aside>
56
</div>
57
{% include "includes/_pagination_manual.html" %}
58

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button