src/server/http/templates/repo_overview.html
Ref: Size: 2.6 KiB
{% extends "repo_base.html" %}
{% block title %}{{ repo_name }} — {{ site_title }}{% endblock %}
{% block content %}
{% if let Some(r) = readme %}
<div style="border: 1px solid #ccc; padding: 16px; margin-bottom: 24px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.5;">
<h3 style="margin-top: 0; font-family: monospace;">README</h3>
<div class="readme-body">{{ r.html|safe }}</div>
</div>
{% endif %}
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px;">
<div>
<h3 style="margin-top: 0;">Open Patches</h3>
{% if patches.is_empty() %}
<p style="color: #666;">No open patches.</p>
{% else %}
<table>
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Author</th>
</tr>
</thead>
<tbody>
{% for patch in patches %}
<tr>
<td class="mono"><a href="/{{ repo_name }}/patches/{{ patch.id }}">{{ patch.id[..8] }}</a></td>
<td><a href="/{{ repo_name }}/patches/{{ patch.id }}">{{ patch.title }}</a></td>
<td style="color: #666;">{{ patch.author }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
<div>
<h3 style="margin-top: 0;">Open Issues</h3>
{% if issues.is_empty() %}
<p style="color: #666;">No open issues.</p>
{% else %}
<table>
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Author</th>
</tr>
</thead>
<tbody>
{% for issue in issues %}
<tr>
<td class="mono"><a href="/{{ repo_name }}/issues/{{ issue.id }}">{{ issue.id[..8] }}</a></td>
<td><a href="/{{ repo_name }}/issues/{{ issue.id }}">{{ issue.title }}</a></td>
<td style="color: #666;">{{ issue.author }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
</div>
<div>
<h3>Recent Commits</h3>
{% if commits.is_empty() %}
<p style="color: #666;">No commits yet.</p>
{% else %}
<table>
<thead>
<tr>
<th>Commit</th>
<th>Summary</th>
<th>Author</th>
<th>Date</th>
</tr>
</thead>
<tbody>
{% for commit in commits %}
<tr>
<td class="mono"><a href="/{{ repo_name }}/diff/{{ commit.id }}">{{ commit.short_id }}</a></td>
<td>{{ commit.summary }}</td>
<td style="color: #666;">{{ commit.author }}</td>
<td class="mono" style="color: #666;">{{ commit.date }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
{% endblock %}