Updated layouts templates
authorThierry Florac <thierry.florac@onf.fr>
Tue, 29 Jan 2019 15:57:27 +0100
changeset 407 93b87334ef13
parent 406 ad64c373ee11
child 408 e6dd4e74ae8b
Updated layouts templates
src/pyams_default_theme/templates/layout.pt
src/pyams_default_theme/templates/preview-layout.pt
--- a/src/pyams_default_theme/templates/layout.pt	Tue Jan 29 15:56:55 2019 +0100
+++ b/src/pyams_default_theme/templates/layout.pt	Tue Jan 29 15:57:27 2019 +0100
@@ -1,34 +1,10 @@
 <!DOCTYPE html>
-<html i18n:domain="pyams_default_theme"
-	  tal:define="config tales:configuration;"
-	  lang="${request.locale_name}">
+<html lang="${request.locale_name}" i18n:domain="pyams_default_theme">
 <head prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article# fb: http://ogp.me/ns/fb#">
 	${structure:tales:metas}
-
-	<tal:if define="icon config.icon | nothing;
-					url tales:absolute_url(icon);"
-			condition="icon"><!-- Favorite icon --><tal:var
-		define="size icon.get_image_size()[0];
-				timestamp tales:timestamp(icon)"><tal:loop
-			repeat="icon_size (180, 144, 114, 72, 32)"><link
-				tal:condition="size >= icon_size" type="${icon.content_type}"
-				rel="apple-touch-icon" sizes="${icon_size}x${icon_size}"
-				href="${url}/++thumb++${icon_size}x${icon_size}?_=${timestamp}" /></tal:loop>
-			<link rel="apple-touch-icon" sizes="16x16" href="${url}/++thumb++16x16?_=${timestamp}" type="${icon.content_type}" />
-			<tal:loop repeat="icon_size (128, 64, 32)"><link
-				tal:condition="size >= icon_size" type="${icon.content_type}"
-				rel="icon" sizes="${icon_size}x${icon_size}"
-				href="${url}/++thumb++${icon_size}x${icon_size}?_=${timestamp}" /></tal:loop>
-			<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:define="context_url tales:canonical_url(context)"
-		  href="${context_url.replace('+', '%2B')}" />
-
-	<!-- Javascript extensions -->
+	<!-- JS extensions -->
 	${structure:provider:pyams.jsextensions}
-	<!-- end javascript extensions -->
+	<!-- End JS extensions -->
 	${tales:resources}
 </head>
 <body class="no-margin no-padding">
--- a/src/pyams_default_theme/templates/preview-layout.pt	Tue Jan 29 15:56:55 2019 +0100
+++ b/src/pyams_default_theme/templates/preview-layout.pt	Tue Jan 29 15:57:27 2019 +0100
@@ -1,27 +1,11 @@
 <!DOCTYPE html>
-<html class="no-js" lang="en" i18n:domain="pyams_default_theme"
-	  tal:define="config tales:configuration;
-				  anonymous request.principal.id == '__none__';"
-	  tal:attributes="lang request.locale_name">
-<head>
-	<tal:var replace="structure tales:metas" />
-
-	<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:if>
-
-	<link rel="canonical"
-		  tal:define="context_url tales:canonical_url(context)"
-		  href="${context_url.replace('+', '%2B')}" />
-
-	<tal:var replace="tales:resources" />
-
-	<!-- Javascript extensions -->
-	<tal:var content="structure provider:pyams.jsextensions" />
-	<!-- end javascript extensions -->
-
+<html lang="${request.locale_name}" i18n:domain="pyams_default_theme">
+<head prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article# fb: http://ogp.me/ns/fb#">
+	${structure:tales:metas}
+	<!-- JS extensions -->
+	${structure:provider:pyams.jsextensions}
+	<!-- End JS extensions -->
+	${tales:resources}
 </head>
 <body class="alert--enabled">