Skip to content

Commit

Permalink
Reorder HEAD elements so that CSS comes before JavaScript - which is …
Browse files Browse the repository at this point in the history
…correct and proper

    This solves an issue in ftw.colorbox where overlays are not always loaded
  • Loading branch information
Daniel Jowett committed Apr 23, 2020
1 parent 5328937 commit 2d22586
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
4.0.6 (unreleased)
------------------

- Nothing changed yet.
- Reorder HEAD elements so that CSS comes before JavaScript - which is correct and proper
[djowett-ftw]


4.0.5 (2020-03-16)
Expand Down
10 changes: 6 additions & 4 deletions plonetheme/onegov/resources/rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@
<after content="/html/head/title" theme-children="/html/head" />

<after
content="/html/head/base | /html/head/style | /html/head/script | /html/head/link | /html/head/comment()"
content="/html/head/base | /html/head/style | /html/head/link | /html/head/comment()"
theme-children="/html/head"
/>
<after theme-children="/html/head" css:content="#portal-top style"/>
<after theme-children="/html/head" css:content="#portal-top link"/>

<after theme-children="/html/head" content="/html/head/script"/>
<after theme-children="/html/head" css:content="#portal-top script"/>

<!-- Copy html lang -->
<copy attributes="lang" content="/html" theme="/html" />
Expand All @@ -49,9 +54,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0" />
</replace>

<after theme-children="/html/head" css:content="#portal-top script"/>
<after theme-children="/html/head" css:content="#portal-top style"/>
<after theme-children="/html/head" css:content="#portal-top link"/>

<replace css:content="#portal-logo" css:theme="#portal-logo" />
<replace css:content="#portal-globalnav-wrapper" css:theme="#portal-globalnav" />
Expand Down

0 comments on commit 2d22586

Please sign in to comment.