diff --git a/public/app/partials/login.html b/public/app/partials/login.html index 37950460a26..29988eb8f05 100644 --- a/public/app/partials/login.html +++ b/public/app/partials/login.html @@ -1,7 +1,7 @@
@@ -59,7 +63,7 @@ -
diff --git a/public/sass/_variables.scss b/public/sass/_variables.scss index f0a0a1f5fbf..28741147b74 100644 --- a/public/sass/_variables.scss +++ b/public/sass/_variables.scss @@ -237,3 +237,25 @@ $panel-padding: 0px 10px 5px 10px; // tabs $tabs-padding: 10px 15px 9px; +$external-services: ( + github: ( + bgColor: #464646, + borderColor: #393939, + icon: '' + ), + google: ( + bgColor: #e84d3c, + borderColor: #b83e31, + icon: '' + ), + grafanacom: ( + bgColor: inherit, + borderColor: #393939, + icon: '' + ), + oauth: ( + bgColor: inherit, + borderColor: #393939, + icon: '' + ) +) !default; diff --git a/public/sass/components/_buttons.scss b/public/sass/components/_buttons.scss index 5b6f91bb130..2fec0adea51 100644 --- a/public/sass/components/_buttons.scss +++ b/public/sass/components/_buttons.scss @@ -143,7 +143,57 @@ } } +// Extra padding .btn-p-x-2 { padding-left: 20px; padding-right: 20px; } + +// External services +// Usage: +//
Button text
+ +$btn-service-icon-width: 35px; +.btn-service { + position: relative; +} + +@each $service, $data in $external-services { + $serviceBgColor: map-get($data, bgColor); + $serviceBorderColor: map-get($data, borderColor); + + .btn-service--#{$service} { + background-color: $serviceBgColor; + border: 1px solid $serviceBorderColor; + + .btn-service-icon { + font-size: 24px; // Override + border-right: 1px solid $serviceBorderColor; + } + } +} + +.btn-service-icon { + position: absolute; + left: 0; + height: 100%; + top: 0; + padding-left: .5rem; + padding-right: .5rem; + width: $btn-service-icon-width; + text-align: center; + + &::before { + position: relative; + top: 4px; + } +} + +.btn-service--grafanacom { + .btn-service-icon { + background-image: url(/public/img/grafana_mask_icon_white.svg); + background-repeat: no-repeat; + background-position: 50%; + background-size: 60%; + } +} \ No newline at end of file diff --git a/public/sass/pages/_login.scss b/public/sass/pages/_login.scss index c8fbc8e63fb..fac7bb2c8aa 100644 --- a/public/sass/pages/_login.scss +++ b/public/sass/pages/_login.scss @@ -105,6 +105,7 @@ select:-webkit-autofill:focus { align-items: center; justify-content: center; flex-grow: 1; + max-width: 415px; } .login-tab-header { @@ -173,30 +174,6 @@ select:-webkit-autofill:focus { .login-oauth { width: 100%; - - .btn { - margin: 0 0 1rem; - } - - .btn-google { - background: #dd4b39; - color: white; - } - - .btn-github { - background: #555; - color: white; - } - - .btn-grafana-com { - @include buttonBackground($btn-inverse-bg, $btn-inverse-bg-hl, $btn-inverse-text-color); - box-shadow: $card-shadow; - - img { - width: 19px; - vertical-align: sub; - } - } } .password-recovery {