Files @ 1b1e2b994fc7
Branch filter:

Location: website/conservancy/usethesource/templates/usethesource/candidate.html

bsturmfels
usethesource: Page titles, big buttons, sub-headings & edit link
{% extends "usethesource/base.html" %}

{% block title %}{{ candidate.name }} - Software Freedom Conservancy{% endblock %}

{% block head %}
  {{ block.super }}
  <script src="https://unpkg.com/htmx.org@1.9.6"></script>
{% endblock %}

{% block content %}
  {{ block.super }}

  <section class="pa2 mt4 mb3">
    <div style="display: flex; justify-content: space-between">
      <div>
        <div class="flex items-center">
          <h2 class="f2 lh-title ttu mt0">{{ candidate.name }}</h2>
          <a href="{% url 'admin:usethesource_candidate_change' object_id=candidate.id %}" title="Edit candidate" class="f3 white bg-light-silver db ph2 mh2 mb3" style="transform: scaleX(-1); text-decoration: none !important"></a>
        </div>

        <p><strong>Vendor</strong>: {{ candidate.vendor }}</p>
        <p><strong>Device</strong>: {{ candidate.device }}</p>
        <p><strong>Released</strong>: {{ candidate.release_date }}</p>
      </div>
      <div class="mt2">
        <div><a href="{% url 'usethesource:download' slug=candidate.slug download_type='source' %}" class="white bg-green db pv2 ph3 mb2">Download source</a></div>
        <div><a href="{% url 'usethesource:download' slug=candidate.slug download_type='binary' %}" class="white bg-green db pv2 ph3">Download image</a></div>
      </div>
    </div>

    {{ candidate.description|linebreaks }}

    {% with comments=candidate.comment_set.all %}
      {% if comments or user.is_staff %}<h3 class="f3 lh-title mt4">Comments</h3>{% endif %}
      {% for comment in comments %}
        {% include "usethesource/comment_partial.html" %}
      {% endfor %}
    {% endwith %}

    {% if user.is_staff %}
      {% include "usethesource/add_comment_button_partial.html" %}
    {% endif %}
  </section>
{% endblock content %}