🏡 index : ~doyle/rgit.git

author Jordan Doyle <jordan@doyle.la> 2022-07-23 15:29:24.0 +01:00:00
committer Jordan Doyle <jordan@doyle.la> 2022-07-23 15:29:24.0 +01:00:00
commit
de277834e3dfc4cf21a4758dc3082cfa39d405e5 [patch]
tree
99a160658467c7fabf7f8a62d8e9841e15793c87
parent
e816523709ced5da5f9f7a970c547c42db564e54
download
de277834e3dfc4cf21a4758dc3082cfa39d405e5.tar.gz

Hide tags if none exist



Diff

 templates/repo/refs.html    | 20 ++++++++++++++------
 templates/repo/summary.html | 38 +++++++++++++++++++++++++++-----------
 2 files changed, 31 insertions(+), 27 deletions(-)

diff --git a/templates/repo/refs.html b/templates/repo/refs.html
index 6f97657..dc887e9 100644
--- a/templates/repo/refs.html
+++ a/templates/repo/refs.html
@@ -7,15 +7,17 @@
<table class="repositories">
    {% call refs::branch_table(refs.heads) %}

    <tbody>
    <tr class="separator">
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    </tbody>
    {% if !refs.tags.is_empty() %}
        <tbody>
        <tr class="separator">
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        </tbody>

    {% call refs::tag_table(refs.tags) %}
        {% call refs::tag_table(refs.tags) %}
    {% endif %}
</table>
{% endblock %}
diff --git a/templates/repo/summary.html b/templates/repo/summary.html
index a9c4b50..f0951e4 100644
--- a/templates/repo/summary.html
+++ a/templates/repo/summary.html
@@ -17,25 +17,27 @@
    </tbody>
    {% endif %}

    <tbody>
    <tr class="separator">
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    </tbody>
    {% if !refs.tags.is_empty() %}
        <tbody>
        <tr class="separator">
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        </tbody>

    {% call refs::tag_table(refs.tags.iter().take(10)) %}
    {% if refs.tags.len() > 10 %}
    <tbody>
    <tr class="no-background">
        <td><a href="/{{ repo.display() }}/refs" class="no-style">[...]</a></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    </tbody>
        {% call refs::tag_table(refs.tags.iter().take(10)) %}
        {% if refs.tags.len() > 10 %}
        <tbody>
        <tr class="no-background">
            <td><a href="/{{ repo.display() }}/refs" class="no-style">[...]</a></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        </tbody>
        {% endif %}
    {% endif %}

    <tbody>