FossilRepo

fossilrepo / templates / fossil / release_list.html
Source Blame History 86 lines
c588255… ragelink 1 {% extends "base.html" %}
c588255… ragelink 2 {% load humanize %}
c588255… ragelink 3 {% block title %}Releases — {{ project.name }} — Fossilrepo{% endblock %}
c588255… ragelink 4
c588255… ragelink 5 {% block content %}
c588255… ragelink 6 <h1 class="text-2xl font-bold text-gray-100 mb-2">{{ project.name }}</h1>
c588255… ragelink 7 {% include "fossil/_project_nav.html" %}
c588255… ragelink 8
313537c… ragelink 9 <div class="flex flex-wrap items-center justify-between gap-3 mb-6">
c588255… ragelink 10 <h2 class="text-lg font-semibold text-gray-200">Releases</h2>
313537c… ragelink 11 <div class="flex flex-wrap items-center gap-3">
7e1aaf6… ragelink 12 <span class="search-wrap">
c588255… ragelink 13 <input type="search"
c588255… ragelink 14 name="search"
c588255… ragelink 15 value="{{ search }}"
c588255… ragelink 16 placeholder="Search releases..."
7e1aaf6… ragelink 17 aria-label="Search releases"
c588255… ragelink 18 class="rounded-md border-gray-700 bg-gray-800 text-gray-100 shadow-sm focus:border-brand focus:ring-brand text-sm px-3 py-1.5"
c588255… ragelink 19 hx-get="{% url 'fossil:releases' slug=project.slug %}"
c588255… ragelink 20 hx-trigger="input changed delay:300ms, search"
c588255… ragelink 21 hx-target="#release-content"
c588255… ragelink 22 hx-swap="innerHTML"
7e1aaf6… ragelink 23 hx-push-url="true"
7e1aaf6… ragelink 24 hx-indicator="closest .search-wrap" />
7e1aaf6… ragelink 25 <svg class="search-spinner animate-spin h-4 w-4" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg>
7e1aaf6… ragelink 26 </span>
c588255… ragelink 27 {% if has_write %}
c588255… ragelink 28 <a href="{% url 'fossil:release_create' slug=project.slug %}"
2f13242… ragelink 29 class="inline-flex items-center rounded-md bg-brand px-3 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-brand-hover focus:outline-none focus:ring-2 focus:ring-brand focus:ring-offset-2 focus:ring-offset-gray-950 transition-colors">
c588255… ragelink 30 Create Release
c588255… ragelink 31 </a>
c588255… ragelink 32 {% endif %}
c588255… ragelink 33 </div>
c588255… ragelink 34 </div>
c588255… ragelink 35
c588255… ragelink 36 <div id="release-content">
c588255… ragelink 37 {% if releases %}
c588255… ragelink 38 <div class="space-y-4">
c588255… ragelink 39 {% for release in releases %}
2f13242… ragelink 40 <div class="overflow-hidden rounded-lg bg-gray-800 shadow-sm border border-gray-700 hover:border-gray-600 transition-colors">
c588255… ragelink 41 <div class="px-6 py-4">
c588255… ragelink 42 <div class="flex items-start justify-between gap-4">
c588255… ragelink 43 <div class="flex-1 min-w-0">
c588255… ragelink 44 <div class="flex items-center gap-3 mb-1">
c588255… ragelink 45 <a href="{% url 'fossil:release_detail' slug=project.slug tag_name=release.tag_name %}"
c588255… ragelink 46 class="text-lg font-bold text-brand-light hover:text-brand">{{ release.tag_name }}</a>
c588255… ragelink 47 {% if release.is_prerelease %}
c588255… ragelink 48 <span class="inline-flex rounded-full bg-yellow-900/50 px-2.5 py-0.5 text-xs font-semibold text-yellow-300">Pre-release</span>
c588255… ragelink 49 {% endif %}
c588255… ragelink 50 {% if release.is_draft %}
c588255… ragelink 51 <span class="inline-flex rounded-full bg-gray-700 px-2.5 py-0.5 text-xs font-semibold text-gray-400">Draft</span>
c588255… ragelink 52 {% endif %}
c588255… ragelink 53 </div>
c588255… ragelink 54 <p class="text-sm text-gray-200">{{ release.name }}</p>
c588255… ragelink 55 <p class="mt-1 text-xs text-gray-500">
c588255… ragelink 56 {% if release.published_at %}
c588255… ragelink 57 Published {{ release.published_at|timesince }} ago
c588255… ragelink 58 {% else %}
c588255… ragelink 59 Created {{ release.created_at|timesince }} ago
c588255… ragelink 60 {% endif %}
c588255… ragelink 61 {% with asset_count=release.assets.count %}
c588255… ragelink 62 {% if asset_count %}
c588255… ragelink 63 &middot; {{ asset_count }} asset{{ asset_count|pluralize }}
c588255… ragelink 64 {% endif %}
c588255… ragelink 65 {% endwith %}
c588255… ragelink 66 </p>
c588255… ragelink 67 </div>
c588255… ragelink 68 </div>
c588255… ragelink 69 </div>
c588255… ragelink 70 </div>
c588255… ragelink 71 {% endfor %}
c588255… ragelink 72 </div>
c588255… ragelink 73 {% else %}
c588255… ragelink 74 <div class="rounded-lg bg-gray-800 border border-gray-700 p-8 text-center">
c588255… ragelink 75 <p class="text-sm text-gray-500">{% if search %}No releases matching "{{ search }}".{% else %}No releases yet.{% endif %}</p>
c588255… ragelink 76 {% if has_write and not search %}
c588255… ragelink 77 <a href="{% url 'fossil:release_create' slug=project.slug %}"
c588255… ragelink 78 class="mt-3 inline-flex items-center rounded-md bg-brand px-3 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-brand-hover">
c588255… ragelink 79 Create the first release
c588255… ragelink 80 </a>
c588255… ragelink 81 {% endif %}
c588255… ragelink 82 </div>
c588255… ragelink 83 {% endif %}
c588255… ragelink 84 {% include "includes/_pagination.html" %}
c588255… ragelink 85 </div>
c588255… ragelink 86 {% endblock %}

Keyboard Shortcuts

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