[IMP] website: Split loading of asset to load css before js

"An external CSS files were included after an external JavaScript file in the document head.
To ensure CSS files are downloaded in parallel, always include external CSS before external JavaScript."
-- Chrome analyzer --
This commit is contained in:
Jeremy Kersten
2015-04-10 11:43:46 +02:00
parent 67c40a50fa
commit efbe6ae880
+6 -3
View File
@@ -96,8 +96,11 @@
<link rel="alternate" t-att-hreflang="lang['hreflang']" t-att-href="lang['href']"/>
</t>
</t>
<t t-call-assets="web.assets_common"/>
<t t-call-assets="website.assets_frontend"/>
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="website.assets_frontend" t-js="false"/>
<t t-call-assets="web.assets_common" t-css="false"/>
<t t-call-assets="website.assets_frontend" t-css="false"/>
<t t-raw="head or ''" name='layout_head'/>
</head>
@@ -181,7 +184,7 @@
</template>
<template id="editor_head" inherit_id="website.layout" name="Editor" groups="base.group_website_publisher,base.group_website_designer">
<xpath expr='//t[@t-call-assets="website.assets_frontend"]' position="after">
<xpath expr='//t[@t-call-assets="website.assets_frontend"][@t-css="false"]' position="after">
<t t-call-assets="website.assets_editor"/>
</xpath>
</template>