header.scss 5.6 KB
Newer Older
D
Dmitriy Zaporozhets 已提交
1 2 3 4
/*
 *  Application Header
 *
 */
5
header {
6 7
  &.navbar-gitlab {
    .navbar-inner {
8 9
      height: 40px;
      padding: 3px;
10
      background: #F1F1F1;
11
      filter: none;
12 13 14 15

      .nav > li > a {
        color: $style_color;
        text-shadow: 0 1px 0 #fff;
16 17
        font-size: 16px;
        padding: 10px;
18 19 20 21 22 23 24 25 26 27
      }

      /** NAV block with links and profile **/
      .nav {
        float: right;
        margin-right: 0;
      }
    }
  }

28
  z-index: 10;
D
Dmitriy Zaporozhets 已提交
29 30

  /**
31
   *
D
Dmitriy Zaporozhets 已提交
32 33 34 35
   * Logo holder
   *
   */
  .app_logo {
36
    float: left;
37
    margin-right: 9px;
38 39 40 41
    position: relative;
    top: -5px;
    padding-top: 5px;

42
    a {
43
      float: left;
44
      padding: 0px;
45
      margin: 0 6px;
D
Dmitriy Zaporozhets 已提交
46

47
      h1 {
48
        background: url('logo_dark.png') no-repeat center 1px;
49 50
        float: left;
        height: 40px;
51
        width: 40px;
52
        @include header-font;
53
        text-indent: -9999px;
D
Dmitriy Zaporozhets 已提交
54 55
      }
    }
56 57 58
    &:hover {
      background-color: #EEE;
    }
D
Dmitriy Zaporozhets 已提交
59 60 61
  }

  /**
62
   *
D
Dmitriy Zaporozhets 已提交
63 64 65 66
   * Project / Area name
   *
   */
  .project_name {
67 68 69
    position: relative;
    float: left;
    margin: 0;
70
    margin-left: 15px;
71
    @include header-font;
D
Dmitriy Zaporozhets 已提交
72 73 74
  }

  /**
75
   *
D
Dmitriy Zaporozhets 已提交
76 77 78
   * Search box
   *
   */
79 80
  .search {
    margin-right: 45px;
81
    margin-left: 10px;
D
Dmitriy Zaporozhets 已提交
82

D
Dmitriy Zaporozhets 已提交
83 84
    .search-input {
      @extend .span2;
D
Dmitriy Zaporozhets 已提交
85 86 87
      background-image: url("icon-search.png");
      background-repeat: no-repeat;
      background-position: 10px;
88
      padding-left: 25px;
89
      font-size: 13px;
D
Dmitriy Zaporozhets 已提交
90
      @include border-radius(3px);
91
      border: 1px solid #c6c6c6;
92
      box-shadow: none;
93 94 95
      &:focus {
        @extend .span3;
      }
D
Dmitriy Zaporozhets 已提交
96 97 98 99
    }
  }

  /**
100
   *
D
Dmitriy Zaporozhets 已提交
101 102 103 104 105 106
   * Account box
   *
   */
  .account-box {
    position: absolute;
    right: 0;
107
    top: 4px;
D
Dmitriy Zaporozhets 已提交
108 109 110 111 112 113 114
    z-index: 10000;
    width: 128px;
    font-size: 11px;
    float: right;
    display: block;
    cursor: pointer;
    img {
D
Dmitriy Zaporozhets 已提交
115
      @include border-radius(3px);
116
      right: 5px;
D
Dmitriy Zaporozhets 已提交
117
      position: absolute;
118 119
      width: 28px;
      height: 28px;
D
Dmitriy Zaporozhets 已提交
120
      display: block;
121
      top: 1px;
D
Dmitriy Zaporozhets 已提交
122 123 124 125 126 127 128 129 130
      &:after {
        content: " ";
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        float: right;
131
        @include border-radius(5px);
D
Dmitriy Zaporozhets 已提交
132 133
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 0;
K
Koen Punt 已提交
134 135 136 137 138 139
        background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, 0.15)), to(rgba(0, 0, 0, 0.25))),
                    -webkit-gradient(linear, left top, right bottom, color-stop(0, rgba(255, 255, 255, 0)), color-stop(0.5, rgba(255, 255, 255, 0.1)), color-stop(0.501, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0)));
        background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)),
                    -moz-linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0));
        background: linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)),
                    linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0));
D
Dmitriy Zaporozhets 已提交
140 141 142 143 144 145 146 147 148 149 150
        -webkit-background-origin: border-box;
        -moz-background-origin: border;
  background-origin: border-box; } } }

  .account-box {
    &.hover {
    height: 138px; }
    &:hover > .account-links {
  display: block; } }

  .account-links {
151
    @include border-radius(5px);
D
Dmitriy Zaporozhets 已提交
152 153 154 155 156 157 158 159 160
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    position: relative;
    &:before {
      content: ".";
      width: 0;
      height: 0;
      position: absolute;
      border: 5px solid transparent;
      border-color: rgba(255, 255, 255, 0);
161
      border-bottom-color: #555;
D
Dmitriy Zaporozhets 已提交
162 163 164 165 166
      text-indent: -9999px;
      top: -10px;
      line-height: 0;
      right: 10px;
    z-index: 10; }
167
    background: #555;
D
Dmitriy Zaporozhets 已提交
168 169
    display: none;
    z-index: 100000;
170
    @include border-radius(4px);
171
    width: 130px;
D
Dmitriy Zaporozhets 已提交
172
    position: absolute;
173 174
    right: 5px;
    top: 38px;
D
Dmitriy Zaporozhets 已提交
175 176 177 178
    margin-top: 0;
    float: right;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    a {
179
      color: #fff;
180
      padding: 12px 15px;
D
Dmitriy Zaporozhets 已提交
181 182
      display: block;
      text-shadow: none;
183
      border-bottom: 1px solid #666;
184
      font-size: 12px;
D
Dmitriy Zaporozhets 已提交
185
      &:hover {
186
        color: #fff;
187
        background: #333;
D
Dmitriy Zaporozhets 已提交
188 189 190 191 192 193 194 195 196 197 198
      }
    }
  }

  .account-box.hover .arrow-up {
    top: 41px;
    right: 6px;
    position: absolute; }

  .account-links a {
    &:first-child {
199 200
      @include border-radius(5px 5px 0 0);
    }
D
Dmitriy Zaporozhets 已提交
201
    &:last-child {
202
      @include border-radius(0 0 5px 5px);
203 204
      border-bottom: 0;
    }
205
  }
D
Dmitriy Zaporozhets 已提交
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



  /*
   * Dark header
   *
   */
  &.header-dark {
    &.navbar-gitlab {
      .navbar-inner {
        background: #708090;
        border-bottom: 1px solid #AAA;

        .nav > li > a {
          color: #fff;
          text-shadow: 0 1px 0 #111;
        }
      }
    }

    .search {
      .search-input {
        background-color: #D2D5DA;
        background-color: rgba(255, 255, 255, 0.5);

        &:focus {
          background-color: white;
        }
      }
    }
    .search-input::-webkit-input-placeholder {
      color: #666;
    }
    .app_logo {
      a {
        h1 {
242
          background: url('logo_white.png') no-repeat center 1px;
243
          color: #fff;
D
Dmitriy Zaporozhets 已提交
244 245 246 247 248
          text-shadow: 0 1px 1px #111;
        }
      }
    }
    .project_name {
249 250 251
      a {
        color: #FFF;
      }
252
      color: #fff;
D
Dmitriy Zaporozhets 已提交
253 254 255
      text-shadow: 0 1px 1px #111;
    }
  }
256 257 258 259 260 261 262 263 264 265

  .app_logo {
    .separator {
      margin-left: 0;
      margin-right: 0;
    }
  }

  .separator {
    float: left;
266
    height: 46px;
267 268 269
    width: 1px;
    background: white;
    border-left: 1px solid #DDD;
270
    margin-top: -3px;
271 272 273
    margin-left: 10px;
    margin-right: 10px;
  }
D
Dmitriy Zaporozhets 已提交
274 275
}