Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

{% block title %}{% trans "Log In :: CommCare HQ" %}{% endblock title %}

{% block body_class %}{% if not request.user.is_authenticated %}prelogin{% endif %}{% endblock body_class %}

{% block background_content %}
<div class="bg-container">
<div class="bg-overlay"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% include "login_and_password/two_factor/core/bootstrap5/login.html" %}
</div>
{% if not restrict_domain_creation %}
<div class="card sign-up-bubble form-bubble-purple">
<div class="card sign-up-bubble form-bubble-cta">
<div class="card-body mt-3">
<h2>
{% blocktrans %}
Expand All @@ -25,7 +25,7 @@ <h2>
</p>
{% endif %}
<p class="text-center">
<a class="btn btn-purple btn-lg"
<a class="btn btn-prelogin btn-lg"
{% if allow_domain_requests %}
href="{% url "domain_request" domain %}"
{% else %}
Expand Down
15 changes: 15 additions & 0 deletions corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@
@include button-variant($cc-dark-cool-accent-mid, $cc-dark-cool-accent-mid, $white, darken($cc-dark-cool-accent-mid, 5));
}

.btn-prelogin {
@include button-variant(
$white,
$white,
$color: $prelogin-deep-blue,
$hover-background: $prelogin-action-blue-tint,
$hover-border: $prelogin-action-blue-tint,
$hover-color: $prelogin-deep-blue,
$active-background: $prelogin-action-blue-tint,
$active-border: $prelogin-action-blue-tint,
$active-color: $prelogin-deep-blue
);
font-weight: $font-weight-semibold;
}

.btn-full-width {
width: 100%;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,68 +1,82 @@
.form-with-steps .form-step-number {
margin: 0;
font-size: 1.2rem;
font-size: 0.75rem;
font-weight: $font-weight-bold;
letter-spacing: 0.04em;
text-transform: uppercase;
padding: 0 0 12px;
color: $prelogin-muted-text;
}

.form-with-steps-centered {
text-align: center;
}

$form-step-circle: 28px;

ul.form-step-progress {
margin-bottom: 0;
background-color: rgba(0, 0, 0, .25);
overflow: hidden;
margin-top: 20px;
padding: 44px 0 10px;
counter-reset: step;
text-align: center;
padding: 40px 0 10px;
margin-top: 20px;
border-radius: 5px;

li {
list-style-type: none;
color: white;
color: rgba($white, 0.7);
text-transform: uppercase;
font-size: 9px;
font-size: 0.66rem;
font-weight: $font-weight-bold;
letter-spacing: 0.05em;
float: left;
position: relative;
transition: background 500ms ease-out;

&:after {
content: counter(step);
counter-increment: step;
width: 20px;
line-height: 20px;
display: block;
font-size: 10px;
color: $cc-text;
background: white;
border-radius: 5px;
margin: 0 auto 5px auto;
top: -25px;
left: 50%;
margin-left: -10px;
font-weight: bold;
position: absolute;
left: 50%;
top: -36px;
width: $form-step-circle;
line-height: $form-step-circle - 2px;
margin-left: $form-step-circle * -0.5;
border-radius: 50%;
font-size: 0.8125rem;
font-weight: $font-weight-bold;
background: rgba($white, 0.14);
color: rgba($white, 0.75);
border: 1px solid rgba($white, 0.35);
transition: background 500ms ease-out;
}

&:before {
content: '';
height: 2px;
background: white;
background: rgba($white, 0.35);
position: absolute;
left: -40%;
top: -15px;
top: -22px;
transition: background 500ms ease-out;
}
}

li:first-child:before {
display: none;
}

li.active {
&:before,
color: $white;

&:after {
background-color: $color-purple-dark;
color: $color-purple-dark-inverse;
background: $white;
color: $prelogin-deep-blue;
border-color: $white;
}

&:before {
background: $white;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,63 @@
height: $navbar-footer-height * 4;
min-height: $navbar-footer-height* 4;
}
}
}
.prelogin {
.navbar-hq-main-menu {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm torn on whether this belongs here or in registration-main because that's the only place it ever gets used, don't think I have a strong preference though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kept it in _navbar.scss so navbar styles stay in one file.

background: $prelogin-action-blue !important;
border: 0;

.navbar-brand > div {
background-image: url(/static/registration/images/commcare_by_dimagi.png);
background-size: contain;
background-repeat: no-repeat;
width: 152px;
height: 34px;
}

a:focus-visible,
button:focus-visible {
outline-color: $white;
}
}

.navbar-signin {
.dropdown-toggle.btn-outline-primary {
@include button-variant(
transparent,
transparent,
$color: $white,
$hover-background: rgba($white, 0.15),
$hover-border: transparent,
$hover-color: $white,
$active-background: rgba($white, 0.25),
$active-border: transparent,
$active-color: $white,
$disabled-background: transparent,
$disabled-border: transparent,
$disabled-color: rgba($white, 0.65)
);
}

.btn-primary {
@include button-variant(
transparent,
rgba($white, 0.7),
$color: $white,
$hover-background: rgba($white, 0.15),
$hover-border: rgba($white, 0.85),
$hover-color: $white,
$active-background: rgba($white, 0.25),
$active-border: rgba($white, 0.85),
$active-color: $white,
$disabled-background: transparent,
$disabled-border: rgba($white, 0.4),
$disabled-color: rgba($white, 0.65)
);
}

.btn-purple {
@extend .btn-prelogin;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ $light: $gray-100;
$dark: $gray-800;
$periwinkle: #6F76AC;

$prelogin-action-blue: #4d5ec2;
$prelogin-action-blue-tint: tint-color($prelogin-action-blue, 90%);
$prelogin-deep-blue: #2832a0;
$prelogin-muted-text: #5b6470;
$prelogin-card-border: #e2e5ee;
$prelogin-warning-bg: #fff8e6;
$prelogin-warning-border: #f0dfa8;
$prelogin-warning-text: #6b5a20;

$theme-colors: (
"primary": $primary,
"success": $success,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,27 @@ p.sso-message-block {
}

.cloud-choice {
color: $text-muted;
@include button-variant(
$white,
$prelogin-card-border,
$color: $gray-600,
$hover-background: $white,
$hover-border: $prelogin-action-blue,
$hover-color: $gray-600,
$active-background: $prelogin-action-blue-tint,
$active-border: $prelogin-action-blue,
$active-color: $prelogin-deep-blue
);
--#{$prefix}btn-border-width: 1.5px;
font-weight: $font-weight-normal !important;

&.selected {
color: $blue-800;
@include button-variant(
$prelogin-action-blue-tint,
$prelogin-action-blue,
$color: $prelogin-deep-blue
);
font-weight: $font-weight-semibold !important;
border-color: $blue-200;
background-color: $blue-100;
}
}

Expand All @@ -239,10 +252,6 @@ p.sso-message-block {
@include font-size($font-size-lg * 1.2);
}

.form-step-number {
@include font-size($font-size-lg * 0.9);
}

.help-block {
text-align: left;
}
Expand All @@ -267,34 +276,59 @@ p.sso-message-block {
}
}

.form-bubble-purple {
background-color: $color-purple-dark;
color: $color-purple-dark-inverse;
.form-bubble-cta {
background-color: $prelogin-action-blue;
color: $white;
border: none;

a, a:active, a:hover, a:link {
color: $purple-100;
a:not(.btn) {
color: $white;
}

.btn-purple {
background-color: $color-purple-dark;
color: $color-purple-dark-inverse;;
border: 1px solid $color-purple-dark-inverse;;

&:hover {
background-color: lighten($color-purple-dark, 5);
}
a:focus-visible,
button:focus-visible {
outline-color: $white;
}
}

.form-bubble {
position: relative;
margin-bottom: $spacer * 1.2;

.btn-primary {
@include button-variant($prelogin-action-blue, $prelogin-action-blue);
}

.btn-outline-primary {
@include button-outline-variant($prelogin-action-blue);
}

a:not(.btn) {
color: $prelogin-action-blue;
}

.alert-warning {
background: $prelogin-warning-bg;
border-color: $prelogin-warning-border;
color: $prelogin-warning-text;
border-radius: $border-radius-lg;
}

.valid-feedback,
.invalid-feedback,
.ko-delayed-feedback,
.validating-feedback {
text-align: left;
}
}

.form-control::placeholder {
color: $gray-600;
}

a:focus-visible,
button:focus-visible,
.form-control:focus-visible {
outline: 2px solid $prelogin-action-blue;
outline-offset: 2px;
}
2 changes: 1 addition & 1 deletion corehq/apps/hqwebapp/templates/hqwebapp/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
{% block head %}
{% endblock %}
</head>
<body>
<body class="{% block body_class %}{% endblock %}">

{% block csrf_token_block %}
<input id="csrfTokenContainer" type="hidden" value="{{ csrf_token }}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="container-fluid">
<div class="navbar-header hq-header">
<a
href="{% if request|toggle_enabled:"USER_TESTING_SIMPLIFY" %}#{% else %}{% url "homepage" %}{% endif %}"
href="{% if request|toggle_enabled:"USER_TESTING_SIMPLIFY" %}#{% elif request.user.is_authenticated or not is_saas_environment %}{% url "homepage" %}{% else %}{% prelogin_url "home" %}{% endif %}"
class="navbar-brand"
>
{% if CUSTOM_LOGO_URL %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="container-fluid">
+ <div class="navbar-header hq-header">
+ <a
+ href="{% if request|toggle_enabled:"USER_TESTING_SIMPLIFY" %}#{% else %}{% url "homepage" %}{% endif %}"
+ href="{% if request|toggle_enabled:"USER_TESTING_SIMPLIFY" %}#{% elif request.user.is_authenticated or not is_saas_environment %}{% url "homepage" %}{% else %}{% prelogin_url "home" %}{% endif %}"
+ class="navbar-brand"
+ >
+ {% if CUSTOM_LOGO_URL %}
Expand Down
Loading
Loading