Skip to content

Commit

Permalink
Merge pull request #438 from Cadasta/bugfix/bg-photo
Browse files Browse the repository at this point in the history
Fixed bg image by adding body class
  • Loading branch information
wonderchook authored Jul 14, 2016
2 parents cf0ca20 + 567ce4c commit ebd8248
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 21 deletions.
16 changes: 10 additions & 6 deletions cadasta/core/static/css/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cadasta/core/static/css/main.css.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions cadasta/core/static/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,13 @@ header {
}
}

/* =Main container
-------------------------------------------------------------- */

main.container-fluid {
padding-bottom: 50px; // for footer
}

/* =Main content to right of sidebar
-------------------------------------------------------------- */

Expand Down
15 changes: 6 additions & 9 deletions cadasta/core/static/css/reg.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
/* =Registration area & profile pages
-------------------------------------------------------------- */

.tinted-bg { // photo for login and register forms
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 1;
background: linear-gradient(rgba(44, 74, 165, 0.55), rgba(44, 74, 165, 0.55)), url("/static/img/land.jpg");
background-size: cover;
body.tinted-bg { // photo for login and register forms
background: linear-gradient(rgba(44, 74, 165, 0.55), rgba(44, 74, 165, 0.55)), url("/static/img/land.jpg");
background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
-webkit-background-size: cover;
}

.form-narrow {
Expand Down
3 changes: 1 addition & 2 deletions cadasta/templates/allauth/account/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{% load account socialaccount %}

{% block top-nav %}registration{% endblock %}
{% block body-class %}tinted-bg{% endblock %}

{% block title %} | {% trans "Sign In" %}{% endblock %}

Expand Down Expand Up @@ -70,6 +71,4 @@ <h1>{% trans "Sign in to your account" %}</h1>
</p>
</form>

<div class="tinted-bg"></div>

{% endblock %}
3 changes: 1 addition & 2 deletions cadasta/templates/allauth/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{% load i18n %}

{% block top-nav %}registration{% endblock %}
{% block body-class %}tinted-bg{% endblock %}

{% block title %} | {% trans "Register" %}{% endblock %}

Expand Down Expand Up @@ -73,6 +74,4 @@ <h1>{% trans "Register for a free account" %}</h1>
</p>
</form>

<div class="tinted-bg"></div>

{% endblock %}
2 changes: 1 addition & 1 deletion cadasta/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{% endif %}
{% block extra_head %}{% endblock %}
</head>
<body id="{% block top-nav %}{% endblock %}">
<body id="{% block top-nav %}{% endblock %}" class="{% block body-class %}{% endblock %}">
<div id="cadasta">
<!-- Site header -->
<header class="header" role="banner">
Expand Down

0 comments on commit ebd8248

Please sign in to comment.