turbolinks: Replace style elements in head with blocks in body

Turbolinks cannot replace the styles in the head of the HTML document. Moved
them to the body by making the class of the body an overridable Django template
block.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati authored and James Valleroy committed 2018-07-29 12:22:57 -04:00
1 parent f762f57d1c
commit daef528576
5 files changed
+20 -19

No files matched your search

+2 -6
View File
@@ -21,10 +21,6 @@
{% load static %}
{% load i18n %}
{% block page_head %}
<style type="text/css">
body {
background-image: url({% static 'theme/img/apps-background.svg' %});
}
</style>
{% block body_class %}
background-apps
{% endblock %}
+1 -1
View File
@@ -83,7 +83,7 @@
{% block page_head %}<!-- placeholder for page-specific head files -->{% endblock %}
</head>
<body>
<body class="{%block body_class %}{%endblock%}">
<div id="wrapper">
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://mozilla.org/firefox">Upgrade to a modern version of Firefox</a> to experience this site.</p><![endif]-->
<div class="navbar navbar-fixed-top navbar-default main-header" role="navigation">
+3 -6
View File
@@ -21,12 +21,9 @@
{% load i18n %}
{% load static %}
{% block page_head %}
<style type="text/css">
body {
background-image: url({% static 'theme/img/freedombox-logo-background.svg' %});
}
</style>
{% block body_class %}
background-logo
{% endblock %}
{% block container %}
+2 -6
View File
@@ -21,10 +21,6 @@
{% load static %}
{% load i18n %}
{% block page_head %}
<style type="text/css">
body {
background-image: url({% static 'theme/img/system-background.svg' %});
}
</style>
{% block body_class %}
background-system
{% endblock %}