Updated templates
authorThierry Florac <thierry.florac@onf.fr>
Mon, 19 Nov 2018 15:17:08 +0100
changeset 232 7898006e140c
parent 231 d462a5ced83e
child 233 d5f9f495dc30
Updated templates
src/pyams_default_theme/shared/logo/templates/logos-default.pt
src/pyams_default_theme/shared/site/portlet/templates/site-summary.pt
--- a/src/pyams_default_theme/shared/logo/templates/logos-default.pt	Mon Nov 19 15:16:47 2018 +0100
+++ b/src/pyams_default_theme/shared/logo/templates/logos-default.pt	Mon Nov 19 15:17:08 2018 +0100
@@ -1,11 +1,13 @@
-<h3 tal:content="view.title">title</h3>
-<div class="padding-10" i18n:domain="pyams_default_theme">
+<div class="logos" i18n:domain="pyams_default_theme">
+	<h3>${view.title}</h3>
 	<tal:loop repeat="logo context.get_targets()">
-		<tal:if condition="logo is not None">
+		<div class="logo col-lg-2 col-md-2 col-sm-2 col-xs-3"
+			 tal:condition="logo is not None">
 			<a tal:omit-tag="not:logo.url"
-			   tal:attributes="href logo.url" target="_blank">
-				<tal:var content="structure tales:thumbnail(logo.image, 200, 'auto', 'display-inline margin-10')" />
+			   href="${logo.url}" title="${i18n:logo.title}">
+				${structure:tales:picture(logo.image, lg_thumb='square', lg_width=2, md_thumb='square', md_width=2,
+										  sm_thumb='square', sm_width=2, xs_thumb='square', xs_width=3, css_class='thumbnail')}
 			</a>
-		</tal:if>
+		</div>
 	</tal:loop>
 </div>
--- a/src/pyams_default_theme/shared/site/portlet/templates/site-summary.pt	Mon Nov 19 15:16:47 2018 +0100
+++ b/src/pyams_default_theme/shared/site/portlet/templates/site-summary.pt	Mon Nov 19 15:17:08 2018 +0100
@@ -3,26 +3,30 @@
 				 button_title i18n:settings.button_title;">
 	<div class="summary">
 		<div tal:repeat="item view.visible_items">
-			<div class="thumbnail pull-left">
-				<tal:if define="illustration tales:pyams_illustration(item.context)"
-						condition="illustration">
-					<tal:if define="image i18n:illustration.data;
-									alt i18n:illustration.alt_title;"
-							condition="image">
-						${structure:tales:picture(image, lg_thumb='pano', lg_width=3, md_thumb='pano', md_width=3, sm_thumb='pano',
-												  sm_width=4, xs_thumb='pano', xs_width=12, alt=alt, css_class='result_media')}
-					</tal:if>
-				</tal:if>
-			</div>
-			<div>
-				<h2>${item.title}</h2>
-				<div class="header">${structure:tales:html(item.header)}</div>
-				<div class="action">
-					<a href="${tales:relative_url(item.context)}">
-						<span i18n:translate="">${button_title or item.button_title}</span>
+			<tal:var define="target tales:relative_url(item.context)">
+				<div class="thumbnail pull-left hidden-xs">
+					<a tal:define="illustration tales:pyams_illustration(item.context)"
+					   tal:condition="illustration"
+					   href="${target}">
+						<tal:if define="image i18n:illustration.data;
+										alt i18n:illustration.alt_title;"
+								condition="image">
+							${structure:tales:picture(image, lg_thumb='pano', lg_width=3, md_thumb='pano', md_width=3, sm_thumb='pano',
+													  sm_width=4, xs_thumb='pano', xs_width=12, alt=alt, css_class='result_media')}
+						</tal:if>
 					</a>
 				</div>
-			</div>
-		<div class="clearfix"></div>
+				<div>
+					<h2>${item.title}</h2>
+					<div class="header">${structure:tales:html(item.header)}</div>
+					<div class="action">
+						<a href="${target}">
+							<span i18n:translate="">${button_title or item.button_title}</span>
+						</a>
+					</div>
+				</div>
+			</tal:var>
+			<div class="clearfix"></div>
+		</div>
 	</div>
 </div>