add topik style for link cells
authorFrédéric Péters <fpeters@0d.be>
Sun, 29 Mar 2020 15:20:20 +0000 (17:20 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sun, 29 Mar 2020 15:20:20 +0000 (17:20 +0200)
panikweb_templates/static/css/_specifics.scss
panikweb_templates/templates/combo/cells/topik/link-cell.html [new file with mode: 0644]

index 34fb846..4fbd4f1 100644 (file)
@@ -1760,7 +1760,7 @@ a.topik-link {
        margin-top: 1em;
 }
 
-#fiber-content div.topikcell a {
+#fiber-content div.topikcellcontent a {
        text-decoration: none;
        height: 500px;
 }
diff --git a/panikweb_templates/templates/combo/cells/topik/link-cell.html b/panikweb_templates/templates/combo/cells/topik/link-cell.html
new file mode 100644 (file)
index 0000000..886a490
--- /dev/null
@@ -0,0 +1,18 @@
+{% load thumbnail %}
+<div class="topikcellcontent topik-{{cell.link_page.slug}}">
+<a class="block cf" href="{{url}}">
+<span class="logo">
+{% thumbnail cell.link_page.picture "480x320" crop="50% 25%" as im %}
+<div class="logo">
+<img class="normal" src="{{im.url}}"/>
+</div>
+{% endthumbnail %}
+</span>
+<div>
+  <h5>{{title}}</h5>
+  <div class="description">
+    {{cell.link_page.description|safe|striptags|truncatewords:75}}
+  </div>
+</div>
+</a>
+</div>