From 9d2df795d33bf58ef52963e2cc73e0cf47cad68b Mon Sep 17 00:00:00 2001 From: Henriette Dinger Date: Fri, 5 Jan 2018 10:19:11 +0100 Subject: [PATCH] Introduce 'inverted' class for buttons --- app/assets/stylesheets/content/_buttons.sass | 6 ++++++ app/views/homescreen/blocks/_projects.html.erb | 2 +- app/views/my/blocks/_issuesassignedtome.html.erb | 2 +- app/views/my/blocks/_issuesreportedbyme.html.erb | 2 +- app/views/my/blocks/_issueswatched.html.erb | 2 +- app/views/my/blocks/_workpackagesresponsiblefor.html.erb | 2 +- app/views/projects/show.html.erb | 4 ++-- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/content/_buttons.sass b/app/assets/stylesheets/content/_buttons.sass index 256fcb3370..71cc196e7d 100644 --- a/app/assets/stylesheets/content/_buttons.sass +++ b/app/assets/stylesheets/content/_buttons.sass @@ -66,6 +66,12 @@ a.button &:hover, &:focus @include varprop(border-color, button--highlight-background-hover-color) + &.-highlight-inverted + @include button-style($body-background, darken($body-background, 5), $content-link-color, $button-style) + @include button-style($body-background, darken($body-background, 5), var(--content-link-color), $button-style) + @include varprop(border-color, content-link-color) + + &.-alt-highlight @include button-style($button--alt-highlight-background-color, $button--alt-highlight-background-hover-color, $button--alt-highlight-font-color, $button-style) @include button-style(var(--button--alt-highlight-background-color), var(--button--alt-highlight-background-hover-color), $button--alt-highlight-font-color, $button-style) diff --git a/app/views/homescreen/blocks/_projects.html.erb b/app/views/homescreen/blocks/_projects.html.erb index 0bec7607a6..c812a3975b 100644 --- a/app/views/homescreen/blocks/_projects.html.erb +++ b/app/views/homescreen/blocks/_projects.html.erb @@ -26,6 +26,6 @@ <% end %> <% end %> <%= link_to l(:label_project_view_all), projects_path, - class: 'button -highlight', + class: 'button -highlight-inverted', title: l(:label_project_view_all) %> diff --git a/app/views/my/blocks/_issuesassignedtome.html.erb b/app/views/my/blocks/_issuesassignedtome.html.erb index 44a21e5626..4c950aaf1b 100644 --- a/app/views/my/blocks/_issuesassignedtome.html.erb +++ b/app/views/my/blocks/_issuesassignedtome.html.erb @@ -43,7 +43,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= link_to l(:label_work_package_view_all_assigned_to_me), work_packages_assigned_to_me_path, - class: 'button -highlight' %> + class: 'button -highlight-inverted' %>
<% end %> diff --git a/app/views/my/blocks/_issuesreportedbyme.html.erb b/app/views/my/blocks/_issuesreportedbyme.html.erb index fece8a0d3d..c75d801278 100644 --- a/app/views/my/blocks/_issuesreportedbyme.html.erb +++ b/app/views/my/blocks/_issuesreportedbyme.html.erb @@ -51,7 +51,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= link_to l(:label_work_package_view_all_reported_by_me), work_packages_reported_by_me_path, - class: 'button -highlight' %> + class: 'button -highlight-inverted' %>
<% end %> <% content_for :header_tags do %> diff --git a/app/views/my/blocks/_issueswatched.html.erb b/app/views/my/blocks/_issueswatched.html.erb index 8071118cec..8cfe04bd44 100644 --- a/app/views/my/blocks/_issueswatched.html.erb +++ b/app/views/my/blocks/_issueswatched.html.erb @@ -50,6 +50,6 @@ See doc/COPYRIGHT.rdoc for more details.
<%= link_to l(:label_work_package_view_all_watched), work_packages_watched_path, - class: 'button -highlight' %> + class: 'button -highlight-inverted' %>
<% end %> diff --git a/app/views/my/blocks/_workpackagesresponsiblefor.html.erb b/app/views/my/blocks/_workpackagesresponsiblefor.html.erb index 4d35c67ced..25c6c93e93 100644 --- a/app/views/my/blocks/_workpackagesresponsiblefor.html.erb +++ b/app/views/my/blocks/_workpackagesresponsiblefor.html.erb @@ -52,7 +52,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= link_to l(:label_work_package_view_all_responsible_for), work_packages_responsible_for_path, - class: 'button -highlight' %> + class: 'button -highlight-inverted' %>
<% end %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 3647da684d..03e00c98c1 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -67,7 +67,6 @@ See doc/COPYRIGHT.rdoc for more details. <% end %>
- <%= link_to l(:label_work_package_view_all), {controller: :work_packages, action: :index, project_id: @project}, class: 'button -highlight' %> <%= link_to new_project_work_packages_path(@project), { class: 'button -alt-highlight', aria: {label: t(:label_work_package_new)}, @@ -75,6 +74,7 @@ See doc/COPYRIGHT.rdoc for more details. <%= op_icon('button--icon icon-add') %> <%= l('activerecord.models.work_package') %> <% end %> + <%= link_to l(:label_work_package_view_all), {controller: :work_packages, action: :index, project_id: @project}, class: 'button -highlight-inverted' %>
<% end %> @@ -92,7 +92,6 @@ See doc/COPYRIGHT.rdoc for more details. <%= render partial: 'news/news', collection: @news %>
- <%= link_to l(:label_news_view_all), {controller: '/news', action: 'index', project_id: @project}, class: 'button -highlight' %> <%= link_to new_project_news_path(@project), { class: 'button -alt-highlight', aria: {label: t(:label_news_new)}, @@ -100,6 +99,7 @@ See doc/COPYRIGHT.rdoc for more details. <%= op_icon('button--icon icon-add') %> <%= l('activerecord.models.news') %> <% end %> + <%= link_to l(:label_news_view_all), {controller: '/news', action: 'index', project_id: @project}, class: 'button -highlight-inverted' %>
<% end %>