| 1 |
{% extends "base.html" %} |
| 2 |
{%- import "partials/_ui.html" as ui -%} |
| 3 |
|
| 4 |
{% block title %}Repositories - Git - Makenotwork{% endblock %} |
| 5 |
{% block body_attrs %} class="{{ crate::shell::measure(crate::shell::Measure::Wide) }}"{% endblock %} |
| 6 |
|
| 7 |
{% block content %} |
| 8 |
{% include "partials/site_header.html" %} |
| 9 |
|
| 10 |
<h1 class="git-repo-name">Repositories</h1> |
| 11 |
|
| 12 |
{# Notes are the one thing this browser does that no other forge does, and |
| 13 |
nothing on a repository page says so to somebody who has never seen a |
| 14 |
note. The landing page is where that sentence reaches everybody. #} |
| 15 |
<p class="git-explore-intro"> |
| 16 |
Every repository here renders <a href="/docs/git-notes">git notes</a>: |
| 17 |
annotation attached to a commit without rewriting it, stored in the |
| 18 |
repository and carried by a clone. |
| 19 |
</p> |
| 20 |
|
| 21 |
{% if session_user.is_some() %} |
| 22 |
{# The only route to an annotation whose target repository is gone: nothing |
| 23 |
else links to it once there is no commit page to link from. #} |
| 24 |
<p class="git-explore-mine"> |
| 25 |
<a href="/git/my-annotations">Your annotations</a>, private to you, |
| 26 |
across every repository you have read here. |
| 27 |
</p> |
| 28 |
{% endif %} |
| 29 |
|
| 30 |
{% if repos.is_empty() %} |
| 31 |
{% call ui::empty_state("", "No public repositories yet.") %}{% endcall %} |
| 32 |
{% else %} |
| 33 |
<ul class="git-repos-list"> |
| 34 |
{% for repo in repos %} |
| 35 |
<li class="git-repos-item"> |
| 36 |
<div class="git-repos-item-header"> |
| 37 |
<a href="/git/{{ repo.owner_username }}/{{ repo.name }}" class="git-repos-item-name"> |
| 38 |
<span class="git-repos-owner">{{ repo.owner_username }}</span><span class="sep">/</span>{{ repo.name }} |
| 39 |
</a> |
| 40 |
</div> |
| 41 |
{% if !repo.description.is_empty() %} |
| 42 |
<p class="git-repos-item-desc">{{ repo.description }}</p> |
| 43 |
{% endif %} |
| 44 |
</li> |
| 45 |
{% endfor %} |
| 46 |
</ul> |
| 47 |
|
| 48 |
<div class="git-pagination"> |
| 49 |
{% if page > 1 %} |
| 50 |
<a href="/git?page={{ page - 1 }}">Newer</a> |
| 51 |
{% endif %} |
| 52 |
{% if has_more %} |
| 53 |
<a href="/git?page={{ page + 1 }}">Older</a> |
| 54 |
{% endif %} |
| 55 |
</div> |
| 56 |
{% endif %} |
| 57 |
|
| 58 |
{% endblock %} |
| 59 |
|