summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-03 16:24:45 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-03 16:24:45 +0000
commite6113010fc9541ffe8e9981b87bc291805769e55 (patch)
tree407bf1be9d67ab933068beb60d636dda94ec5c3a
parent0aded8fe871214c92dd43978e8573fbd395f4214 (diff)
parentb3d60074e54e27fa4f73c4017afb928a22c093cd (diff)
downloadgitlab-ci-e6113010fc9541ffe8e9981b87bc291805769e55.tar.gz
Merge branch 'plain-bootstrap' into 'master'
Remove unnecessary bootstrap customizations Lets make css simple for CI. It make it easy to support and possible apply bootstrap themes. cc @vsizov See merge request !116
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock3
-rw-r--r--app/assets/stylesheets/application.scss4
-rw-r--r--app/assets/stylesheets/generic/buttons.scss194
-rw-r--r--app/assets/stylesheets/generic/callout.scss45
-rw-r--r--app/assets/stylesheets/generic/common.scss77
-rw-r--r--app/assets/stylesheets/gl_bootstrap.scss227
-rw-r--r--app/assets/stylesheets/main/variables.scss7
-rw-r--r--app/views/admin/projects/_project.html.haml2
-rw-r--r--app/views/admin/runner_projects/index.html.haml4
-rw-r--r--app/views/admin/runners/_runner.html.haml8
-rw-r--r--app/views/admin/runners/show.html.haml2
-rw-r--r--app/views/layouts/project.html.haml2
-rw-r--r--app/views/projects/_gl_projects.html.haml4
-rw-r--r--app/views/projects/gitlab.html.haml4
-rw-r--r--app/views/runners/_runner.html.haml6
-rw-r--r--app/views/web_hooks/index.html.haml4
17 files changed, 153 insertions, 441 deletions
diff --git a/Gemfile b/Gemfile
index f73b353..e60ff6e 100644
--- a/Gemfile
+++ b/Gemfile
@@ -104,6 +104,7 @@ end
group :development, :test do
+ gem 'spring', '~> 1.3.6'
gem 'minitest'
gem 'pry'
gem 'rspec-rails'
diff --git a/Gemfile.lock b/Gemfile.lock
index dd96a89..f6908a0 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -340,7 +340,7 @@ GEM
temple (~> 0.6.6)
tilt (>= 1.3.3, < 2.1)
slop (3.4.7)
- spring (1.3.3)
+ spring (1.3.6)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (2.11.0)
@@ -452,6 +452,7 @@ DEPENDENCIES
sinatra
slack-notifier (~> 1.0.0)
slim
+ spring (~> 1.3.6)
spring-commands-rspec
stamp
state_machine
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index 9dba478..ce080c7 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -17,9 +17,9 @@
@import "main/layout.scss";
/**
- * Customized Twitter bootstrap
+ * Twitter bootstrap
*/
-@import 'gl_bootstrap';
+@import 'bootstrap';
/**
* Font icons
diff --git a/app/assets/stylesheets/generic/buttons.scss b/app/assets/stylesheets/generic/buttons.scss
index 99119c6..5605c09 100644
--- a/app/assets/stylesheets/generic/buttons.scss
+++ b/app/assets/stylesheets/generic/buttons.scss
@@ -1,199 +1,7 @@
.btn {
- display: inline-block;
- margin-bottom: 0;
- font-weight: normal;
- text-align: center;
- vertical-align: middle;
- cursor: pointer;
- background-image: none;
- border: 1px solid transparent;
- border-color: #CCC;
- white-space: nowrap;
- padding: 6px 12px;
- font-size: 13px;
- line-height: 18px;
- border-radius: 4px;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- -o-user-select: none;
- user-select: none;
- color: #444444;
- background-color: #fff;
- text-shadow: none;
-
- &.hover,
- &:hover {
- color: #444444;
- text-decoration: none;
- background-color: #ebebeb;
- border-color: #adadad;
- }
-
- &.focus,
- &:focus {
- color: #444444;
- text-decoration: none;
- outline: thin dotted #333;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
- }
-
- &.active,
- &:active {
- outline: 0;
- background-image: none;
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
- }
-
- &.disabled,
- &[disabled] {
- cursor: not-allowed;
- pointer-events: none;
- opacity: 0.65;
- filter: alpha(opacity=65);
- -webkit-box-shadow: none;
- box-shadow: none;
- }
-
- &.btn-primary {
- color: #ffffff;
- background-color: $bg_primary;
- border-color: $border_primary;
-
- &.hover,
- &:hover,
- &.disabled,
- &[disabled] {
- color: #ffffff;
- }
- }
-
- &.btn-success {
- color: #ffffff;
- background-color: $bg_success;
- border-color: $border_success;
-
-
- &.hover,
- &:hover,
- &.disabled,
- &[disabled] {
- color: #ffffff;
- }
- }
-
- &.btn-danger {
- color: #ffffff;
- background-color: $bg_danger;
- border-color: $border_danger;
-
-
- &.hover,
- &:hover,
- &.disabled,
- &[disabled] {
- color: #ffffff;
- }
- }
-
- &.btn-warning {
- color: #ffffff;
- background-color: $bg_warning;
- border-color: $border_warning;
-
-
- &.hover,
- &:hover,
- &.disabled,
- &[disabled] {
- color: #ffffff;
- }
- }
-
- &.btn-new {
- @extend .btn-success;
- }
-
- &.btn-create {
- @extend .wide;
- @extend .btn-success;
- }
+ @extend .btn-default;
&.btn-save {
- @extend .wide;
@extend .btn-primary;
}
-
- &.btn-remove {
- @extend .btn-danger;
- }
-
- &.btn-cancel {
- float: right;
- }
-
- &.wide {
- padding-left: 20px;
- padding-right: 20px;
- }
-
- &.btn-small {
- padding: 2px 10px;
- font-size: 12px;
- }
-
- &.btn-tiny {
- font-size: 11px;
- padding: 2px 6px;
- line-height: 16px;
- margin: 2px;
- }
-
- &.btn-close {
- color: $bg_danger;
- border-color: $border_danger;
- &:hover {
- color: #B94A48;
- }
- }
-
- &.btn-reopen {
- color: $bg_success;
- border-color: $border_success;
- &:hover {
- color: #468847;
- }
- }
-
- &.btn-grouped {
- margin-right: 7px;
- float: left;
- &:last-child {
- margin-right: 0px;
- }
- }
-}
-
-.btn-block {
- width: 100%;
- margin: 0;
- margin-bottom: 15px;
- &.btn {
- padding: 6px 0;
- }
-}
-
-.btn-group {
- &.btn-grouped {
- margin-right: 7px;
- float: left;
- &:last-child {
- margin-right: 0px;
- }
- }
}
-
-.btn-group-small > .btn { @extend .btn.btn-small; }
-.btn-group-tiny > .btn { @extend .btn.btn-tiny; }
diff --git a/app/assets/stylesheets/generic/callout.scss b/app/assets/stylesheets/generic/callout.scss
new file mode 100644
index 0000000..f1699d2
--- /dev/null
+++ b/app/assets/stylesheets/generic/callout.scss
@@ -0,0 +1,45 @@
+/*
+ * Callouts from Bootstrap3 docs
+ *
+ * Not quite alerts, but custom and helpful notes for folks reading the docs.
+ * Requires a base and modifier class.
+ */
+
+/* Common styles for all types */
+.bs-callout {
+ margin: 20px 0;
+ padding: 20px;
+ border-left: 3px solid #eee;
+ color: #666;
+ background: #f9f9f9;
+}
+.bs-callout h4 {
+ margin-top: 0;
+ margin-bottom: 5px;
+}
+.bs-callout p:last-child {
+ margin-bottom: 0;
+}
+
+/* Variations */
+.bs-callout-danger {
+ background-color: #fdf7f7;
+ border-color: #eed3d7;
+ color: #b94a48;
+}
+.bs-callout-warning {
+ background-color: #faf8f0;
+ border-color: #faebcc;
+ color: #8a6d3b;
+}
+.bs-callout-info {
+ background-color: #f4f8fa;
+ border-color: #bce8f1;
+ color: #34789a;
+}
+.bs-callout-success {
+ background-color: #dff0d8;
+ border-color: #5cA64d;
+ color: #3c763d;
+}
+
diff --git a/app/assets/stylesheets/generic/common.scss b/app/assets/stylesheets/generic/common.scss
index 0c3d058..9788432 100644
--- a/app/assets/stylesheets/generic/common.scss
+++ b/app/assets/stylesheets/generic/common.scss
@@ -106,3 +106,80 @@ ul.bordered-list {
border-bottom: 1px solid #ccc;
padding: 0 0 3px 3px;
}
+
+// Nav tabs
+.nav.nav-tabs {
+ li {
+ > a {
+ padding: 8px 20px;
+ margin-right: 7px;
+ line-height: 20px;
+ border-color: #EEE;
+ color: #888;
+ border-bottom: 1px solid #ddd;
+ .badge {
+ background-color: #eee;
+ color: #888;
+ text-shadow: 0 1px 1px #fff;
+ }
+ i[class^="icon-"] {
+ line-height: 14px;
+ }
+ }
+ &.active {
+ > a {
+ border-color: #CCC;
+ border-bottom: 1px solid #fff;
+ color: #333;
+ font-weight: bold;
+ }
+ }
+ }
+
+ &.nav-small-tabs > li > a {
+ padding: 6px 9px;
+ }
+}
+
+.nav-tabs > li > a,
+.nav-pills > li > a {
+ color: #666;
+}
+
+.nav-small > li > a {
+ padding: 3px 5px;
+ font-size: 12px;
+}
+
+
+
+// Breadcrumb
+ul.breadcrumb {
+ background: white;
+ border: none;
+ li {
+ display: inline;
+ text-shadow: 0 1px 0 white
+ }
+
+ a {
+ font-size: 16px;
+ }
+}
+
+/**
+ * fix to keep tooltips position in top navigation bar
+ *
+ */
+.navbar .nav > li {
+ position: relative;
+ white-space: nowrap;
+}
+
+// alerts
+.alert-disabled {
+ background-color: #e6e6e6;
+ border-color: #ebccd1;
+ color: #b0b0b0;
+}
+
diff --git a/app/assets/stylesheets/gl_bootstrap.scss b/app/assets/stylesheets/gl_bootstrap.scss
deleted file mode 100644
index b3f4449..0000000
--- a/app/assets/stylesheets/gl_bootstrap.scss
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Twitter bootstrap with GitLab customizations/additions
- *
- * Some unused bootstrap compontents like panels are not included.
- * Other components like tabs are modified to GitLab style.
- *
- */
-
-$font-size-base: 13px !default;
-$nav-pills-active-link-hover-bg: $bg_style_color;
-$pagination-active-bg: $bg_style_color;
-
-// Core variables and mixins
-@import "bootstrap/variables";
-@import "bootstrap/mixins";
-
-// Reset
-@import "bootstrap/normalize";
-@import "bootstrap/print";
-
-// Core CSS
-@import "bootstrap/scaffolding";
-@import "bootstrap/type";
-@import "bootstrap/code";
-@import "bootstrap/grid";
-@import "bootstrap/tables";
-@import "bootstrap/forms";
-
-// Components
-@import "bootstrap/component-animations";
-@import "bootstrap/dropdowns";
-@import "bootstrap/button-groups";
-@import "bootstrap/input-groups";
-@import "bootstrap/navs";
-@import "bootstrap/navbar";
-@import "bootstrap/breadcrumbs";
-@import "bootstrap/pagination";
-@import "bootstrap/pager";
-@import "bootstrap/labels";
-@import "bootstrap/badges";
-@import "bootstrap/jumbotron";
-@import "bootstrap/thumbnails";
-@import "bootstrap/alerts";
-@import "bootstrap/progress-bars";
-@import "bootstrap/list-group";
-@import "bootstrap/wells";
-@import "bootstrap/close";
-
-// Components w/ JavaScript
-@import "bootstrap/modals";
-@import "bootstrap/tooltip";
-@import "bootstrap/popovers";
-@import "bootstrap/carousel";
-
-// Utility classes
-.clearfix {
- @include clearfix();
-}
-.center-block {
- @include center-block();
-}
-.pull-right {
- float: right !important;
-}
-.pull-left {
- float: left !important;
-}
-.hide {
- display: none;
-}
-.show {
- display: block !important;
-}
-.invisible {
- visibility: hidden;
-}
-.text-hide {
- @include text-hide();
-}
-.hidden {
- display: none !important;
- visibility: hidden !important;
-}
-.affix {
- position: fixed;
-}
-
-@import "bootstrap/responsive-utilities";
-
-// Labels
-.label {
- padding: 2px 4px;
- font-size: 12px;
- font-style: normal;
- font-weight: normal;
- display: inline-block;
-
- &.label-gray {
- background-color: #eee;
- color: #999;
- text-shadow: none;
- }
-
- &.label-inverse {
- background-color: #333333;
- }
-}
-
-// Nav tabs
-.nav.nav-tabs {
- li {
- > a {
- padding: 8px 20px;
- margin-right: 7px;
- line-height: 20px;
- border-color: #EEE;
- color: #888;
- border-bottom: 1px solid #ddd;
- .badge {
- background-color: #eee;
- color: #888;
- text-shadow: 0 1px 1px #fff;
- }
- i[class^="icon-"] {
- line-height: 14px;
- }
- }
- &.active {
- > a {
- border-color: #CCC;
- border-bottom: 1px solid #fff;
- color: #333;
- font-weight: bold;
- }
- }
- }
-
- &.nav-small-tabs > li > a {
- padding: 6px 9px;
- }
-}
-
-.nav-tabs > li > a,
-.nav-pills > li > a {
- color: #666;
-}
-
-.nav-small > li > a {
- padding: 3px 5px;
- font-size: 12px;
-}
-
-
-/*
- * Callouts from Bootstrap3 docs
- *
- * Not quite alerts, but custom and helpful notes for folks reading the docs.
- * Requires a base and modifier class.
- */
-
-/* Common styles for all types */
-.bs-callout {
- margin: 20px 0;
- padding: 20px;
- border-left: 3px solid #eee;
- color: #666;
- background: #f9f9f9;
-}
-.bs-callout h4 {
- margin-top: 0;
- margin-bottom: 5px;
-}
-.bs-callout p:last-child {
- margin-bottom: 0;
-}
-
-/* Variations */
-.bs-callout-danger {
- background-color: #fdf7f7;
- border-color: #eed3d7;
- color: #b94a48;
-}
-.bs-callout-warning {
- background-color: #faf8f0;
- border-color: #faebcc;
- color: #8a6d3b;
-}
-.bs-callout-info {
- background-color: #f4f8fa;
- border-color: #bce8f1;
- color: #34789a;
-}
-.bs-callout-success {
- background-color: #dff0d8;
- border-color: #5cA64d;
- color: #3c763d;
-}
-
-// Breadcrumb
-ul.breadcrumb {
- background: white;
- border: none;
- li {
- display: inline;
- text-shadow: 0 1px 0 white
- }
-
- a {
- font-size: 16px;
- }
-}
-
-/**
- * fix to keep tooltips position in top navigation bar
- *
- */
-.navbar .nav > li {
- position: relative;
- white-space: nowrap;
-}
-
-// alerts
-.alert-disabled {
- background-color: #e6e6e6;
- border-color: #ebccd1;
- color: #b0b0b0;
-}
diff --git a/app/assets/stylesheets/main/variables.scss b/app/assets/stylesheets/main/variables.scss
index d3440b9..bd79ca3 100644
--- a/app/assets/stylesheets/main/variables.scss
+++ b/app/assets/stylesheets/main/variables.scss
@@ -30,3 +30,10 @@ $bg_primary: #246;
*/
$bg_warning: #EB9532;
$border_warning: #EB9532;
+
+/**
+ * Twitter bootstrap variables
+ */
+$font-size-base: 13px !default;
+$nav-pills-active-link-hover-bg: $bg_style_color;
+$pagination-active-bg: $bg_style_color;
diff --git a/app/views/admin/projects/_project.html.haml b/app/views/admin/projects/_project.html.haml
index 8da5e0a..b70ac99 100644
--- a/app/views/admin/projects/_project.html.haml
+++ b/app/views/admin/projects/_project.html.haml
@@ -23,6 +23,6 @@
%td
= project.commits.count
%td
- = link_to [:admin, project], method: :delete, class: 'btn btn-danger btn-small' do
+ = link_to [:admin, project], method: :delete, class: 'btn btn-danger btn-sm' do
%i.icon-remove
Remove
diff --git a/app/views/admin/runner_projects/index.html.haml b/app/views/admin/runner_projects/index.html.haml
index 8f7b771..39b44aa 100644
--- a/app/views/admin/runner_projects/index.html.haml
+++ b/app/views/admin/runner_projects/index.html.haml
@@ -36,7 +36,7 @@
%td
#{time_ago_in_words(runner_project.created_at)} ago
%td
- = link_to 'Disable', [@project, runner_project], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-small right'
+ = link_to 'Disable', [@project, runner_project], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm right'
.col-md-4
%h5 Available
%table.table
@@ -54,4 +54,4 @@
%td
= form_for [@project, @runner_project] do |f|
= f.hidden_field :runner_id, value: runner.id
- = f.submit 'Add', class: 'btn btn-small'
+ = f.submit 'Add', class: 'btn btn-sm'
diff --git a/app/views/admin/runners/_runner.html.haml b/app/views/admin/runners/_runner.html.haml
index 98342a8..6745e58 100644
--- a/app/views/admin/runners/_runner.html.haml
+++ b/app/views/admin/runners/_runner.html.haml
@@ -38,11 +38,11 @@
Never
%td
.pull-right
- = link_to 'Edit', admin_runner_path(runner), class: 'btn btn-small'
+ = link_to 'Edit', admin_runner_path(runner), class: 'btn btn-sm'
&nbsp;
- if runner.active?
- = link_to 'Pause', [:pause, :admin, runner], data: { confirm: "Are you sure?" }, method: :get, class: 'btn btn-danger btn-small'
+ = link_to 'Pause', [:pause, :admin, runner], data: { confirm: "Are you sure?" }, method: :get, class: 'btn btn-danger btn-sm'
- else
- = link_to 'Resume', [:resume, :admin, runner], method: :get, class: 'btn btn-success btn-small'
- = link_to 'Remove', [:admin, runner], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-small'
+ = link_to 'Resume', [:resume, :admin, runner], method: :get, class: 'btn btn-success btn-sm'
+ = link_to 'Remove', [:admin, runner], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
diff --git a/app/views/admin/runners/show.html.haml b/app/views/admin/runners/show.html.haml
index 6d80f6b..737347f 100644
--- a/app/views/admin/runners/show.html.haml
+++ b/app/views/admin/runners/show.html.haml
@@ -68,7 +68,7 @@
%th
.pull-right
= link_to 'Assign to all', assign_all_admin_runner_path(@runner),
- class: 'btn btn-small assign-all-runner',
+ class: 'btn btn-sm assign-all-runner',
title: 'Assign runner to all projects',
method: :put
diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml
index 6ee2788..e49a1e7 100644
--- a/app/views/layouts/project.html.haml
+++ b/app/views/layouts/project.html.haml
@@ -13,7 +13,7 @@
Public
.pull-right
- = link_to 'View on GitLab', @project.gitlab_url, no_turbolink.merge( class: 'btn btn-small' )
+ = link_to 'View on GitLab', @project.gitlab_url, no_turbolink.merge( class: 'btn btn-sm' )
%hr
.container
- if current_user && current_user.can_manage_project?(@project.gitlab_id)
diff --git a/app/views/projects/_gl_projects.html.haml b/app/views/projects/_gl_projects.html.haml
index 479ffb4..ef58fec 100644
--- a/app/views/projects/_gl_projects.html.haml
+++ b/app/views/projects/_gl_projects.html.haml
@@ -9,7 +9,7 @@
- if Project.already_added?(project)
%strong.cgreen
Added
- - else
+ - else
= form_tag projects_path do
= hidden_field_tag :project, project.to_h.to_json
- = submit_tag 'Add project to CI', class: 'btn btn-default btn-small' \ No newline at end of file
+ = submit_tag 'Add project to CI', class: 'btn btn-default btn-sm'
diff --git a/app/views/projects/gitlab.html.haml b/app/views/projects/gitlab.html.haml
index aef0237..eaeee85 100644
--- a/app/views/projects/gitlab.html.haml
+++ b/app/views/projects/gitlab.html.haml
@@ -5,7 +5,7 @@
- if params[:search].present?
by keyword: "#{params[:search]}",
#{time_ago_in_words(current_user.sync_at)} ago.
- = link_to gitlab_projects_path(reset_cache: true, search: params[:search]), class: 'sync-now btn btn-small btn-default reset-cache' do
+ = link_to gitlab_projects_path(reset_cache: true, search: params[:search]), class: 'sync-now btn btn-sm btn-default reset-cache' do
%i.icon-refresh
Sync now
%br
@@ -32,4 +32,4 @@
- else
= render @projects
- = render "gl_projects" \ No newline at end of file
+ = render "gl_projects"
diff --git a/app/views/runners/_runner.html.haml b/app/views/runners/_runner.html.haml
index 144edb3..1d88d69 100644
--- a/app/views/runners/_runner.html.haml
+++ b/app/views/runners/_runner.html.haml
@@ -11,14 +11,14 @@
.pull-right
- if @runners.include?(runner)
- if runner.belongs_to_one_project?
- = link_to 'Remove runner', [@project, runner], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-small'
+ = link_to 'Remove runner', [@project, runner], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
- else
- runner_project = @project.runner_projects.find_by(runner_id: runner)
- = link_to 'Disable for this project', [@project, runner_project], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-small'
+ = link_to 'Disable for this project', [@project, runner_project], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-sm'
- elsif runner.specific?
= form_for [@project, @project.runner_projects.new] do |f|
= f.hidden_field :runner_id, value: runner.id
- = f.submit 'Enable for this project', class: 'btn btn-small'
+ = f.submit 'Enable for this project', class: 'btn btn-sm'
.pull-right
%small.light
\##{runner.id}
diff --git a/app/views/web_hooks/index.html.haml b/app/views/web_hooks/index.html.haml
index de68cee..731afbd 100644
--- a/app/views/web_hooks/index.html.haml
+++ b/app/views/web_hooks/index.html.haml
@@ -29,8 +29,8 @@
%td
.pull-right
- if @project.commits.any?
- = link_to 'Test Hook', test_project_web_hook_path(@project, hook), class: "btn btn-small btn-grouped"
- = link_to 'Remove', project_web_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-small btn-grouped"
+ = link_to 'Test Hook', test_project_web_hook_path(@project, hook), class: "btn btn-sm btn-grouped"
+ = link_to 'Remove', project_web_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
%h4 Web Hook data example