Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorder HEAD elements so that CSS comes before JavaScript #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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