mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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:
parent
f762f57d1c
commit
daef528576
@ -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 %}
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -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 %}
|
||||
|
||||
@ -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 %}
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user