Updated templates
authorThierry Florac <tflorac@ulthar.net>
Wed, 09 Jan 2019 11:40:18 +0100
changeset 359 2eb804d4ea34
parent 358 16bcd95b1e01
child 360 99c6433229ea
Updated templates
src/pyams_default_theme/component/illustration/templates/illustration-left.pt
src/pyams_default_theme/component/illustration/templates/illustration-right.pt
--- a/src/pyams_default_theme/component/illustration/templates/illustration-left.pt	Wed Jan 09 11:40:08 2019 +0100
+++ b/src/pyams_default_theme/component/illustration/templates/illustration-left.pt	Wed Jan 09 11:40:18 2019 +0100
@@ -1,19 +1,17 @@
 <div class="illustration pull-left col-xs-12 col-sm-6 col-md-6 col-lg-5 margin-10"
-	 tal:define="settings view.settings"
-	 tal:condition="view.data">
-	<a data-toggle="${'lightbox' if settings.zoom_on_click else None}"
+	 tal:define="settings view.settings;
+				 image view.data;"
+	 tal:condition="image">
+	<a tal:define="thumbnails tales:thumbnails(image);
+				   target thumbnails.get_thumbnail('800x600');"
+	   tal:omit-tag="not:settings.zoom_on_click"
+	   href="${tales:absolute_url(target)}"
+	   data-toggle="${'lightbox' if settings.zoom_on_click else None}"
 	   data-type="image"
 	   data-title="${view.title}"
 	   data-description="${view.description}"
-	   data-footer="${view.author}"
-	   tal:omit-tag="not:view.settings.zoom_on_click"
-	   tal:define="image view.data;
-				   thumbnails tales:thumbnails(view.data);
-				   target thumbnails.get_thumbnail('800x600');"
-	   tal:attributes="href tales:absolute_url(target)">
-		<tal:if condition="image">
-			${structure:tales:picture(image, lg_width=5, md_width=6, sm_width=6, alt=view.alt_title)}
-		</tal:if>
+	   data-footer="${view.author}">
+		${structure:tales:picture(image, lg_width=5, md_width=6, sm_width=6, alt=view.alt_title)}
 	</a>
 	<div class="author">${view.title}</div>
-</div>
+</div>
\ No newline at end of file
--- a/src/pyams_default_theme/component/illustration/templates/illustration-right.pt	Wed Jan 09 11:40:08 2019 +0100
+++ b/src/pyams_default_theme/component/illustration/templates/illustration-right.pt	Wed Jan 09 11:40:18 2019 +0100
@@ -1,19 +1,17 @@
 <div class="illustration pull-right col-xs-12 col-sm-6 col-md-6 col-lg-5 margin-10"
-	 tal:define="settings view.settings"
-	 tal:condition="view.data">
-	<a data-toggle="${'lightbox' if settings.zoom_on_click else None}"
+	 tal:define="settings view.settings;
+				 image view.data;"
+	 tal:condition="image">
+	<a tal:define="thumbnails tales:thumbnails(image);
+				   target thumbnails.get_thumbnail('800x600');"
+	   tal:omit-tag="not:settings.zoom_on_click"
+	   href="${tales:absolute_url(target)}"
+	   data-toggle="${'lightbox' if settings.zoom_on_click else None}"
 	   data-type="image"
 	   data-title="${view.title}"
 	   data-description="${view.description}"
-	   data-footer="${view.author}"
-	   tal:omit-tag="not:view.settings.zoom_on_click"
-	   tal:define="image view.data;
-				   thumbnails tales:thumbnails(view.data);
-				   target thumbnails.get_thumbnail('800x600');"
-	   tal:attributes="href tales:absolute_url(target)">
-		<tal:if condition="image">
-			${structure:tales:picture(image, lg_width=5, md_width=6, sm_width=6, alt=view.alt_title)}
-		</tal:if>
+	   data-footer="${view.author}">
+		${structure:tales:picture(image, lg_width=5, md_width=6, sm_width=6, alt=view.alt_title)}
 	</a>
 	<div class="author">${view.title}</div>
-</div>
+</div>
\ No newline at end of file