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 2018-07-17 18:49:18 +05:30 committed by James Valleroy
parent f762f57d1c
commit daef528576
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
5 changed files with 20 additions and 19 deletions

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 %}

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">

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 %}

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 %}

View File

@ -300,3 +300,15 @@ a.menu_link_active {
.bg-warning p:last-child {
margin: 0;
}
.background-logo {
background-image: url('../img/freedombox-logo-background.svg');
}
.background-apps {
background-image: url('../img/apps-background.svg');
}
.background-system {
background-image: url('../img/system-background.svg');
}