]> git.0d.be Git - django-panik-combo.git/commitdiff
import cell templates from panikweb
authorFrédéric Péters <fpeters@0d.be>
Sat, 2 Sep 2023 16:07:00 +0000 (18:07 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sat, 2 Sep 2023 16:07:00 +0000 (18:07 +0200)
panikombo/templates/panikombo/audio.html [new file with mode: 0644]
panikombo/templates/panikombo/episode.html [new file with mode: 0644]
panikombo/templates/panikombo/episode_auto_selection.html [new file with mode: 0644]
panikombo/templates/panikombo/episodeautoselectioncell_form.html [new file with mode: 0644]
panikombo/templates/panikombo/newsitem_auto_selection.html [new file with mode: 0644]

diff --git a/panikombo/templates/panikombo/audio.html b/panikombo/templates/panikombo/audio.html
new file mode 100644 (file)
index 0000000..074e369
--- /dev/null
@@ -0,0 +1,27 @@
+{% load paniktags thumbnail static %}
+{% if soundfile %}
+  <div class="wrapper extra-soundfiles">
+    <div class="logo">
+      {% if soundfile.episode.image %}
+        {% thumbnail soundfile.episode.image "60x60" crop="50% 25%" as im %}
+          <img alt="" width="60" height="60" src="{{im.url}}"/>
+        {% endthumbnail %}
+      {% elif soundfile.episode.emission.image %}
+        {% thumbnail soundfile.episode.emission.image "60x60" crop="50% 25%" as im %}
+          <img alt="" width="60" height="60" src="{{im.url}}"/>
+        {% endthumbnail %}
+      {% else %}
+        <img alt="" class="smooth"  style="width:60px;" src="{% static "img/emission.png" %}"/>
+      {% endif %}
+    </div>
+    <ul class="padded custom list">
+      <li>
+        <div class="soundfile-info"><strong>
+          <a href="{% url 'emission-view' slug=soundfile.episode.emission.slug%}">{{ soundfile.episode.emission.title }}</a> -
+          <a href="{% url 'episode-view' emission_slug=soundfile.episode.emission.slug slug=soundfile.episode.slug %}">{{ soundfile.episode.title }}</a></strong>
+          {% if soundfile.fragment %}<span> - {{ soundfile.title }}</span>{% endif %}
+        </div>
+        {% audio sound=soundfile %}</li>
+    </ul>
+  </div>
+{% endif %}
diff --git a/panikombo/templates/panikombo/episode.html b/panikombo/templates/panikombo/episode.html
new file mode 100644 (file)
index 0000000..3335fb8
--- /dev/null
@@ -0,0 +1,31 @@
+{% load paniktags thumbnail static %}
+{% if episode %}
+  <div class="wrapper extra-soundfiles">
+    <div class="logo">
+      {% if episode.image %}
+        {% thumbnail episode.image "60x60" crop="50% 25%" as im %}
+          <img alt="" width="60" height="60" src="{{im.url}}"/>
+        {% endthumbnail %}
+      {% elif episode.emission.image %}
+        {% thumbnail episode.emission.image "60x60" crop="50% 25%" as im %}
+          <img alt="" width="60" height="60" src="{{im.url}}"/>
+        {% endthumbnail %}
+      {% else %}
+        <img alt="" class="smooth"  style="width:60px;" src="{% static "img/emission.png" %}"/>
+      {% endif %}
+    </div>
+    <ul class="padded custom list">
+      <li>
+        <div class="soundfile-info"><strong>
+          <a href="{% url 'emission-view' slug=episode.emission.slug%}">{{ episode.emission.title }}</a> -
+          <a href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">{{ episode.title }}</a></strong>
+          {% if soundfile.fragment %}<span> - {{ soundfile.title }}</span>{% endif %}
+        </div>
+        {% for diffusion in episode.diffusions %}
+          <span class="date">→ {{ diffusion.datetime|date:"l d M Y à H:i" }}</span>
+        {% endfor %}
+        {% if soundfile %}{% audio sound=soundfile %}{% endif %}
+      </li>
+    </ul>
+  </div>
+{% endif %}
diff --git a/panikombo/templates/panikombo/episode_auto_selection.html b/panikombo/templates/panikombo/episode_auto_selection.html
new file mode 100644 (file)
index 0000000..657c59f
--- /dev/null
@@ -0,0 +1,39 @@
+{% load paniktags thumbnail static %}
+{% if title and episodes %}<h3>{{title}}</h3>{% endif %}
+{% for episode in episodes %}
+
+  <div class="wrapper extra-soundfiles soundcell">
+    <div class="logo">
+      {% if episode.image %}
+        {% thumbnail episode.image "60x60" crop="50% 25%" as im %}
+          <img alt="" width="60" height="60" src="{{im.url}}"/>
+        {% endthumbnail %}
+      {% elif episode.emission.image %}
+        {% thumbnail episode.emission.image "60x60" crop="50% 25%" as im %}
+          <img alt="" width="60" height="60" src="{{im.url}}"/>
+        {% endthumbnail %}
+      {% else %}
+        <img alt="" class="smooth"  style="width:60px;" src="{% static "img/emission.png" %}"/>
+      {% endif %}
+    </div>
+    <ul class="padded custom list">
+      <li>
+        <div class="soundfile-info"><strong>
+          <a class="emission-title" href="{% url 'emission-view' slug=episode.emission.slug%}">{{ episode.emission.title }}</a>
+          <span class="sep">-</span>
+          <a class="episode-title" href="{% url 'episode-view' emission_slug=episode.emission.slug slug=episode.slug %}">{{ episode.title }}</a></strong>
+        </div>
+        {% for diffusion in episode.diffusions %}
+          <span class="date">→ {{ diffusion.datetime|date:"l d M Y à H:i" }}</span>
+        {% endfor %}
+        {% if episode.main_sound %}{% audio sound=episode.main_sound %}{% endif %}
+        {% for sound in episode.fragment_sounds %}
+          <div class="fragment-sound">
+            {% audio sound=sound display_fragment_name=True %}
+          </div>
+        {% endfor %}
+      </li>
+    </ul>
+  </div>
+
+{% endfor %}
diff --git a/panikombo/templates/panikombo/episodeautoselectioncell_form.html b/panikombo/templates/panikombo/episodeautoselectioncell_form.html
new file mode 100644 (file)
index 0000000..572164d
--- /dev/null
@@ -0,0 +1 @@
+{{form.as_p}}
diff --git a/panikombo/templates/panikombo/newsitem_auto_selection.html b/panikombo/templates/panikombo/newsitem_auto_selection.html
new file mode 100644 (file)
index 0000000..30155b2
--- /dev/null
@@ -0,0 +1,7 @@
+{% load paniktags %}
+{% if title and newsitems %}<h3>{{title}}</h3>{% endif %}
+<ul class="custom list newsList">
+  {% for content in newsitems|slice:":50" %}
+    <li>{% news_inline %}</li>
+  {% endfor %}
+</ul>