FossilRepo
Live markdown preview, file sizes, sidebar highlighting, search shortcut Wiki form: - Write/Preview tab toggle with live markdown rendering - Uses marked.js for client-side preview - Preview pane styled with prose-invert Code browser: - File sizes shown in table (filesizeformat) - Human-readable sizes (KB, MB, etc.) Sidebar: - Active fossil primitive (Code/Timeline/Tickets/Wiki/Forum) highlighted in brand color based on current request path - Per-project scoping so only the active project's links highlight Search: - Global search icon in top nav bar - Keyboard shortcut: / opens search dropdown - Searches against current project context
Commit
51ef66c6d8d792d0223534b41224f4ee3e364332beb64832a29e921ae9b0a3d0
Parent
8586c2d9dd835ec…
4 files changed
+1
+3
+20
-4
+7
-5
+1
| --- fossil/views.py | ||
| +++ fossil/views.py | ||
| @@ -1188,10 +1188,11 @@ | ||
| 1188 | 1188 | { |
| 1189 | 1189 | "name": filename, |
| 1190 | 1190 | "path": f.name, |
| 1191 | 1191 | "is_dir": False, |
| 1192 | 1192 | "file": f, |
| 1193 | + "size": f.size, | |
| 1193 | 1194 | "commit_message": f.last_commit_message, |
| 1194 | 1195 | "commit_time": f.last_commit_time, |
| 1195 | 1196 | } |
| 1196 | 1197 | ) |
| 1197 | 1198 | |
| 1198 | 1199 |
| --- fossil/views.py | |
| +++ fossil/views.py | |
| @@ -1188,10 +1188,11 @@ | |
| 1188 | { |
| 1189 | "name": filename, |
| 1190 | "path": f.name, |
| 1191 | "is_dir": False, |
| 1192 | "file": f, |
| 1193 | "commit_message": f.last_commit_message, |
| 1194 | "commit_time": f.last_commit_time, |
| 1195 | } |
| 1196 | ) |
| 1197 | |
| 1198 |
| --- fossil/views.py | |
| +++ fossil/views.py | |
| @@ -1188,10 +1188,11 @@ | |
| 1188 | { |
| 1189 | "name": filename, |
| 1190 | "path": f.name, |
| 1191 | "is_dir": False, |
| 1192 | "file": f, |
| 1193 | "size": f.size, |
| 1194 | "commit_message": f.last_commit_message, |
| 1195 | "commit_time": f.last_commit_time, |
| 1196 | } |
| 1197 | ) |
| 1198 | |
| 1199 |
| --- templates/fossil/partials/file_tree.html | ||
| +++ templates/fossil/partials/file_tree.html | ||
| @@ -21,10 +21,13 @@ | ||
| 21 | 21 | </a> |
| 22 | 22 | {% endif %} |
| 23 | 23 | </td> |
| 24 | 24 | <td class="px-4 py-2 text-sm text-gray-500 truncate max-w-md"> |
| 25 | 25 | {{ entry.commit_message|truncatechars:60 }} |
| 26 | + </td> | |
| 27 | + <td class="px-4 py-2 whitespace-nowrap text-xs text-gray-600 text-right"> | |
| 28 | + {% if entry.size %}{{ entry.size|filesizeformat }}{% endif %} | |
| 26 | 29 | </td> |
| 27 | 30 | <td class="px-4 py-2 whitespace-nowrap text-sm text-gray-500 text-right"> |
| 28 | 31 | {% if entry.commit_time %}{{ entry.commit_time|timesince }} ago{% endif %} |
| 29 | 32 | </td> |
| 30 | 33 | </tr> |
| 31 | 34 |
| --- templates/fossil/partials/file_tree.html | |
| +++ templates/fossil/partials/file_tree.html | |
| @@ -21,10 +21,13 @@ | |
| 21 | </a> |
| 22 | {% endif %} |
| 23 | </td> |
| 24 | <td class="px-4 py-2 text-sm text-gray-500 truncate max-w-md"> |
| 25 | {{ entry.commit_message|truncatechars:60 }} |
| 26 | </td> |
| 27 | <td class="px-4 py-2 whitespace-nowrap text-sm text-gray-500 text-right"> |
| 28 | {% if entry.commit_time %}{{ entry.commit_time|timesince }} ago{% endif %} |
| 29 | </td> |
| 30 | </tr> |
| 31 |
| --- templates/fossil/partials/file_tree.html | |
| +++ templates/fossil/partials/file_tree.html | |
| @@ -21,10 +21,13 @@ | |
| 21 | </a> |
| 22 | {% endif %} |
| 23 | </td> |
| 24 | <td class="px-4 py-2 text-sm text-gray-500 truncate max-w-md"> |
| 25 | {{ entry.commit_message|truncatechars:60 }} |
| 26 | </td> |
| 27 | <td class="px-4 py-2 whitespace-nowrap text-xs text-gray-600 text-right"> |
| 28 | {% if entry.size %}{{ entry.size|filesizeformat }}{% endif %} |
| 29 | </td> |
| 30 | <td class="px-4 py-2 whitespace-nowrap text-sm text-gray-500 text-right"> |
| 31 | {% if entry.commit_time %}{{ entry.commit_time|timesince }} ago{% endif %} |
| 32 | </td> |
| 33 | </tr> |
| 34 |
+20
-4
| --- templates/fossil/wiki_form.html | ||
| +++ templates/fossil/wiki_form.html | ||
| @@ -1,18 +1,28 @@ | ||
| 1 | 1 | {% extends "base.html" %} |
| 2 | 2 | {% block title %}{{ title }} — {{ project.name }} — Fossilrepo{% endblock %} |
| 3 | + | |
| 4 | +{% block extra_head %} | |
| 5 | +<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> | |
| 6 | +{% endblock %} | |
| 3 | 7 | |
| 4 | 8 | {% block content %} |
| 5 | 9 | <h1 class="text-2xl font-bold text-gray-100 mb-2">{{ project.name }}</h1> |
| 6 | 10 | {% include "fossil/_project_nav.html" %} |
| 7 | 11 | |
| 8 | 12 | <div class="mb-4"> |
| 9 | 13 | <a href="{% url 'fossil:wiki' slug=project.slug %}" class="text-sm text-brand-light hover:text-brand">← Back to Wiki</a> |
| 10 | 14 | </div> |
| 11 | 15 | |
| 12 | -<div class="mx-auto max-w-4xl"> | |
| 13 | - <h2 class="text-xl font-bold text-gray-100 mb-4">{{ title }}</h2> | |
| 16 | +<div class="mx-auto max-w-6xl" x-data="{ tab: 'write' }"> | |
| 17 | + <div class="flex items-center justify-between mb-4"> | |
| 18 | + <h2 class="text-xl font-bold text-gray-100">{{ title }}</h2> | |
| 19 | + <div class="flex items-center gap-1 text-xs"> | |
| 20 | + <button @click="tab = 'write'" :class="tab === 'write' ? 'bg-brand text-white' : 'text-gray-500 hover:text-white'" class="px-3 py-1 rounded">Write</button> | |
| 21 | + <button @click="tab = 'preview'; document.getElementById('preview-pane').innerHTML = marked.parse(document.getElementById('content-input').value)" :class="tab === 'preview' ? 'bg-brand text-white' : 'text-gray-500 hover:text-white'" class="px-3 py-1 rounded">Preview</button> | |
| 22 | + </div> | |
| 23 | + </div> | |
| 14 | 24 | |
| 15 | 25 | <form method="post" class="space-y-4 rounded-lg bg-gray-800 p-6 shadow border border-gray-700"> |
| 16 | 26 | {% csrf_token %} |
| 17 | 27 | |
| 18 | 28 | {% if not page %} |
| @@ -21,15 +31,21 @@ | ||
| 21 | 31 | <input type="text" name="name" required placeholder="Page title" |
| 22 | 32 | class="w-full rounded-md border-gray-700 bg-gray-800 text-gray-100 shadow-sm focus:border-brand focus:ring-brand sm:text-sm"> |
| 23 | 33 | </div> |
| 24 | 34 | {% endif %} |
| 25 | 35 | |
| 26 | - <div> | |
| 36 | + <div x-show="tab === 'write'"> | |
| 27 | 37 | <label class="block text-sm font-medium text-gray-300 mb-1">Content (Markdown)</label> |
| 28 | - <textarea name="content" rows="20" placeholder="Write in Markdown..." | |
| 38 | + <textarea id="content-input" name="content" rows="20" placeholder="Write in Markdown..." | |
| 29 | 39 | class="w-full rounded-md border-gray-700 bg-gray-800 text-gray-100 shadow-sm focus:border-brand focus:ring-brand sm:text-sm font-mono">{% if page %}{{ page.content }}{% endif %}</textarea> |
| 30 | 40 | </div> |
| 41 | + | |
| 42 | + <div x-show="tab === 'preview'" style="display:none"> | |
| 43 | + <div id="preview-pane" class="prose prose-invert prose-gray max-w-none min-h-[20rem] p-4 rounded-md border border-gray-700 bg-gray-900"> | |
| 44 | + <p class="text-gray-500 italic">Click Preview to render...</p> | |
| 45 | + </div> | |
| 46 | + </div> | |
| 31 | 47 | |
| 32 | 48 | <div class="flex justify-end gap-3 pt-2"> |
| 33 | 49 | <a href="{% url 'fossil:wiki' slug=project.slug %}" |
| 34 | 50 | class="rounded-md bg-gray-700 px-4 py-2 text-sm font-semibold text-gray-100 shadow-sm ring-1 ring-inset ring-gray-600 hover:bg-gray-600"> |
| 35 | 51 | Cancel |
| 36 | 52 |
| --- templates/fossil/wiki_form.html | |
| +++ templates/fossil/wiki_form.html | |
| @@ -1,18 +1,28 @@ | |
| 1 | {% extends "base.html" %} |
| 2 | {% block title %}{{ title }} — {{ project.name }} — Fossilrepo{% endblock %} |
| 3 | |
| 4 | {% block content %} |
| 5 | <h1 class="text-2xl font-bold text-gray-100 mb-2">{{ project.name }}</h1> |
| 6 | {% include "fossil/_project_nav.html" %} |
| 7 | |
| 8 | <div class="mb-4"> |
| 9 | <a href="{% url 'fossil:wiki' slug=project.slug %}" class="text-sm text-brand-light hover:text-brand">← Back to Wiki</a> |
| 10 | </div> |
| 11 | |
| 12 | <div class="mx-auto max-w-4xl"> |
| 13 | <h2 class="text-xl font-bold text-gray-100 mb-4">{{ title }}</h2> |
| 14 | |
| 15 | <form method="post" class="space-y-4 rounded-lg bg-gray-800 p-6 shadow border border-gray-700"> |
| 16 | {% csrf_token %} |
| 17 | |
| 18 | {% if not page %} |
| @@ -21,15 +31,21 @@ | |
| 21 | <input type="text" name="name" required placeholder="Page title" |
| 22 | class="w-full rounded-md border-gray-700 bg-gray-800 text-gray-100 shadow-sm focus:border-brand focus:ring-brand sm:text-sm"> |
| 23 | </div> |
| 24 | {% endif %} |
| 25 | |
| 26 | <div> |
| 27 | <label class="block text-sm font-medium text-gray-300 mb-1">Content (Markdown)</label> |
| 28 | <textarea name="content" rows="20" placeholder="Write in Markdown..." |
| 29 | class="w-full rounded-md border-gray-700 bg-gray-800 text-gray-100 shadow-sm focus:border-brand focus:ring-brand sm:text-sm font-mono">{% if page %}{{ page.content }}{% endif %}</textarea> |
| 30 | </div> |
| 31 | |
| 32 | <div class="flex justify-end gap-3 pt-2"> |
| 33 | <a href="{% url 'fossil:wiki' slug=project.slug %}" |
| 34 | class="rounded-md bg-gray-700 px-4 py-2 text-sm font-semibold text-gray-100 shadow-sm ring-1 ring-inset ring-gray-600 hover:bg-gray-600"> |
| 35 | Cancel |
| 36 |
| --- templates/fossil/wiki_form.html | |
| +++ templates/fossil/wiki_form.html | |
| @@ -1,18 +1,28 @@ | |
| 1 | {% extends "base.html" %} |
| 2 | {% block title %}{{ title }} — {{ project.name }} — Fossilrepo{% endblock %} |
| 3 | |
| 4 | {% block extra_head %} |
| 5 | <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> |
| 6 | {% endblock %} |
| 7 | |
| 8 | {% block content %} |
| 9 | <h1 class="text-2xl font-bold text-gray-100 mb-2">{{ project.name }}</h1> |
| 10 | {% include "fossil/_project_nav.html" %} |
| 11 | |
| 12 | <div class="mb-4"> |
| 13 | <a href="{% url 'fossil:wiki' slug=project.slug %}" class="text-sm text-brand-light hover:text-brand">← Back to Wiki</a> |
| 14 | </div> |
| 15 | |
| 16 | <div class="mx-auto max-w-6xl" x-data="{ tab: 'write' }"> |
| 17 | <div class="flex items-center justify-between mb-4"> |
| 18 | <h2 class="text-xl font-bold text-gray-100">{{ title }}</h2> |
| 19 | <div class="flex items-center gap-1 text-xs"> |
| 20 | <button @click="tab = 'write'" :class="tab === 'write' ? 'bg-brand text-white' : 'text-gray-500 hover:text-white'" class="px-3 py-1 rounded">Write</button> |
| 21 | <button @click="tab = 'preview'; document.getElementById('preview-pane').innerHTML = marked.parse(document.getElementById('content-input').value)" :class="tab === 'preview' ? 'bg-brand text-white' : 'text-gray-500 hover:text-white'" class="px-3 py-1 rounded">Preview</button> |
| 22 | </div> |
| 23 | </div> |
| 24 | |
| 25 | <form method="post" class="space-y-4 rounded-lg bg-gray-800 p-6 shadow border border-gray-700"> |
| 26 | {% csrf_token %} |
| 27 | |
| 28 | {% if not page %} |
| @@ -21,15 +31,21 @@ | |
| 31 | <input type="text" name="name" required placeholder="Page title" |
| 32 | class="w-full rounded-md border-gray-700 bg-gray-800 text-gray-100 shadow-sm focus:border-brand focus:ring-brand sm:text-sm"> |
| 33 | </div> |
| 34 | {% endif %} |
| 35 | |
| 36 | <div x-show="tab === 'write'"> |
| 37 | <label class="block text-sm font-medium text-gray-300 mb-1">Content (Markdown)</label> |
| 38 | <textarea id="content-input" name="content" rows="20" placeholder="Write in Markdown..." |
| 39 | class="w-full rounded-md border-gray-700 bg-gray-800 text-gray-100 shadow-sm focus:border-brand focus:ring-brand sm:text-sm font-mono">{% if page %}{{ page.content }}{% endif %}</textarea> |
| 40 | </div> |
| 41 | |
| 42 | <div x-show="tab === 'preview'" style="display:none"> |
| 43 | <div id="preview-pane" class="prose prose-invert prose-gray max-w-none min-h-[20rem] p-4 rounded-md border border-gray-700 bg-gray-900"> |
| 44 | <p class="text-gray-500 italic">Click Preview to render...</p> |
| 45 | </div> |
| 46 | </div> |
| 47 | |
| 48 | <div class="flex justify-end gap-3 pt-2"> |
| 49 | <a href="{% url 'fossil:wiki' slug=project.slug %}" |
| 50 | class="rounded-md bg-gray-700 px-4 py-2 text-sm font-semibold text-gray-100 shadow-sm ring-1 ring-inset ring-gray-600 hover:bg-gray-600"> |
| 51 | Cancel |
| 52 |
+7
-5
| --- templates/includes/sidebar.html | ||
| +++ templates/includes/sidebar.html | ||
| @@ -54,30 +54,32 @@ | ||
| 54 | 54 | <div x-show="open" x-collapse class="ml-3 mt-0.5 space-y-0.5 border-l border-gray-700/50 pl-2"> |
| 55 | 55 | <a href="{% url 'projects:detail' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> |
| 56 | 56 | <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="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg> |
| 57 | 57 | Overview |
| 58 | 58 | </a> |
| 59 | - <a href="{% url 'fossil:code' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> | |
| 59 | + {% with pslug=project.slug %} | |
| 60 | + <a href="{% url 'fossil:code' slug=pslug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/fossil/code' in request.path and pslug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}"> | |
| 60 | 61 | <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="M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5" /></svg> |
| 61 | 62 | Code |
| 62 | 63 | </a> |
| 63 | - <a href="{% url 'fossil:timeline' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> | |
| 64 | + <a href="{% url 'fossil:timeline' slug=pslug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/fossil/timeline' in request.path and pslug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}"> | |
| 64 | 65 | <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="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg> |
| 65 | 66 | Timeline |
| 66 | 67 | </a> |
| 67 | - <a href="{% url 'fossil:tickets' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> | |
| 68 | + <a href="{% url 'fossil:tickets' slug=pslug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/fossil/tickets' in request.path and pslug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}"> | |
| 68 | 69 | <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="M16.5 6v.75m0 3v.75m0 3v.75m0 3V18m-9-5.25h5.25M7.5 15h3M3.375 5.25c-.621 0-1.125.504-1.125 1.125v3.026a2.999 2.999 0 010 5.198v3.026c0 .621.504 1.125 1.125 1.125h17.25c.621 0 1.125-.504 1.125-1.125v-3.026a2.999 2.999 0 010-5.198V6.375c0-.621-.504-1.125-1.125-1.125H3.375z" /></svg> |
| 69 | 70 | Tickets |
| 70 | 71 | </a> |
| 71 | - <a href="{% url 'fossil:wiki' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> | |
| 72 | + <a href="{% url 'fossil:wiki' slug=pslug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/fossil/wiki' in request.path and pslug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}"> | |
| 72 | 73 | <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="M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25" /></svg> |
| 73 | 74 | Wiki |
| 74 | 75 | </a> |
| 75 | - <a href="{% url 'fossil:forum' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> | |
| 76 | + <a href="{% url 'fossil:forum' slug=pslug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/fossil/forum' in request.path and pslug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}"> | |
| 76 | 77 | <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="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" /></svg> |
| 77 | 78 | Forum |
| 78 | 79 | </a> |
| 80 | + {% endwith %} | |
| 79 | 81 | </div> |
| 80 | 82 | </div> |
| 81 | 83 | {% endfor %} |
| 82 | 84 | {% if perms.projects.add_project %} |
| 83 | 85 | <a href="{% url 'projects:create' %}" |
| 84 | 86 |
| --- templates/includes/sidebar.html | |
| +++ templates/includes/sidebar.html | |
| @@ -54,30 +54,32 @@ | |
| 54 | <div x-show="open" x-collapse class="ml-3 mt-0.5 space-y-0.5 border-l border-gray-700/50 pl-2"> |
| 55 | <a href="{% url 'projects:detail' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> |
| 56 | <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="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg> |
| 57 | Overview |
| 58 | </a> |
| 59 | <a href="{% url 'fossil:code' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> |
| 60 | <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="M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5" /></svg> |
| 61 | Code |
| 62 | </a> |
| 63 | <a href="{% url 'fossil:timeline' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> |
| 64 | <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="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg> |
| 65 | Timeline |
| 66 | </a> |
| 67 | <a href="{% url 'fossil:tickets' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> |
| 68 | <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="M16.5 6v.75m0 3v.75m0 3v.75m0 3V18m-9-5.25h5.25M7.5 15h3M3.375 5.25c-.621 0-1.125.504-1.125 1.125v3.026a2.999 2.999 0 010 5.198v3.026c0 .621.504 1.125 1.125 1.125h17.25c.621 0 1.125-.504 1.125-1.125v-3.026a2.999 2.999 0 010-5.198V6.375c0-.621-.504-1.125-1.125-1.125H3.375z" /></svg> |
| 69 | Tickets |
| 70 | </a> |
| 71 | <a href="{% url 'fossil:wiki' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> |
| 72 | <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="M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25" /></svg> |
| 73 | Wiki |
| 74 | </a> |
| 75 | <a href="{% url 'fossil:forum' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> |
| 76 | <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="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" /></svg> |
| 77 | Forum |
| 78 | </a> |
| 79 | </div> |
| 80 | </div> |
| 81 | {% endfor %} |
| 82 | {% if perms.projects.add_project %} |
| 83 | <a href="{% url 'projects:create' %}" |
| 84 |
| --- templates/includes/sidebar.html | |
| +++ templates/includes/sidebar.html | |
| @@ -54,30 +54,32 @@ | |
| 54 | <div x-show="open" x-collapse class="ml-3 mt-0.5 space-y-0.5 border-l border-gray-700/50 pl-2"> |
| 55 | <a href="{% url 'projects:detail' slug=project.slug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300"> |
| 56 | <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="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg> |
| 57 | Overview |
| 58 | </a> |
| 59 | {% with pslug=project.slug %} |
| 60 | <a href="{% url 'fossil:code' slug=pslug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/fossil/code' in request.path and pslug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}"> |
| 61 | <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="M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5" /></svg> |
| 62 | Code |
| 63 | </a> |
| 64 | <a href="{% url 'fossil:timeline' slug=pslug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/fossil/timeline' in request.path and pslug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}"> |
| 65 | <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="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg> |
| 66 | Timeline |
| 67 | </a> |
| 68 | <a href="{% url 'fossil:tickets' slug=pslug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/fossil/tickets' in request.path and pslug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}"> |
| 69 | <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="M16.5 6v.75m0 3v.75m0 3v.75m0 3V18m-9-5.25h5.25M7.5 15h3M3.375 5.25c-.621 0-1.125.504-1.125 1.125v3.026a2.999 2.999 0 010 5.198v3.026c0 .621.504 1.125 1.125 1.125h17.25c.621 0 1.125-.504 1.125-1.125v-3.026a2.999 2.999 0 010-5.198V6.375c0-.621-.504-1.125-1.125-1.125H3.375z" /></svg> |
| 70 | Tickets |
| 71 | </a> |
| 72 | <a href="{% url 'fossil:wiki' slug=pslug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/fossil/wiki' in request.path and pslug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}"> |
| 73 | <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="M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25" /></svg> |
| 74 | Wiki |
| 75 | </a> |
| 76 | <a href="{% url 'fossil:forum' slug=pslug %}" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/fossil/forum' in request.path and pslug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}"> |
| 77 | <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="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" /></svg> |
| 78 | Forum |
| 79 | </a> |
| 80 | {% endwith %} |
| 81 | </div> |
| 82 | </div> |
| 83 | {% endfor %} |
| 84 | {% if perms.projects.add_project %} |
| 85 | <a href="{% url 'projects:create' %}" |
| 86 |