summaryrefslogtreecommitdiff
path: root/app/assets/stylesheets/pages/login.scss
blob: 773935f4c76c7f50bd05514917573092a4909b4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
/* Login Page */
.login-page {
  .container {
    max-width: 960px;
  }

  .navbar-gitlab .container {
    max-width: none;
  }

  .flash-container {
    margin-bottom: $gl-padding;
  }

  .brand-holder {
    font-size: 18px;
    line-height: 1.5;

    p {
      font-size: 16px;
      color: $login-brand-holder-color;
    }

    h3 {
      font-size: 22px;
    }

    img {
      max-width: 100%;
      margin-bottom: 30px;
    }

    a {
      font-weight: $gl-font-weight-bold;
    }
  }

  p {
    font-size: 13px;
  }

  .login-box,
  .omniauth-container {
    box-shadow: 0 0 0 1px $border-color;
    border-radius: $border-radius;
    padding: 15px;

    .login-heading h3 {
      font-weight: $gl-font-weight-normal;
      line-height: 1.5;
      margin: 0 0 10px;
    }

    .login-footer {
      margin-top: 10px;

      p:last-child {
        margin-bottom: 0;
      }
    }

    a.forgot {
      float: right;
      padding-top: 6px;
    }

    .nav .active a {
      background: transparent;
    }

    // Styles the glowing border of focused input for username async validation
    .login-body {
      font-size: 13px;

      input + p,
      input ~ p.field-validation {
        margin-top: 5px;
      }

      .username .validation-success {
        color: $green-600;
      }

      .username .validation-error {
        color: $red-500;
      }
    }
  }

  .omniauth-container {
    border-radius: $border-radius;
    font-size: 13px;

    p {
      margin: 0;
    }

    form {
      padding: 0;
      border: 0;
      background: none;
      margin-bottom: $gl-padding;
    }

    .omniauth-btn {
      width: 100%;
    }
  }

  .new-session-tabs {
    display: flex;
    box-shadow: 0 0 0 1px $border-color;
    border-top-right-radius: $border-radius-default;
    border-top-left-radius: $border-radius-default;

    // Ldap configurations may need more tabs & the tab labels are user generated (arbitrarily long).
    // These styles prevent this from breaking the layout, and only applied when providers are configured.
    &.custom-provider-tabs {
      flex-wrap: wrap;

      li {
        min-width: 85px;
        flex-basis: auto;

        // This styles tab elements that have wrapped to a second line. We cannot easily predict when this will happen.
        // We are making somewhat of an assumption about the configuration here: that users do not have more than
        // 3 LDAP servers configured (in addition to standard login) and they are not using especially long names for any
        // of them. If either condition is false, this will work as expected. If both are true, there may be a missing border
        // above one of the bottom row elements. If you know a better way, please implement it!
        &:nth-child(n+5) {
          border-top: 1px solid $border-color;
        }
      }

      a {
        font-size: 16px;
      }
    }

    li {
      flex: 1;
      text-align: center;
      border-left: 1px solid $border-color;

      &:first-of-type {
        border-left: 0;
        border-top-left-radius: $border-radius-default;
      }

      &:last-of-type {
        border-top-right-radius: $border-radius-default;
      }

      &:not(.active) {
        background-color: $gray-light;
      }

      a {
        width: 100%;
        font-size: 18px;
      }

      &.active > a {
        cursor: default;
      }
    }
  }

  .form-control {
    &:active,
    &:focus {
      background-color: $white;
    }
  }

  .submit-container {
    margin-top: 16px;
  }

  input[type='submit'] {
    margin-bottom: 0;
    display: block;
    width: 100%;
  }

  .devise-errors {
    h2 {
      margin-top: 0;
      font-size: 14px;
      color: $red-700;
    }
  }
}

@include media-breakpoint-down(xs) {
  .login-page {
    .col-md-5.float-right {
      float: none !important;
      margin-bottom: 45px;
    }
  }
}

.devise-layout-html {
  margin: 0;
  padding: 0;
  height: 100%;

  // Fixes footer container to bottom of viewport
  body {
    // offset height of fixed header + 1 to avoid scroll
    height: calc(100% - 51px);

    // offset without the header
    &.navless {
      height: calc(100% - 11px);
    }

    margin: 0;
    padding: 0;

    .page-wrap {
      min-height: 100%;
      position: relative;
    }

    .footer-container,
    hr.footer-fixed {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 40px;
      background: $white;
    }

    .login-page-broadcast {
      margin-top: 40px;
    }

    .navless-container {
      padding: 65px 15px; // height of footer + bottom padding of email confirmation link

      @include media-breakpoint-down(xs) {
        padding: 0 15px 65px;
      }
    }
  }
}