From 24db1d16b8ebeef84011a2af44b03ffdb73f39c8 Mon Sep 17 00:00:00 2001 From: Stephen Crosby Date: Sat, 3 Oct 2015 14:08:15 -0700 Subject: [PATCH] fixes #956 integrate font-awesome --- Gemfile | 26 ++++++++++++-------------- Gemfile.lock | 3 +++ app/assets/stylesheets/application.css.erb | 1 + app/assets/stylesheets/errbit.css.erb | 58 +++++++++++++++++++++++++++++----------------------------- app/assets/stylesheets/images/content-fade.png | Bin 134 -> 0 bytes app/assets/stylesheets/images/error-badge-bg.png | Bin 75 -> 0 bytes app/assets/stylesheets/images/header.png | Bin 109 -> 0 bytes app/assets/stylesheets/images/icons/add.png | Bin 908 -> 0 bytes app/assets/stylesheets/images/icons/briefcase.png | Bin 635 -> 0 bytes app/assets/stylesheets/images/icons/bullet-red-sm.png | Bin 338 -> 0 bytes app/assets/stylesheets/images/icons/cross.png | Bin 285 -> 0 bytes app/assets/stylesheets/images/icons/edit.png | Bin 1158 -> 0 bytes app/assets/stylesheets/images/icons/github.png | Bin 1605 -> 0 bytes app/assets/stylesheets/images/icons/ical.png | Bin 1632 -> 0 bytes app/assets/stylesheets/images/icons/required.png | Bin 198 -> 0 bytes app/assets/stylesheets/images/icons/right-arrow.png | Bin 847 -> 0 bytes app/assets/stylesheets/images/icons/trash.png | Bin 1626 -> 0 bytes app/assets/stylesheets/images/icons/unlink_github.png | Bin 1914 -> 0 bytes app/assets/stylesheets/images/icons/up.png | Bin 837 -> 0 bytes app/assets/stylesheets/images/icons/user.png | Bin 822 -> 0 bytes app/assets/stylesheets/images/notebook.png | Bin 91 -> 0 bytes app/assets/stylesheets/images/resolved-badge-bg.png | Bin 75 -> 0 bytes app/views/apps/index.html.haml | 6 +++++- app/views/deploys/index.html.haml | 5 ++++- app/views/problems/show.html.haml | 6 ++++-- app/views/shared/_flash_messages.html.haml | 2 +- app/views/shared/_link_github_account.html.haml | 2 +- app/views/shared/_navigation.html.haml | 15 ++++++++++++--- app/views/shared/_session.html.haml | 6 +++++- app/views/users/index.html.haml | 5 ++++- app/views/users/show.html.haml | 1 - config/locales/en.yml | 2 ++ 32 files changed, 83 insertions(+), 55 deletions(-) delete mode 100644 app/assets/stylesheets/images/content-fade.png delete mode 100644 app/assets/stylesheets/images/error-badge-bg.png delete mode 100644 app/assets/stylesheets/images/header.png delete mode 100644 app/assets/stylesheets/images/icons/add.png delete mode 100644 app/assets/stylesheets/images/icons/briefcase.png delete mode 100644 app/assets/stylesheets/images/icons/bullet-red-sm.png delete mode 100755 app/assets/stylesheets/images/icons/cross.png delete mode 100644 app/assets/stylesheets/images/icons/edit.png delete mode 100644 app/assets/stylesheets/images/icons/github.png delete mode 100644 app/assets/stylesheets/images/icons/ical.png delete mode 100644 app/assets/stylesheets/images/icons/required.png delete mode 100644 app/assets/stylesheets/images/icons/right-arrow.png delete mode 100644 app/assets/stylesheets/images/icons/trash.png delete mode 100644 app/assets/stylesheets/images/icons/unlink_github.png delete mode 100644 app/assets/stylesheets/images/icons/up.png delete mode 100644 app/assets/stylesheets/images/icons/user.png delete mode 100644 app/assets/stylesheets/images/notebook.png delete mode 100644 app/assets/stylesheets/images/resolved-badge-bg.png diff --git a/Gemfile b/Gemfile index 65d8587..682a349 100644 --- a/Gemfile +++ b/Gemfile @@ -8,29 +8,27 @@ gem 'actionmailer', RAILS_VERSION gem 'actionpack', RAILS_VERSION gem 'railties', RAILS_VERSION -gem 'mongoid', '5.0.0' -gem 'mongoid_rails_migrations' - +gem 'actionmailer_inline_css' +gem 'decent_exposure' gem 'devise' +gem 'dotenv-rails' +gem 'draper' +gem 'errbit_plugin' +gem 'errbit_github_plugin' +gem 'font-awesome-rails' gem 'haml' gem 'htmlentities' -gem 'rack-ssl', :require => 'rack/ssl' # force SSL - -gem 'useragent' -gem 'decent_exposure' -gem 'actionmailer_inline_css' gem 'kaminari', '>= 0.14.1' +gem 'mongoid', '5.0.0' +gem 'mongoid_rails_migrations' +gem 'rack-ssl', :require => 'rack/ssl' # force SSL gem 'rack-ssl-enforcer', :require => false gem 'rails_autolink' +gem 'useragent' + # Please don't update hoptoad_notifier to airbrake. # It's for internal use only, and we monkeypatch certain methods gem 'hoptoad_notifier', "~> 2.4" -gem 'draper' - -gem 'errbit_plugin' -gem 'errbit_github_plugin' - -gem 'dotenv-rails' # Notification services # --------------------------------------- diff --git a/Gemfile.lock b/Gemfile.lock index 126c2b9..6d132e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -136,6 +136,8 @@ GEM flowdock (0.6.0) httparty (~> 0.7) multi_json + font-awesome-rails (4.2.0.0) + railties (>= 3.2, < 5.0) globalid (0.3.6) activesupport (>= 4.1.0) haml (4.0.6) @@ -436,6 +438,7 @@ DEPENDENCIES errbit_plugin fabrication flowdock + font-awesome-rails haml hipchat hoi diff --git a/app/assets/stylesheets/application.css.erb b/app/assets/stylesheets/application.css.erb index 2ddf0e9..4656c61 100644 --- a/app/assets/stylesheets/application.css.erb +++ b/app/assets/stylesheets/application.css.erb @@ -3,5 +3,6 @@ *= require jquery.alerts *= require errbit *= require notification_service_icons + *= require font-awesome *= require_self */ diff --git a/app/assets/stylesheets/errbit.css.erb b/app/assets/stylesheets/errbit.css.erb index 9930be2..3db0f61 100644 --- a/app/assets/stylesheets/errbit.css.erb +++ b/app/assets/stylesheets/errbit.css.erb @@ -93,9 +93,10 @@ a.action { float: right; font-size: 0.9em;} padding: 0 14px; line-height: 30px; } -#header #session-links #sign-out { - background: transparent url(<%= asset_path "images/icons/bullet-red-sm.png" %>) 12px 50% no-repeat; - padding-left: 29px; +#header #session-links #sign-out i { + color: #cc0033; + font-size: 11px; + margin-right: 3px; } #header #session-links a:hover { text-decoration: none; @@ -133,10 +134,12 @@ a.action { float: right; font-size: 0.9em;} color: #333; } +#nav-bar li i { + margin-right: 5px; +} #nav-bar li a { color: #666; - display: block; - padding: 0 20px 0 40px; + padding: 0 20px; font-size: 14px; font-weight: bold; line-height: 37px; @@ -146,9 +149,6 @@ a.action { float: right; font-size: 0.9em;} background: transparent 10px 6px no-repeat; } #nav-bar li a:hover { color: #666;} -#nav-bar li.apps a { background-image: url(<%= asset_path "images/icons/briefcase.png" %>); } -#nav-bar li.errs a { background-image: url(<%= asset_path "images/icons/error.png" %>); } -#nav-bar li.users a { background-image: url(<%= asset_path "images/icons/user.png" %>); } #nav-bar li:not(.active):hover { box-shadow: 0 0 3px #69c; -moz-box-shadow: 0 0 3px #69c; @@ -215,8 +215,7 @@ a.action { float: right; font-size: 0.9em;} } #action-bar span a { color: #666; - display: block; - padding: 0 20px 0 40px; + padding: 0 20px; font-size: 14px; font-weight: bold; line-height: 39px; text-decoration: none; text-shadow: 1px 1px 0px #FFF; -webkit-text-shadow: 1px 1px 0px #FFF; background: transparent 10px 8px no-repeat; @@ -227,17 +226,11 @@ a.action { float: right; font-size: 0.9em;} -moz-box-shadow: 0 0 3px #69c; -webkit-box-shadow: 0 0 3px #69c; } -#action-bar a.add { - background-image: url(<%= asset_path "images/icons/add.png" %>); -} - -#action-bar .calendar_link { - background: url(<%= asset_path "images/icons/ical.png" %>) no-repeat scroll 12px 6px transparent; - padding-left: 47px; +#action-bar a i { + margin-right: 5px; } -#action-bar span.github a { background: url(<%= asset_path "images/icons/github.png" %>) no-repeat 6px 5px; } -#action-bar span.unlink_github a { background: url(<%= asset_path "images/icons/unlink_github.png" %>) no-repeat 6px 5px; } +#action-bar span.github a:before { font-family: FontAwesome; content: "\f09b"; margin-right: 8px; position: relative; top: 4px; font-size: 26px; } /* Content */ #content { @@ -306,7 +299,7 @@ form label { } form label.inline { display: inline; } form .checkbox label { display: inline; } -form .required label { padding-right: 20px; background: transparent url(<%= asset_path "images/icons/required.png" %>) right 50% no-repeat; } +form .required label:after { font-family: FontAwesome; content: "\f069"; color: #cc0033; margin-left: 5px; font-weight: normal; } form .field_with_errors label { color: #900; } form input[type=text], form input[type=password], form input[type=email] { width: 96%; padding: 0.8em; @@ -365,10 +358,13 @@ form div.buttons input, form div.buttons button { -webkit-text-shadow: 1px 1px 0px #FFF; border: none; } -form div.buttons button.sign_in { - padding-left: 40px; - background: transparent url(<%= asset_path "images/icons/right-arrow.png" %>) 3px 3px no-repeat; + +.sign_in:before { + font-family: FontAwesome; + content: "\f061"; + margin-right: 8px; } + form strong.option { display: block; margin: 0.7em 0; @@ -650,7 +646,7 @@ td.count, td.issue_link { padding: 0.1em 0.7em; margin-top: 3px; color: #fff; - background: #cc0033 url(<%= asset_path "images/error-badge-bg.png" %>) 0 bottom repeat-x; + background-color: #cc0033; border: 1px solid #900; border-radius: 18px; -moz-border-radius: 18px; @@ -661,7 +657,7 @@ td.count, td.issue_link { -webkit-opacity: 0.8 } .count a.resolved { - background: #05B81d url(<%= asset_path "images/resolved-badge-bg.png" %>) 0 bottom repeat-x; + background-color: #05B81d; border: 1px solid #080; } .count a:hover { @@ -729,13 +725,17 @@ table.deploys td.when { } /* Resolve Errs */ -#action-bar a.resolve { - background: transparent url(<%= asset_path "images/icons/thumbs-up.png" %>) 6px 5px no-repeat; +#action-bar .resolve:before { + font-family: FontAwesome; + content: "\f087"; + margin-right: 5px; } /* Go Up */ -#action-bar a.up { - background: transparent url(<%= asset_path "images/icons/up.png" %>) 6px 5px no-repeat; +#action-bar a.up:before { + font-family: FontAwesome; + content: "\f077"; + margin-right: 5px; } /* Notices Pagination */ diff --git a/app/assets/stylesheets/images/content-fade.png b/app/assets/stylesheets/images/content-fade.png deleted file mode 100644 index ff43911..0000000 Binary files a/app/assets/stylesheets/images/content-fade.png and /dev/null differ diff --git a/app/assets/stylesheets/images/error-badge-bg.png b/app/assets/stylesheets/images/error-badge-bg.png deleted file mode 100644 index 66c0fc7..0000000 Binary files a/app/assets/stylesheets/images/error-badge-bg.png and /dev/null differ diff --git a/app/assets/stylesheets/images/header.png b/app/assets/stylesheets/images/header.png deleted file mode 100644 index 35df3b5..0000000 Binary files a/app/assets/stylesheets/images/header.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/add.png b/app/assets/stylesheets/images/icons/add.png deleted file mode 100644 index 5d6203c..0000000 Binary files a/app/assets/stylesheets/images/icons/add.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/briefcase.png b/app/assets/stylesheets/images/icons/briefcase.png deleted file mode 100644 index d5a8ce9..0000000 Binary files a/app/assets/stylesheets/images/icons/briefcase.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/bullet-red-sm.png b/app/assets/stylesheets/images/icons/bullet-red-sm.png deleted file mode 100644 index 9ac50e6..0000000 Binary files a/app/assets/stylesheets/images/icons/bullet-red-sm.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/cross.png b/app/assets/stylesheets/images/icons/cross.png deleted file mode 100755 index 2cd71a1..0000000 Binary files a/app/assets/stylesheets/images/icons/cross.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/edit.png b/app/assets/stylesheets/images/icons/edit.png deleted file mode 100644 index 0a4e426..0000000 Binary files a/app/assets/stylesheets/images/icons/edit.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/github.png b/app/assets/stylesheets/images/icons/github.png deleted file mode 100644 index 4965bc0..0000000 Binary files a/app/assets/stylesheets/images/icons/github.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/ical.png b/app/assets/stylesheets/images/icons/ical.png deleted file mode 100644 index 694686c..0000000 Binary files a/app/assets/stylesheets/images/icons/ical.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/required.png b/app/assets/stylesheets/images/icons/required.png deleted file mode 100644 index dbfbff0..0000000 Binary files a/app/assets/stylesheets/images/icons/required.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/right-arrow.png b/app/assets/stylesheets/images/icons/right-arrow.png deleted file mode 100644 index e69588d..0000000 Binary files a/app/assets/stylesheets/images/icons/right-arrow.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/trash.png b/app/assets/stylesheets/images/icons/trash.png deleted file mode 100644 index 22555b2..0000000 Binary files a/app/assets/stylesheets/images/icons/trash.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/unlink_github.png b/app/assets/stylesheets/images/icons/unlink_github.png deleted file mode 100644 index aa8ea31..0000000 Binary files a/app/assets/stylesheets/images/icons/unlink_github.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/up.png b/app/assets/stylesheets/images/icons/up.png deleted file mode 100644 index 6680800..0000000 Binary files a/app/assets/stylesheets/images/icons/up.png and /dev/null differ diff --git a/app/assets/stylesheets/images/icons/user.png b/app/assets/stylesheets/images/icons/user.png deleted file mode 100644 index 5d9a79e..0000000 Binary files a/app/assets/stylesheets/images/icons/user.png and /dev/null differ diff --git a/app/assets/stylesheets/images/notebook.png b/app/assets/stylesheets/images/notebook.png deleted file mode 100644 index 2e82938..0000000 Binary files a/app/assets/stylesheets/images/notebook.png and /dev/null differ diff --git a/app/assets/stylesheets/images/resolved-badge-bg.png b/app/assets/stylesheets/images/resolved-badge-bg.png deleted file mode 100644 index 9b1dcbd..0000000 Binary files a/app/assets/stylesheets/images/resolved-badge-bg.png and /dev/null differ diff --git a/app/views/apps/index.html.haml b/app/views/apps/index.html.haml index bc0f59d..be3f802 100644 --- a/app/views/apps/index.html.haml +++ b/app/views/apps/index.html.haml @@ -1,6 +1,10 @@ - content_for :title, t('.title') - content_for :action_bar do - %span= link_to(t('.new_app'), new_app_path, :class => 'add') if current_user.admin? + - if current_user.admin? + %span + = link_to(new_app_path) do + %i.fa.fa-plus-circle + = t('.new_app') %table.apps %thead diff --git a/app/views/deploys/index.html.haml b/app/views/deploys/index.html.haml index d8ab313..fec5a4c 100644 --- a/app/views/deploys/index.html.haml +++ b/app/views/deploys/index.html.haml @@ -1,7 +1,10 @@ - content_for :title, 'Deploys' - content_for :action_bar do - if current_user.authentication_token - %span= link_to 'iCal', app_deploys_path(@app, :format => "ics", :auth_token => current_user.authentication_token), :class => "calendar_link" + %span + = link_to app_deploys_path(@app, :format => "ics", :auth_token => current_user.authentication_token) do + %i.fa.fa-calendar + iCal = render 'table', :deploys => @deploys = paginate @deploys diff --git a/app/views/problems/show.html.haml b/app/views/problems/show.html.haml index 1a4ee29..ad1818b 100644 --- a/app/views/problems/show.html.haml +++ b/app/views/problems/show.html.haml @@ -16,8 +16,10 @@ %span= link_to 'resolve', [:resolve, app, problem], :method => :put, :data => { :confirm => problem_confirm('resolve_one') }, :class => 'resolve' - if current_user.authentication_token - %span= link_to 'iCal', polymorphic_path([app, problem], :format => "ics", - :auth_token => current_user.authentication_token), :class => "calendar_link" + %span + = link_to polymorphic_path([app, problem], :format => "ics", :auth_token => current_user.authentication_token) do + %i.fa.fa-calendar + iCal %span>= link_to 'up', (request.env['HTTP_REFERER'] ? :back : app_problems_path(app)), :class => 'up' %br = render "issue_tracker_links" diff --git a/app/views/shared/_flash_messages.html.haml b/app/views/shared/_flash_messages.html.haml index 3d2b902..206cd79 100644 --- a/app/views/shared/_flash_messages.html.haml +++ b/app/views/shared/_flash_messages.html.haml @@ -1,4 +1,4 @@ - unless flash.keys.empty? %ul#flash-messages - flash.each do |type, message| - %li{:class => type}= message \ No newline at end of file + %li{:class => type}= message diff --git a/app/views/shared/_link_github_account.html.haml b/app/views/shared/_link_github_account.html.haml index feb9f17..1d40063 100644 --- a/app/views/shared/_link_github_account.html.haml +++ b/app/views/shared/_link_github_account.html.haml @@ -1,5 +1,5 @@ - if Errbit::Config.github_authentication && user == current_user - if user.github_account? - %span.unlink_github= link_to "Unlink GitHub account", unlink_github_user_path(user), :method => :delete, :data => { :confirm => "Are you sure?" } + %span.github= link_to "Unlink GitHub account", unlink_github_user_path(user), :method => :delete, :data => { :confirm => "Are you sure?" } - else %span.github= link_to "Link GitHub account", user_omniauth_authorize_path(:github) diff --git a/app/views/shared/_navigation.html.haml b/app/views/shared/_navigation.html.haml index f075254..df9b4bf 100644 --- a/app/views/shared/_navigation.html.haml +++ b/app/views/shared/_navigation.html.haml @@ -1,7 +1,16 @@ #nav-bar %ul - %li.apps{:class => active_if_here(:apps)}= link_to t('.apps'), apps_path - %li.errs{:class => active_if_here(:problems)}= link_to t('.errors'), problems_path + %li{:class => active_if_here(:apps)} + = link_to apps_path do + %i.fa.fa-briefcase + = t('.apps') + %li{:class => active_if_here(:problems)} + = link_to problems_path do + %i.fa.fa-warning + = t('.errors') - if user_signed_in? && current_user.admin? - %li.users{:class => active_if_here(:users)}= link_to t('.users'), users_path + %li{:class => active_if_here(:users)} + = link_to users_path do + %i.fa.fa-users + = t('.users') %div.clear diff --git a/app/views/shared/_session.html.haml b/app/views/shared/_session.html.haml index 3770ba0..778f07e 100644 --- a/app/views/shared/_session.html.haml +++ b/app/views/shared/_session.html.haml @@ -1,4 +1,8 @@ - if current_user %ul#session-links - %li= link_to t('.sign_out'), destroy_session_path(:user), :id => 'sign-out', :method => :delete + %li + = link_to destroy_session_path(:user), :id => 'sign-out', :method => :delete do + %i.fa.fa-circle + = t('.sign_out') + %li= link_to t('.edit_profile'), edit_user_path(current_user), :id => 'edit-profile' diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml index 119d54b..b078a14 100644 --- a/app/views/users/index.html.haml +++ b/app/views/users/index.html.haml @@ -1,6 +1,9 @@ - content_for :title, 'Users' - content_for :action_bar do - %span= link_to('Add a New User', new_user_path, :class => 'add') + %span + = link_to(new_user_path) do + %i.fa.fa-plus-circle + = t('.new') %table.users %thead diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 9a0cff7..3c4b77c 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -7,7 +7,6 @@ - content_for :action_bar do = render 'shared/link_github_account' - %span= link_to('Add a New User', new_user_path, :class => 'add') = link_to 'edit', edit_user_path(user), :class => 'button' = link_to 'destroy', user_path(user), :method => :delete, :data => { :confirm => t('users.confirm_delete') }, :class => 'delete button' diff --git a/config/locales/en.yml b/config/locales/en.yml index 803ec19..a430639 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -84,6 +84,8 @@ en: confirm_delete: "Permanently delete this comment?" users: confirm_delete: "Permanently delete this user?" + index: + new: Add a New User apps: confirm_delete: "Permanently delete this app?" confirm_destroy_all_problems: "Permanently delete all of this app's errors?" -- libgit2 0.21.2