Applied CSS class to <img> tag instead of <picture>
authorThierry Florac <tflorac@ulthar.net>
Wed, 28 Nov 2018 17:51:20 +0100
changeset 159 8a946272a253
parent 158 648e333fe3a5
child 160 5b2152bb3525
Applied CSS class to <img> tag instead of <picture>
src/pyams_file/templates/picture.pt
--- a/src/pyams_file/templates/picture.pt	Mon Nov 26 17:24:50 2018 +0100
+++ b/src/pyams_file/templates/picture.pt	Wed Nov 28 17:51:20 2018 +0100
@@ -1,7 +1,5 @@
-<picture
-	class="${css_class}"
-	tal:define="image_url tales:absolute_url(image);
-				thumbnails tales:thumbnails(image);">
+<picture tal:define="image_url tales:absolute_url(image);
+					 thumbnails tales:thumbnails(image);">
 	<tal:if condition="xs_width">
 		<!-- xs source -->
 		<source media="(max-width: 767px)"
@@ -47,7 +45,7 @@
 			media="(min-width: 1200px)"
 			srcset="/--static--/pyams_skin/img/dot.png" />
 	<!-- fallback image -->
-	<img style="width: 100%;"
+	<img style="width: 100%;" class="${css_class}"
 		 tal:define="timestamp tales:timestamp(image)"
 		 alt="${alt}" src="${image_url}?_=${timestamp}" />
 </picture>