Skip to content

Instantly share code, notes, and snippets.

@bruinsg
Last active October 28, 2022 09:41
Show Gist options
  • Save bruinsg/5fb0cf342cf358fa67f53c1851587aa1 to your computer and use it in GitHub Desktop.
Save bruinsg/5fb0cf342cf358fa67f53c1851587aa1 to your computer and use it in GitHub Desktop.
/* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#gerrit_topmenu {
left: 60px;
margin-right: 60px;
position: relative;
margin-bottom: 5px;
}
#diffy_logo {
display: block !important;
margin-bottom: -55px;
padding-left: 10px;
position: relative;
top: -50px;
width: 60px;
}
/**
* LDAP login
*/
#login_form {
position: relative;
background: #d8e0e869;
width: 350px;
padding: 80px 40px 40px;
border-radius: 5px;
-webkit-box-shadow: 5px 5px 50px -16px rgba(0, 0, 0, .8);
-moz-box-shadow: 5px 5px 50px -16px rgba(0, 0, 0, .8);
-ms-box-shadow: 5px 5px 50px -16px rgba(0, 0, 0, .8);
box-shadow: 5px 5px 50px -16px rgba(0, 0, 0, .8)
}
#login_form:before {
background-image: url(/r/static/your_back_ground_image.png);
background-image: linear-gradient(transparent,transparent), url(/r/static/your_logo.png);
background-repeat: no-repeat;
background-position: center center;
content: "";
position: absolute;
top: 0;
height: 168px;
width: 350px
}
#login_form table {
display: flex;
padding-top: 100px
}
#login_form table tbody {
flex: 1
}
#login_form table tbody th, #login_form table tbody tr:nth-child(3) td:first-child,
#login_form table tbody tr:nth-child(4) td:first-child {
display: none
}
#login_form table tbody td {
flex: 1;
-ms-flex: 1 0 auto;
display: flex;
align-items: stretch;
flex-direction: column;
-ms-flex-direction: column
}
#login_form table tbody tr {
display: flex;
justify-content: center;
flex-direction: row
}
#login_form table tbody tr:nth-child(3) {
margin-bottom: 30px
}
#login_form table tbody tr:nth-child(3) td, #login_form table tbody tr:nth-child(4) td {
flex-direction: row
}
#login_form input[type=text], #login_form input[type=password] {
border: 0;
border-left: 5px solid #ff8700;
background: #ebebeb;
padding: 0 15px;
height: 40px;
margin-bottom: 15px;
color: #585858;
font-size: 1em;
-webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
-moz-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
-ms-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1)
}
#login_form input[type=text]:-moz-placeholder, #login_form input[type=text]:-ms-input-placeholder,
#login_form input[type=text]:-webkit-input-placeholder, #login_form input[type=password]:-moz-placeholder,
#login_form input[type=password]:-ms-input-placeholder, #login_form input[type=password]:-webkit-input-placeholder {
color: #afafaf
}
#login_form input[type=text]:focus, #login_form input[type=password]:focus {
background: #fafafa
}
#login_form a#cancel_link, #login_form input[type=submit] {
flex: 1;
align-self: center;
border: 0;
border-bottom: 5px solid #ff8700;
background: #ebebeb;
padding: 0 15px;
height: 50px;
margin-bottom: 15px;
text-transform: uppercase;
font-size: 1.2em;
text-decoration: none;
color: #585858;
-webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
-moz-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
-ms-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1)
}
#login_form a#cancel_link:focus, #login_form a#cancel_link:hover,
#login_form input[type=submit]:focus, #login_form input[type=submit]:hover {
color: #ff8700;
background: #fafafa
}
#login_form a#cancel_link {
margin-left: 30px;
margin-top: 3px;
line-height: 45px;
height: 45px;
text-align: center
}
#login_form #f_remember + label {
color: #8b8b8b;
line-height: 20px
}
#login_form #f_remember + label:focus, #login_form #f_remember + label:hover {
color: #585858
}
#login_form #f_remember {
position: absolute;
opacity: 0
}
#login_form #f_remember + label {
position: relative;
cursor: pointer;
padding: 0
}
#login_form #f_remember + label:before {
content: "";
margin-right: 10px;
display: inline-block;
vertical-align: text-bottom;
width: 20px;
height: 20px;
background: #fff
}
#login_form #f_remember:checked + label:before, #login_form #f_remember:hover + label:before {
background: #ff8700
}
#login_form #f_remember:focus + label:before {
background: #ff8700;
-webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
-moz-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
-ms-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1)
}
#login_form #f_remember:disabled + label {
color: #b8b8b8;
cursor: auto
}
#login_form #f_remember:disabled + label:before {
box-shadow: none;
background: #ddd
}
#login_form #f_remember:checked + label:after {
content: "";
position: absolute;
left: 5px;
top: 9px;
background: #fff;
width: 2px;
height: 2px;
box-shadow: 2px 0 0 #fff, 4px 0 0 #fff, 4px -2px 0 #fff, 4px -4px 0 #fff, 4px -6px 0 #fff, 4px -8px 0 #fff;
transform: rotate(45deg)
}
/* Login Handling */
/* Background image handling */
body#login_ldap {
height: 100%;
font-family: 'Source Sans Pro', sans-serif;
background-image: url(/r/static/your_image.jpg) !important;
background-position: center center !important;
background-repeat: no-repeat !important;
background-attachment: fixed !important;
background-size: cover !important;
background-color: #999 !important;
}
html.loginParent body:after {
content: "Image by Adrian Dreßler";
}
html.loginParent body .wm-gerrit-heading {
background-image: none;
}
/* Hide old components */
#login_ldap #gerrit_topmenu { display: none; }
#login_ldap #gerrit_header { display: none; }
body#login_ldap #gerrit_body {
display: flex;
height: 100%;
justify-content: center;
align-items: center;
resize: both;
overflow: auto;
}
#login_ldap #gerrit_body h1 {
display: none;
}
.gr-main-header-0 .titleText.gr-main-header::after {
content: '123AEE1';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment