aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/templates/resources/resource_detail.html
blob: 6f8f3be74cbaee8d353cbe10c795c105976bffae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{% extends 'base.html' %}

{% block content %}
  <div class="container">
    <div class="row mt-4">
      <div class="col-md">
        <div class="my-4 p-2">
          <h1 class="display-6 text-dark">{{ resource.name }}</h1>
          <div>Subject: {{ resource.main_resource_category }}</div>
          <div>Age range: {{ resource.age_range }}</div>
          <div>Resource type: {{ resource.resource_type }}</div>
        </div>
      </div>
    </div>
    <div class="row mt-3">
      <div class="col-md">
        <h3>Feature images</h3>
        <div>
          {% for tn_url, tn_filename in resource.thumbnails %}
            <img class="img-thumbnail rounded"
                 src="{{ tn_url }}"
                 alt="{{ tn_filename }}" />
          {% endfor %}
        </div>
      </div>
    </div>
    <div class="row mt-3">
      <div class="col-md">
        <h3>Resource preview</h3>
        <div>
          {% for snapshot_filename, snapshot_urls in resource.snapshot_urls.items %}
            <div>{{ snapshot_filename }}</div>
            <div>
              {% for snapshot_url in snapshot_urls %}
                <img class="img-thumbnail rounded"
                     src="{{ snapshot_url }}"
                     alt="{{ snapshot_filename }}" />
              {% endfor %}
              <div class="resource-description-panel">
                <h3>What's included?</h3>
                <div>{{ resource.description }}</div>
                <h3>What's it for?</h3>
                <div>{% lorem %}</div>
                <h3>Resource Details</h3>
                <div>{% lorem %}</div>
              </div>
              <div class="resource-download-panel">
                <h4>Download the resource</h4>
                <div>
                  Click
                  <button hx-get="/hx-download-btn?rn={{ resource.pdf_filename }}"
                          hx-target="next #download-reveal">here</button>
                  to download the resource
                </div>
                <div id="download-reveal"></div>
              </div>
            </div>
          {% endfor %}
          <div>Logged in as {{ request.user.username }}</div>
        </div>
      </div>
    </div>
  </div>
{% endblock content %}