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;
D
Dmitriy Zaporozhets 已提交
10
    background: #FFF;
D
Dmitriy Zaporozhets 已提交
11
    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: #fff;
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 40
        color: #7f8fa4;
        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: #FFF;
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 62 63

        &:hover {
          background-color: #EEE;
        }
64 65 66
        &.active {
          color: #7f8fa4;
        }
67 68
      }
    }
69 70
  }

D
Dmitriy Zaporozhets 已提交
71 72 73 74 75
  .header-content {
    height: $header-height;

    .title {
      margin: 0;
D
Dmitriy Zaporozhets 已提交
76
      font-size: 19px;
77
      line-height: $header-height;
78 79
      font-weight: normal;
      color: #4c4e54;
P
Phil Hughes 已提交
80
      overflow: hidden;
81 82 83
      text-overflow: ellipsis;
      vertical-align: top;
      white-space: nowrap;
D
Dmitriy Zaporozhets 已提交
84 85

      a {
86
        color: #4c4e54;
D
Dmitriy Zaporozhets 已提交
87 88 89 90
        &:hover {
          text-decoration: underline;
        }
      }
91 92

      .dropdown-toggle-caret {
P
Phil Hughes 已提交
93 94
        position: relative;
        top: -2px;
95 96
        width: 12px;
        line-height: 12px;
97
        margin-left: 5px;
P
Phil Hughes 已提交
98
        font-size: 10px;
99 100 101 102 103 104 105
        text-align: center;
        cursor: pointer;
      }

      .project-item-select {
        right: auto;
        left: 0;
106
      }
D
Dmitriy Zaporozhets 已提交
107
    }
108 109 110

    .navbar-collapse {
      float: right;
111
      border-top: none;
112
    }
D
Dmitriy Zaporozhets 已提交
113 114
  }

115
  .search {
D
Dmitriy Zaporozhets 已提交
116
    margin-right: 10px;
117
    margin-left: 10px;
118
    margin-top: ($header-height - 36) / 2;
D
Dmitriy Zaporozhets 已提交
119 120 121

    form {
      margin: 0;
D
Dmitriy Zaporozhets 已提交
122
      padding: 0;
D
Dmitriy Zaporozhets 已提交
123
    }
D
Dmitriy Zaporozhets 已提交
124

D
Dmitriy Zaporozhets 已提交
125
    .search-input {
126
      width: 220px;
127 128 129 130 131

      &:focus {
        @include box-shadow(none);
        outline: none;
      }
D
Dmitriy Zaporozhets 已提交
132 133
    }
  }
134 135 136 137

  .impersonation i {
    color: $red-normal;
  }
D
Dmitriy Zaporozhets 已提交
138 139
}

D
Dmitriy Zaporozhets 已提交
140
@mixin collapsed-header {
141
  margin-left: $sidebar_collapsed_width;
D
Dmitriy Zaporozhets 已提交
142 143
}

P
Phil Hughes 已提交
144 145
.header-collapsed {
  margin-left: $sidebar_collapsed_width;
146

P
Phil Hughes 已提交
147
  @media (min-width: $screen-md-min) {
P
Phil Hughes 已提交
148
    @include collapsed-header;
149
  }
D
Dmitriy Zaporozhets 已提交
150 151
}

P
Phil Hughes 已提交
152 153
.header-expanded {
  margin-left: $sidebar_collapsed_width;
D
Dmitriy Zaporozhets 已提交
154

P
Phil Hughes 已提交
155
  @media (min-width: $screen-md-min) {
156
    margin-left: $sidebar_width;
D
Dmitriy Zaporozhets 已提交
157 158
  }
}
D
Dmitriy Zaporozhets 已提交
159 160

@media (max-width: $screen-xs-max) {
161
  header .container-fluid {
D
Dmitriy Zaporozhets 已提交
162 163 164
    font-size: 18px;

    .navbar-nav {
165 166
      margin: 0px;
      float: none !important;
D
Dmitriy Zaporozhets 已提交
167 168 169 170 171 172

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

D
Dmitriy Zaporozhets 已提交
173 174 175 176 177 178 179 180 181 182 183
    .navbar-collapse {
      padding-left: 5px;

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

        a {
          margin-left: 8px !important;
        }
      }
D
Dmitriy Zaporozhets 已提交
184 185 186
    }
  }
}