header.scss 3.1 KB
Newer Older
D
Dmitriy Zaporozhets 已提交
1 2 3 4
/*
 *  Application Header
 *
 */
5
header {
6 7
  transition-duration: .3s;

D
Dmitriy Zaporozhets 已提交
8
  &.navbar-empty {
9
    height: 58px;
10 11
    background: #fff;
    border-bottom: 1px solid #eee;
D
Dmitriy Zaporozhets 已提交
12 13

    .center-logo {
14
      margin: 11px 0;
D
Dmitriy Zaporozhets 已提交
15
      text-align: center;
16

17 18 19
      #tanuki-logo, img {
        width: 36px;
        height: 36px;
20
      }
D
Dmitriy Zaporozhets 已提交
21
    }
D
Dmitriy Zaporozhets 已提交
22 23
  }

24
  &.navbar-gitlab {
25
    padding: 0 20px;
26
    z-index: 100;
27
    margin-bottom: 0;
28
    min-height: $header-height;
29
    background-color: $gray-light;
30
    border: none;
31
    border-bottom: 1px solid #eee;
D
Dmitriy Zaporozhets 已提交
32

33
    .container-fluid {
34
      width: 100% !important;
35
      filter: none;
36
      padding: 0;
37 38

      .nav > li > a {
39
        color: $gl-icon-color;
40
        font-size: 18px;
41
        padding: 0;
42
        margin: ($header-height - 28) / 2 0;
43
        margin-left: 10px;
44 45 46
        height: 28px;
        width: 28px;
        line-height: 28px;
47
        text-align: center;
D
Dmitriy Zaporozhets 已提交
48

D
Dmitriy Zaporozhets 已提交
49
        &:hover, &:focus, &:active {
50
          background-color: $gray-light;
D
Dmitriy Zaporozhets 已提交
51
        }
52 53
      }

54
      .navbar-toggle {
55
        color: #666;
56
        margin: 6px 0;
57
        border-radius: 0;
58 59
        position: absolute;
        right: 2px;
60 61

        &:hover {
62
          background-color: #eee;
63
        }
64
        &.active {
65
          color: $gl-icon-color;
66
        }
67 68
      }
    }
69 70
  }

D
Dmitriy Zaporozhets 已提交
71
  .header-content {
72
    position: relative;
D
Dmitriy Zaporozhets 已提交
73
    height: $header-height;
P
Phil Hughes 已提交
74
    padding-right: 40px;
75 76 77 78

    @media (min-width: $screen-sm-min) {
      padding-right: 0;
    }
D
Dmitriy Zaporozhets 已提交
79

80 81 82 83
    .dropdown-menu {
      margin-top: -5px;
    }

D
Dmitriy Zaporozhets 已提交
84 85
    .title {
      margin: 0;
D
Dmitriy Zaporozhets 已提交
86
      font-size: 19px;
87
      line-height: $header-height;
88
      font-weight: normal;
89
      color: $gl-text-color;
P
Phil Hughes 已提交
90
      overflow: hidden;
91 92 93
      text-overflow: ellipsis;
      vertical-align: top;
      white-space: nowrap;
D
Dmitriy Zaporozhets 已提交
94 95

      a {
96
        color: $gl-text-color;
D
Dmitriy Zaporozhets 已提交
97 98 99 100
        &:hover {
          text-decoration: underline;
        }
      }
101 102

      .dropdown-toggle-caret {
P
Phil Hughes 已提交
103 104
        position: relative;
        top: -2px;
105 106
        width: 12px;
        line-height: 12px;
107
        margin-left: 5px;
P
Phil Hughes 已提交
108
        font-size: 10px;
109 110 111 112 113 114 115
        text-align: center;
        cursor: pointer;
      }

      .project-item-select {
        right: auto;
        left: 0;
116
      }
D
Dmitriy Zaporozhets 已提交
117
    }
118 119 120

    .navbar-collapse {
      float: right;
121
      border-top: none;
122
    }
D
Dmitriy Zaporozhets 已提交
123 124
  }

P
Phil Hughes 已提交
125 126 127 128
  .project-item-select-holder {
    display: inline;
  }

129 130 131
  .impersonation i {
    color: $red-normal;
  }
D
Dmitriy Zaporozhets 已提交
132 133
}

D
Dmitriy Zaporozhets 已提交
134
@mixin collapsed-header {
135
  margin-left: $sidebar_collapsed_width;
D
Dmitriy Zaporozhets 已提交
136 137
}

P
Phil Hughes 已提交
138
.header-collapsed {
139
  margin-left: $sidebar_collapsed_width;
140

P
Phil Hughes 已提交
141
  @media (min-width: $screen-md-min) {
P
Phil Hughes 已提交
142
    @include collapsed-header;
143
  }
D
Dmitriy Zaporozhets 已提交
144 145
}

P
Phil Hughes 已提交
146 147
.header-expanded {
  margin-left: $sidebar_collapsed_width;
D
Dmitriy Zaporozhets 已提交
148

P
Phil Hughes 已提交
149
  @media (min-width: $screen-md-min) {
150
    margin-left: $sidebar_width;
D
Dmitriy Zaporozhets 已提交
151 152
  }
}
D
Dmitriy Zaporozhets 已提交
153 154

@media (max-width: $screen-xs-max) {
155
  header .container-fluid {
D
Dmitriy Zaporozhets 已提交
156 157 158
    font-size: 18px;

    .navbar-nav {
159
      margin: 0;
160
      float: none !important;
D
Dmitriy Zaporozhets 已提交
161 162 163 164 165 166

      .visible-xs, .visable-sm {
        display: table-cell !important;
      }
    }

D
Dmitriy Zaporozhets 已提交
167 168 169 170 171 172 173 174 175 176 177
    .navbar-collapse {
      padding-left: 5px;

      li {
        display: table-cell;
        width: 1%;

        a {
          margin-left: 8px !important;
        }
      }
D
Dmitriy Zaporozhets 已提交
178 179 180
    }
  }
}