summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-20 21:19:09 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-20 21:19:09 +0000
commit752468b20c5f715a661c67e052efd956f4f5c098 (patch)
tree5d4dfa07649d157cb9d294cb05e144834f699032
parentebcbe0c87b12d10c40c6a3fa13ceec02e8220090 (diff)
parent4d846c09b1982016356256afeb40dd252215429b (diff)
downloadgitlab-ce-752468b20c5f715a661c67e052efd956f4f5c098.tar.gz
Merge branch 'update/bootstrap2211' of dev.gitlabhq.com:gitlabhq
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock5
-rw-r--r--app/assets/stylesheets/gitlab_bootstrap/buttons.scss4
-rw-r--r--app/assets/stylesheets/gitlab_bootstrap/typography.scss3
-rw-r--r--app/assets/stylesheets/main.scss4
-rw-r--r--app/assets/stylesheets/sections/header.scss85
-rw-r--r--app/assets/stylesheets/sections/projects.scss5
-rw-r--r--app/assets/stylesheets/themes/ui_basic.scss32
-rw-r--r--app/assets/stylesheets/themes/ui_mars.scss40
-rw-r--r--app/assets/stylesheets/themes/ui_modern.scss121
-rw-r--r--app/views/commits/_diffs.html.haml12
-rw-r--r--app/views/layouts/_head_panel.html.haml48
-rw-r--r--app/views/layouts/_search.html.haml2
-rw-r--r--app/views/projects/_clone_panel.html.haml6
-rw-r--r--app/views/shared/_clone_panel.html.haml4
-rw-r--r--spec/models/project_spec.rb1
16 files changed, 139 insertions, 235 deletions
diff --git a/Gemfile b/Gemfile
index cb09766810f..b0f31a61502 100644
--- a/Gemfile
+++ b/Gemfile
@@ -106,7 +106,7 @@ group :assets do
gem "jquery-ui-rails", "2.0.2"
gem "modernizr", "2.6.2"
gem "raphael-rails", "2.1.0"
- gem 'bootstrap-sass', "2.0.4"
+ gem 'bootstrap-sass', "2.2.1.1"
gem "font-awesome-sass-rails", "~> 2.0.0"
gem "gemoji", "~> 1.2.1", require: 'emoji/railtie'
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 693b2060eb1..d5be48d1c7d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -97,7 +97,8 @@ GEM
backports (2.6.5)
bcrypt-ruby (3.0.1)
blankslate (3.1.2)
- bootstrap-sass (2.0.4.0)
+ bootstrap-sass (2.2.1.1)
+ sass (~> 3.2)
builder (3.0.4)
capybara (1.1.3)
mime-types (>= 1.16)
@@ -446,7 +447,7 @@ DEPENDENCIES
acts-as-taggable-on (= 2.3.3)
annotate!
awesome_print
- bootstrap-sass (= 2.0.4)
+ bootstrap-sass (= 2.2.1.1)
capybara
carrierwave (~> 0.7.1)
chosen-rails (= 0.9.8)
diff --git a/app/assets/stylesheets/gitlab_bootstrap/buttons.scss b/app/assets/stylesheets/gitlab_bootstrap/buttons.scss
index 4f631a3e79a..b66723d4cd0 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/buttons.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/buttons.scss
@@ -1,6 +1,8 @@
.btn {
@include bg-gradient(#f7f7f7, #d5d5d5);
border-color:#aaa;
+ font-size: 13px;
+ line-height: 18px;
&:hover {
@include bg-gray-gradient;
border-color:#bbb;
@@ -84,6 +86,7 @@
&.small {
@extend .btn-small;
+ line-height: 18px;
}
&.active {
@@ -94,6 +97,7 @@
&.very_small {
font-size:11px;
padding:2px 6px;
+ line-height: 16px;
margin:2px;
}
diff --git a/app/assets/stylesheets/gitlab_bootstrap/typography.scss b/app/assets/stylesheets/gitlab_bootstrap/typography.scss
index 97e85492875..efe336cd146 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/typography.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/typography.scss
@@ -2,8 +2,11 @@
* Headers
*
*/
+
+h1, h2, h3, h4, h5, h6 { margin: 0; }
h3, h4, h5, h6 { line-height: 36px; }
h5 { font-size:14px; }
+
h3.page_title {
color:#456;
font-size:20px;
diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss
index 698dd44a6ec..099d5043777 100644
--- a/app/assets/stylesheets/main.scss
+++ b/app/assets/stylesheets/main.scss
@@ -1,3 +1,7 @@
+/** Override bootstrap variables **/
+$baseFontSize: 13px !default;
+$baseLineHeight: 18px !default;
+
@import "bootstrap";
@import "bootstrap-responsive";
@import 'font-awesome';
diff --git a/app/assets/stylesheets/sections/header.scss b/app/assets/stylesheets/sections/header.scss
index 8328a5ab9a7..1ad10f98b3d 100644
--- a/app/assets/stylesheets/sections/header.scss
+++ b/app/assets/stylesheets/sections/header.scss
@@ -3,18 +3,27 @@
*
*/
header {
- width:100%;
- padding:0;
- margin:0;
- top:1px;
- left:0;
- background: #F1F1F1; /* for non-css3 browsers */
- border-bottom: 1px solid #ccc;
- box-shadow: 0 -1px 0 white inset;
- -moz-box-shadow: 0 -1px 0 white inset;
- -webkit-box-shadow: 0 -1px 0 white inset;
+ &.navbar-gitlab {
+ .navbar-inner {
+ height:45px;
+ padding: 5px;
+ background: #F1F1F1;
+
+ .nav > li > a {
+ color: $style_color;
+ text-shadow: 0 1px 0 #fff;
+ }
+
+ /** NAV block with links and profile **/
+ .nav {
+ float: right;
+ margin-right: 0;
+ }
+ }
+ }
+
z-index:10;
- height:60px;
+ /*height:60px;*/
/**
*
@@ -22,21 +31,19 @@ header {
*
*/
.app_logo {
- width:200px;
+ width:170px;
float:left;
- position:relative;
- top:-5px;
a {
float:left;
+ padding: 0px;
h1 {
- padding-top: 5px;
width:90px;
background: url('logo_dark.png') no-repeat 0px -3px;
float:left;
margin-left:5px;
- font-size:36px;
- line-height:36px;
+ font-size:30px;
+ line-height:48px;
font-weight:normal;
color:$style_color;
text-shadow: 0 1px 1px #FFF;
@@ -47,7 +54,6 @@ header {
}
.separator {
- margin-left:20px;
float: left;
height: 60px;
width: 1px;
@@ -56,13 +62,6 @@ header {
margin-top: -10px;
}
}
- .container {
- .top_panel_content {
- margin:auto;
- position:relative;
- padding:15px 0;
- }
- }
/**
*
@@ -74,33 +73,23 @@ header {
float:left;
margin:0;
margin-right:30px;
- font-size:36px;
- line-height:36px;
+ font-size:30px;
+ line-height:48px;
font-weight:normal;
color:$style_color;
text-shadow: 0 1px 1px #FFF;
font-family: 'Korolev', sans-serif;
}
- .fbtn {
- float: right;
- margin-right:10px;
- .btn {
- margin-left:7px;
- background: #F1F1F1;
- border: 1px solid #CCC;
- }
- }
-
-
/**
*
* Search box
*
*/
.search {
- float: right;
margin-right: 45px;
+ margin-left:10px;
+ margin-top: 2px;
.search-input {
@extend .span2;
@@ -108,8 +97,13 @@ header {
background-repeat: no-repeat;
background-position: 10px;
padding-left:25px;
- @include border-radius(5px);
- border:1px solid #ccc;
+ font-size: 13px;
+ @include border-radius(2px);
+ border:1px solid #c6c6c6;
+ box-shadow:none;
+ &:focus {
+ @extend .span3;
+ }
}
}
@@ -121,7 +115,7 @@ header {
.account-box {
position: absolute;
right: 0;
- top: 13px;
+ top: 6px;
z-index: 10000;
width: 128px;
font-size: 11px;
@@ -129,13 +123,13 @@ header {
display: block;
cursor: pointer;
img {
- @include border-radius(4px);
+ @include border-radius(2px);
right: 5px;
position: absolute;
width: 28px;
height: 28px;
display: block;
- top: 2px;
+ top:1px;
&:after {
content: " ";
display: block;
@@ -186,7 +180,7 @@ header {
background: #333;
display: none;
z-index: 100000;
- border-radius: 5px;
+ @include border-radius(4px);
width: 100px;
position: absolute;
right: 10px;
@@ -200,6 +194,7 @@ header {
display: block;
text-shadow: none;
border-bottom: 1px solid #555;
+ font-size: 12px;
&:hover {
color:#eee;
background: #444;
diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss
index b1f20a3e06b..a17d2c96c64 100644
--- a/app/assets/stylesheets/sections/projects.scss
+++ b/app/assets/stylesheets/sections/projects.scss
@@ -85,9 +85,14 @@
}
.project_clone_holder {
+ .btn {
+ height: 27px;
+ }
input[type="text"] {
+ height: 17px;
border: 1px solid #BBB;
box-shadow: none;
+ padding: 4px 10px;
}
}
diff --git a/app/assets/stylesheets/themes/ui_basic.scss b/app/assets/stylesheets/themes/ui_basic.scss
index cf5eda1c893..09ff0747470 100644
--- a/app/assets/stylesheets/themes/ui_basic.scss
+++ b/app/assets/stylesheets/themes/ui_basic.scss
@@ -15,36 +15,4 @@
color: $blue_link;
}
}
-
- header {
- .fbtn {
- .btn {
- background-color: #F8F8F8;
- background-image: -webkit-gradient(linear,left top,left bottom,from(#F8F8F8),to(#ECECEC));
- background-image: -webkit-linear-gradient(top,#F8F8F8,#ECECEC);
- background-image: -moz-linear-gradient(top,#F8F8F8,#ECECEC);
- background-image: -ms-linear-gradient(top,#F8F8F8,#ECECEC);
- background-image: -o-linear-gradient(top,#F8F8F8,#ECECEC);
- background-image: linear-gradient(top,#F8F8F8,#ECECEC);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f8f8f8',EndColorStr='#ececec');
- border-color: #C6C6C6;
- margin-left:7px;
- @include border-radius(3px);
- box-shadow:none;
- color:#666;
- }
- }
- .search {
- .search-input {
- @include border-radius(3px);
- border-color: #C6C6C6;
- box-shadow:none;
- }
- }
- .pic {
- img {
- @include border-radius(3px);
- }
- }
- }
}
diff --git a/app/assets/stylesheets/themes/ui_mars.scss b/app/assets/stylesheets/themes/ui_mars.scss
index 77507569a49..3773e61cce6 100644
--- a/app/assets/stylesheets/themes/ui_mars.scss
+++ b/app/assets/stylesheets/themes/ui_mars.scss
@@ -14,42 +14,24 @@
*
*/
header {
- background: #474D57 url('bg-header.png') repeat-x bottom;
- box-shadow:none;
- border-bottom: 1px solid #444;
- .fbtn {
- .btn {
- i {
- position: relative;
- top: 1px;
- }
- margin-left:8px;
- background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595D63), to(#31363E));
- background-image: -webkit-linear-gradient(#595D63 6.6%, #31363E);
- background-image: -moz-linear-gradient(#595D63 6.6%, #31363E);
- background-image: -o-linear-gradient(#595D63 6.6%, #31363E);
- font-size: 12px;
- &:hover {
- background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595D63), to(#2C2F35));
- background-image: -webkit-linear-gradient(#595D63 6.6%, #2C2F35);
- background-image: -moz-linear-gradient(#595D63 6.6%, #202227);
- background-image: -o-linear-gradient(#595D63 6.6%, #202227);
- background-position:0 0;
- color:#fff;
- }
+ &.navbar-gitlab {
+ .navbar-inner {
+ background: #474D57 url('bg-header.png') repeat-x bottom;
+ border-bottom: 1px solid #444;
- border: 1px solid #31363E;
- color:#D6DADF;
- text-shadow: 0 -1px 0 #000000;
+ .nav > li > a {
+ color: #eee;
+ text-shadow: 0 1px 0 #444;
+ }
}
}
+
.search {
float: right;
margin-right: 45px;
.search-input {
border: 1px solid rgba(0, 0, 0, 0.7);
- box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 2px rgba(0, 0, 0, 0.4) inset;
background-color: #D2D5DA;
background-color: rgba(255, 255, 255, 0.5);
@@ -65,7 +47,7 @@
a {
h1 {
background: url('logo_white.png') no-repeat 0px -3px;
- color:#fff;
+ color:#eee;
text-shadow: 0 1px 1px #111;
}
}
@@ -75,7 +57,7 @@
}
.project_name {
- color:#fff;
+ color:#eee;
text-shadow: 0 1px 1px #111;
}
}
diff --git a/app/assets/stylesheets/themes/ui_modern.scss b/app/assets/stylesheets/themes/ui_modern.scss
index 8b942149519..73445ec60d3 100644
--- a/app/assets/stylesheets/themes/ui_modern.scss
+++ b/app/assets/stylesheets/themes/ui_modern.scss
@@ -4,91 +4,34 @@
*
* Next items should be placed there
* - link colors
- * - header styles
- * - main menu styles
+ * - header restyles
*
*/
.ui_modern {
+
/*
* Application Header
*
*/
header {
- height:40px;
- background-image: -moz-linear-gradient(top, #333, #222);
- background-image: -ms-linear-gradient(top, #333, #222);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333), to(#222));
- background-image: -webkit-linear-gradient(top, #333, #222);
- background-image: -o-linear-gradient(top, #333, #222);
- background-image: linear-gradient(top, #333, #222);
- background-repeat: repeat-x;
- background-repeat: repeat-x;
- filter: progid:dximagetransform.microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-
- .container .top_panel_content { padding: 5px 0; }
+ &.navbar-gitlab {
+ .navbar-inner {
+ background: #333;
+ border-bottom: 1px solid #111;
- /**
- *
- * Logo holder
- *
- */
- .app_logo {
- width:160px;
- a {
- h1 {
- background: none;
- color:#DDD;
- font-size:30px;
- text-shadow: 0 1px 1px #111;
- padding-left: 0;
+ .nav > li > a {
+ color: #eee;
+ text-shadow: 0 1px 0 #111;
}
}
- .separator {
- width: 1px;
- height: 40px;
- margin: 0 10px;
- overflow: hidden;
- background: #222;
- border-left: 1px solid #333;
- }
}
- .fbtn {
- .btn {
- i {
- position: relative;
- top: 2px;
- }
- background:none;
- margin-left:8px;
- font-size: 13px;
- line-height: 19px;
- color:#ccc;
- &:hover {
- color:#fff;
- }
- border: none;
- box-shadow:none;
- text-shadow: 0 -1px 0 #000000;
- border-left: 1px solid #333;
- }
- }
-
- /**
- *
- * Search box
- *
- */
.search {
float: right;
margin-right: 45px;
.search-input {
border: 1px solid rgba(0, 0, 0, 0.7);
- box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 2px rgba(0, 0, 0, 0.4) inset;
background-color: #D2D5DA;
background-color: rgba(255, 255, 255, 0.5);
@@ -96,36 +39,30 @@
background-color: white;
}
}
- .search-input::-webkit-input-placeholder {
- color: #666;
- }
}
+ .search-input::-webkit-input-placeholder {
+ color: #666;
+ }
+ .app_logo {
+ a {
+ h1 {
+ background: url('logo_white.png') no-repeat 0px -3px;
+ color:#eee;
+ text-shadow: 0 1px 1px #111;
+ }
+ }
+ .separator {
+ display:none;
+ }
- /**
- *
- * Project / Area name
- *
- */
+ }
.project_name {
- line-height:36px;
- font-size:30px;
- color:#DDD;
+ color:#eee;
text-shadow: 0 1px 1px #111;
}
-
- /**
- *
- * Account box
- *
- */
- .account-box {
- top:6px;
- img {
- top:1px;
- right: 5px;
- width: 26px;
- height: 26px;
- }
- }
}
+ /*
+ * End of Application Header
+ *
+ */
}
diff --git a/app/views/commits/_diffs.html.haml b/app/views/commits/_diffs.html.haml
index 6ffc6d8b057..53c2319fb38 100644
--- a/app/views/commits/_diffs.html.haml
+++ b/app/views/commits/_diffs.html.haml
@@ -22,7 +22,7 @@
.diff_file_header
- if diff.deleted_file
%span= diff.old_path
-
+
- if @commit.prev_commit
= link_to project_tree_path(@project, tree_join(@commit.prev_commit_id, diff.new_path)), {:class => 'btn right view-commit'} do
View file @
@@ -31,11 +31,11 @@
%span= diff.new_path
- if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode
%span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
-
- = link_to project_tree_path(@project, tree_join(@commit.id, diff.new_path)), {:class => 'btn right view-commit'} do
+
+ = link_to project_tree_path(@project, tree_join(@commit.id, diff.new_path)), {:class => 'btn very_small right view-commit'} do
View file @
%span.commit-short-id= @commit.short_id(6)
-
+
%br/
.diff_file_content
-# Skipp all non non-supported blobs
@@ -51,10 +51,10 @@
%div.image-info= "#{number_to_human_size file.size}"
- else
.diff_file_content_image.img_compared
- .image.diff_removed
+ .image.diff_removed
%img{src: "data:#{file.mime_type};base64,#{Base64.encode64(old_file.data)}"}
%div.image-info= "#{number_to_human_size file.size}"
- .image.diff_added
+ .image.diff_added
%img{src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
%div.image-info= "#{number_to_human_size file.size}"
- else
diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml
index 4eed58e2638..dd7cba22884 100644
--- a/app/views/layouts/_head_panel.html.haml
+++ b/app/views/layouts/_head_panel.html.haml
@@ -1,29 +1,35 @@
-/ Page Header
-%header.top_panel_holder
- .container
- .top_panel_content
+%header.navbar.navbar-static-top.navbar-gitlab
+ .navbar-inner
+ .container
%div.app_logo
= link_to root_path, class: "home", title: "Home" do
- %h1
- GITLAB
+ %h1 GITLAB
%span.separator
%h1.project_name= title
- = render "layouts/search"
- .fbtn
+ %ul.nav
- if current_user.is_admin?
- = link_to admin_root_path, class: "btn small", title: "Admin area" do
- %i.icon-cog
- Admin
+ %li
+ = link_to admin_root_path, title: "Admin area" do
+ %i.icon-cog
+ Admin
- if current_user.can_create_project?
- = link_to new_project_path, class: "btn small", title: "Create New Project" do
- %i.icon-plus
- Project
- .account-box
- = link_to profile_path, class: "pic" do
- = image_tag gravatar_icon(current_user.email)
- .account-links
- = link_to profile_path, class: "username" do
- My profile
- = link_to 'Logout', destroy_user_session_path, class: "logout", method: :delete
+ %li
+ = link_to new_project_path, title: "Create New Project" do
+ %i.icon-plus
+ Project
+ %li
+ = render "layouts/search"
+ %li
+ .account-box
+ = link_to profile_path, class: "pic" do
+ = image_tag gravatar_icon(current_user.email)
+ .account-links
+ = link_to profile_path, class: "username" do
+ %i.icon-user.icon-white
+ My profile
+ = link_to destroy_user_session_path, class: "logout", method: :delete do
+ %i.icon-signout.icon-white
+ Logout
+
= render "layouts/init_auto_complete"
diff --git a/app/views/layouts/_search.html.haml b/app/views/layouts/_search.html.haml
index 80ecc5304d6..7ea9079849a 100644
--- a/app/views/layouts/_search.html.haml
+++ b/app/views/layouts/_search.html.haml
@@ -1,5 +1,5 @@
.search
- = form_tag search_path, method: :get do |f|
+ = form_tag search_path, method: :get, class: 'navbar-form pull-left' do |f|
= text_field_tag "search", nil, placeholder: "Search", class: "search-input"
:javascript
diff --git a/app/views/projects/_clone_panel.html.haml b/app/views/projects/_clone_panel.html.haml
index aa1a9cdc55f..461f4feaf61 100644
--- a/app/views/projects/_clone_panel.html.haml
+++ b/app/views/projects/_clone_panel.html.haml
@@ -6,12 +6,12 @@
.right
- unless @project.empty_repo?
- if can? current_user, :download_code, @project
- = link_to archive_project_repository_path(@project), class: "btn small grouped" do
+ = link_to archive_project_repository_path(@project), class: "btn grouped" do
%i.icon-download-alt
Download
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
- = link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn small grouped" do
+ = link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn grouped" do
Merge Request
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
- = link_to new_project_issue_path(@project), title: "New Issue", class: "btn small grouped" do
+ = link_to new_project_issue_path(@project), title: "New Issue", class: "btn grouped" do
Issue
diff --git a/app/views/shared/_clone_panel.html.haml b/app/views/shared/_clone_panel.html.haml
index 947dc478b33..924eb3fcae4 100644
--- a/app/views/shared/_clone_panel.html.haml
+++ b/app/views/shared/_clone_panel.html.haml
@@ -1,4 +1,4 @@
.input-prepend.project_clone_holder
- %button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH
- %button{class: "btn small", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.web_protocol.upcase
+ %button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH
+ %button{class: "btn", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.web_protocol.upcase
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 4f7afd9dd25..5bcab924496 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -37,7 +37,6 @@ describe Project do
it { should have_many(:hooks).dependent(:destroy) }
it { should have_many(:wikis).dependent(:destroy) }
it { should have_many(:protected_branches).dependent(:destroy) }
- it { should have_many(:services).dependent(:destroy) }
end
describe "Mass assignment" do