FossilRepo

fossilrepo / templates / fossil / code_browser.html
1
{% extends "base.html" %}
2
{% load fossil_filters %}
3
{% load humanize %}
4
{% block title %}{% if current_dir %}{{ current_dir }} — {% endif %}Code — {{ project.name }} — Fossilrepo{% endblock %}
5
6
{% block content %}
7
<h1 class="text-2xl font-bold text-gray-100 mb-2">{{ project.name }}</h1>
8
{% include "fossil/_project_nav.html" %}
9
10
<div class="overflow-hidden rounded-lg bg-gray-800 shadow-sm border border-gray-700">
11
<!-- Breadcrumb + commit bar -->
12
<div class="px-4 py-3 border-b border-gray-700">
13
<!-- Breadcrumbs -->
14
<div class="flex flex-wrap items-center justify-between gap-2">
15
<div class="flex items-center gap-1 text-sm min-w-0">
16
<a href="{% url 'fossil:code' slug=project.slug %}" class="text-brand-light hover:text-brand font-medium">{{ project.name }}</a>
17
{% for crumb in breadcrumbs %}
18
<span class="text-gray-600">/</span>
19
{% if forloop.last %}
20
<span class="text-gray-200 font-medium">{{ crumb.name }}</span>
21
{% else %}
22
<a href="{% url 'fossil:code_dir' slug=project.slug dirpath=crumb.path %}" class="text-brand-light hover:text-brand">{{ crumb.name }}</a>
23
{% endif %}
24
{% endfor %}
25
</div>
26
{% if metadata %}
27
<div class="flex items-center gap-2 flex-shrink-0 text-xs text-gray-500">
28
<svg class="h-3.5 w-3.5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
29
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" />
30
</svg>
31
{{ metadata.checkin_count }} commit{{ metadata.checkin_count|pluralize }}
32
</div>
33
{% endif %}
34
</div>
35
36
<!-- Latest commit info -->
37
{% if latest_commit %}
38
<div class="flex flex-wrap items-center gap-x-3 gap-y-1 mt-2 text-xs text-gray-500">
39
<a href="{% url 'fossil:user_activity' slug=project.slug username=latest_commit.user %}" class="font-medium text-gray-300 hover:text-brand-light">{{ latest_commit.user|display_user }}</a>
40
<a href="{% url 'fossil:checkin_detail' slug=project.slug checkin_uuid=latest_commit.uuid %}" class="text-gray-400 truncate hover:text-brand-light">{{ latest_commit.comment|truncatechars:80 }}</a>
41
<a href="{% url 'fossil:checkin_detail' slug=project.slug checkin_uuid=latest_commit.uuid %}" class="font-mono text-brand-light hover:text-brand">{{ latest_commit.uuid|truncatechars:10 }}</a>
42
<span>{{ latest_commit.timestamp|date:"Y-m-d H:i" }} UTC</span>
43
</div>
44
{% endif %}
45
</div>
46
47
<!-- File table -->
48
{% include "fossil/partials/file_tree.html" %}
49
</div>
50
51
{% if readme_html %}
52
<div class="mt-4 rounded-lg bg-gray-800 border border-gray-700 shadow-sm">
53
<div class="px-4 py-3 border-b border-gray-700 text-sm font-medium text-gray-300">README</div>
54
<div class="px-6 py-5">
55
<div class="prose prose-invert prose-gray max-w-none">
56
{{ readme_html }}
57
</div>
58
</div>
59
</div>
60
{% endif %}
61
{% endblock %}
62

Keyboard Shortcuts

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