Commit 00464099704ec16ad64faa3fe8c19d931ee7037a

Authored by Dmitriy Zaporozhets
1 parent 4c6c2485

I prefer icons on header

app/assets/javascripts/main.js.coffee
... ... @@ -30,6 +30,10 @@ $ ->
30 30 # Initialize tooltips
31 31 $('.has_tooltip').tooltip()
32 32  
  33 + # Bottom tooltip
  34 + $('.has_bottom_tooltip').tooltip(placement: 'bottom')
  35 +
  36 +
33 37 # Disable form buttons while a form is submitting
34 38 $('body').on 'ajax:complete, ajax:beforeSend, submit', 'form', (e) ->
35 39 buttons = $('[type="submit"]', @)
... ...
app/assets/stylesheets/sections/header.scss
... ... @@ -12,6 +12,8 @@ header {
12 12 .nav > li > a {
13 13 color: $style_color;
14 14 text-shadow: 0 1px 0 #fff;
  15 + font-size: 18px;
  16 + padding: 11px;
15 17 }
16 18  
17 19 /** NAV block with links and profile **/
... ... @@ -51,15 +53,6 @@ header {
51 53 height:40px;
52 54 font-family: 'Korolev', sans-serif;
53 55 }
54   -
55   - }
56   - .separator {
57   - float: left;
58   - height: 60px;
59   - width: 1px;
60   - background: white;
61   - border-left: 1px solid #DDD;
62   - margin-top: -10px;
63 56 }
64 57 }
65 58  
... ... @@ -218,5 +211,52 @@ header {
218 211 border-bottom-right-radius: 5px;
219 212 border-bottom-left-radius: 5px;
220 213 border-bottom: 0; } }
  214 +
  215 +
  216 +
  217 + /*
  218 + * Dark header
  219 + *
  220 + */
  221 + &.header-dark {
  222 + &.navbar-gitlab {
  223 + .navbar-inner {
  224 + background: #708090;
  225 + border-bottom: 1px solid #AAA;
  226 +
  227 + .nav > li > a {
  228 + color: #fff;
  229 + text-shadow: 0 1px 0 #111;
  230 + }
  231 + }
  232 + }
  233 +
  234 + .search {
  235 + .search-input {
  236 + background-color: #D2D5DA;
  237 + background-color: rgba(255, 255, 255, 0.5);
  238 +
  239 + &:focus {
  240 + background-color: white;
  241 + }
  242 + }
  243 + }
  244 + .search-input::-webkit-input-placeholder {
  245 + color: #666;
  246 + }
  247 + .app_logo {
  248 + a {
  249 + h1 {
  250 + background: url('logo_white.png') no-repeat 0px 2px;
  251 + color:#fff;
  252 + text-shadow: 0 1px 1px #111;
  253 + }
  254 + }
  255 + }
  256 + .project_name {
  257 + color:#fff;
  258 + text-shadow: 0 1px 1px #111;
  259 + }
  260 + }
221 261 }
222 262  
... ...
app/assets/stylesheets/themes/ui_basic.scss
... ... @@ -15,4 +15,22 @@
15 15 color: $blue_link;
16 16 }
17 17 }
  18 +
  19 + .app_logo {
  20 + .separator {
  21 + margin-left: 0;
  22 + margin-right: 0;
  23 + }
  24 + }
  25 +
  26 + .separator {
  27 + float: left;
  28 + height: 60px;
  29 + width: 1px;
  30 + background: white;
  31 + border-left: 1px solid #DDD;
  32 + margin-top: -10px;
  33 + margin-left: 10px;
  34 + margin-right: 10px;
  35 + }
18 36 }
... ...
app/assets/stylesheets/themes/ui_color.scss
... ... @@ -8,61 +8,16 @@
8 8 *
9 9 */
10 10 .ui_color {
11   -
12 11 /*
13 12 * Application Header
14 13 *
15 14 */
16 15 header {
17   -
  16 + @extend .header-dark;
18 17 &.navbar-gitlab {
19 18 .navbar-inner {
20 19 background: #657;
21   - border-bottom: 1px solid #AAA;
22   -
23   - .nav > li > a {
24   - color: #fff;
25   - text-shadow: 0 1px 0 #111;
26   - }
27 20 }
28 21 }
29   -
30   - .search {
31   - float: right;
32   - margin-right: 45px;
33   - .search-input {
34   - border: 1px solid #aaa;
35   - background-color: #D2D5DA;
36   - background-color: rgba(255, 255, 255, 0.5);
37   -
38   - &:focus {
39   - background-color: white;
40   - }
41   - }
42   - }
43   - .search-input::-webkit-input-placeholder {
44   - color: #666;
45   - }
46   - .app_logo {
47   - a {
48   - h1 {
49   - background: url('logo_white.png') no-repeat 0px 2px;
50   - color:#fff;
51   - text-shadow: 0 1px 1px #111;
52   - }
53   - }
54   - .separator {
55   - display:none;
56   - }
57   -
58   - }
59   - .project_name {
60   - color:#fff;
61   - text-shadow: 0 1px 1px #111;
62   - }
63 22 }
64   - /*
65   - * End of Application Header
66   - *
67   - */
68 23 }
... ...
app/assets/stylesheets/themes/ui_gray.scss
... ... @@ -8,61 +8,16 @@
8 8 *
9 9 */
10 10 .ui_gray {
11   -
12 11 /*
13 12 * Application Header
14 13 *
15 14 */
16 15 header {
17   -
  16 + @extend .header-dark;
18 17 &.navbar-gitlab {
19 18 .navbar-inner {
20 19 background: #708090;
21   - border-bottom: 1px solid #AAA;
22   -
23   - .nav > li > a {
24   - color: #fff;
25   - text-shadow: 0 1px 0 #111;
26   - }
27 20 }
28 21 }
29   -
30   - .search {
31   - float: right;
32   - margin-right: 45px;
33   - .search-input {
34   - border: 1px solid #aaa;
35   - background-color: #D2D5DA;
36   - background-color: rgba(255, 255, 255, 0.5);
37   -
38   - &:focus {
39   - background-color: white;
40   - }
41   - }
42   - }
43   - .search-input::-webkit-input-placeholder {
44   - color: #666;
45   - }
46   - .app_logo {
47   - a {
48   - h1 {
49   - background: url('logo_white.png') no-repeat 0px 2px;
50   - color:#fff;
51   - text-shadow: 0 1px 1px #111;
52   - }
53   - }
54   - .separator {
55   - display:none;
56   - }
57   -
58   - }
59   - .project_name {
60   - color:#fff;
61   - text-shadow: 0 1px 1px #111;
62   - }
63 22 }
64   - /*
65   - * End of Application Header
66   - *
67   - */
68 23 }
... ...
app/assets/stylesheets/themes/ui_modern.scss
... ... @@ -8,61 +8,16 @@
8 8 *
9 9 */
10 10 .ui_modern {
11   -
12 11 /*
13 12 * Application Header
14 13 *
15 14 */
16 15 header {
17   -
  16 + @extend .header-dark;
18 17 &.navbar-gitlab {
19 18 .navbar-inner {
20 19 background: #567;
21   - border-bottom: 1px solid #AAA;
22   -
23   - .nav > li > a {
24   - color: #fff;
25   - text-shadow: 0 1px 0 #111;
26   - }
27 20 }
28 21 }
29   -
30   - .search {
31   - float: right;
32   - margin-right: 45px;
33   - .search-input {
34   - border: 1px solid #aaa;
35   - background-color: #D2D5DA;
36   - background-color: rgba(255, 255, 255, 0.5);
37   -
38   - &:focus {
39   - background-color: white;
40   - }
41   - }
42   - }
43   - .search-input::-webkit-input-placeholder {
44   - color: #666;
45   - }
46   - .app_logo {
47   - a {
48   - h1 {
49   - background: url('logo_white.png') no-repeat 0px 2px;
50   - color:#fff;
51   - text-shadow: 0 1px 1px #111;
52   - }
53   - }
54   - .separator {
55   - display:none;
56   - }
57   -
58   - }
59   - .project_name {
60   - color:#fff;
61   - text-shadow: 0 1px 1px #111;
62   - }
63 22 }
64   - /*
65   - * End of Application Header
66   - *
67   - */
68 23 }
... ...
app/views/layouts/_head_panel.html.haml
... ... @@ -9,14 +9,16 @@
9 9 %ul.nav
10 10 - if current_user.is_admin?
11 11 %li
12   - = link_to admin_root_path, title: "Admin area" do
13   - %i.icon-cog
14   - Admin
  12 + = link_to admin_root_path, title: "Admin area", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do
  13 + %i.icon-cogs
15 14 - if current_user.can_create_project?
16 15 %li
17   - = link_to new_project_path, title: "Create New Project" do
  16 + = link_to new_project_path, title: "Create New Project", class: 'has_bottom_tooltip', 'data-original-title' => 'New project' do
18 17 %i.icon-plus
19   - Project
  18 + %li
  19 + = link_to profile_path, title: "Your Profile", class: 'has_bottom_tooltip', 'data-original-title' => 'Your profile' do
  20 + %i.icon-user
  21 + %span.separator
20 22 %li
21 23 = render "layouts/search"
22 24 %li
... ...