--- a/src/pyams_default_theme/templates/layout.pt Sun Dec 30 18:11:52 2018 +0100
+++ b/src/pyams_default_theme/templates/layout.pt Sun Dec 30 18:15:50 2018 +0100
@@ -3,20 +3,42 @@
tal:define="config tales:configuration;"
tal:attributes="lang request.locale_name">
<head prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article#">
- <tal:var replace="structure tales:metas" />
+ ${structure:tales:metas}
- <tal:if define="icon config.icon | nothing; url tales:absolute_url(icon);" condition="icon">
+ <tal:if define="icon config.icon | nothing;
+ url tales:absolute_url(icon);"
+ condition="icon">
<!-- Favorite icon -->
- <link rel="shortcut icon" tal:attributes="href url" type="image/x-icon">
- <link rel="icon" tal:attributes="href url" type="image/x-icon">
+ <tal:var define="size icon.get_image_size()[0];
+ timestamp tales:timestamp(icon)">
+ <link tal:condition="size > 144"
+ rel="apple-touch-icon" sizes="180x180" href="${url}/++thumb++180x180?_=${timestamp}" type="${icon.content_type}" />
+ <link tal:condition="size > 114"
+ rel="apple-touch-icon" sizes="144x144" href="${url}/++thumb++144x144?_=${timestamp}" type="${icon.content_type}" />
+ <link tal:condition="size > 72"
+ rel="apple-touch-icon" sizes="114x114" href="${url}/++thumb++114x114?_=${timestamp}" type="${icon.content_type}" />
+ <link tal:condition="size > 32"
+ rel="apple-touch-icon" sizes="72x72" href="${url}/++thumb++72x72?_=${timestamp}" type="${icon.content_type}" />
+ <link tal:condition="size > 16"
+ rel="apple-touch-icon" sizes="32x32" href="${url}/++thumb++32x32?_=${timestamp}" type="${icon.content_type}" />
+ <link rel="apple-touch-icon" sizes="16x16" href="${url}/++thumb++16x16?_=${timestamp}" type="${icon.content_type}" />
+ <link tal:condition="size > 64"
+ rel="icon" sizes="128x128" href="${url}/++thumb++128x128?_=${timestamp}" type="${icon.content_type}" />
+ <link tal:condition="size > 32"
+ rel="icon" sizes="64x64" href="${url}/++thumb++64x64?_=${timestamp}" type="${icon.content_type}" />
+ <link tal:condition="size > 16"
+ rel="icon" sizes="32x32" href="${url}/++thumb++32x32?_=${timestamp}" type="${icon.content_type}" />
+ <link rel="icon" sizes="16x16" href="${url}/++thumb++16x16?_=${timestamp}" type="${icon.content_type}" />
+ <link rel="shortcut icon" href="${url}" type="${icon.content_type}" />
+ </tal:var>
</tal:if>
- <link rel="canonical" tal:attributes="href tales:canonical_url(context)" />
+ <link rel="canonical" href="${tales:canonical_url(context)}" />
- <tal:var replace="tales:resources" />
+ ${tales:resources}
<!-- Javascript extensions -->
- <tal:var content="structure provider:pyams.jsextensions" />
+ ${structure:provider:pyams.jsextensions}
<!-- end javascript extensions -->
</head>