Introduce 'inverted' class for buttons

pull/6098/head
Henriette Dinger 7 years ago
parent 5b5b79a462
commit 9d2df795d3
  1. 6
      app/assets/stylesheets/content/_buttons.sass
  2. 2
      app/views/homescreen/blocks/_projects.html.erb
  3. 2
      app/views/my/blocks/_issuesassignedtome.html.erb
  4. 2
      app/views/my/blocks/_issuesreportedbyme.html.erb
  5. 2
      app/views/my/blocks/_issueswatched.html.erb
  6. 2
      app/views/my/blocks/_workpackagesresponsiblefor.html.erb
  7. 4
      app/views/projects/show.html.erb

@ -66,6 +66,12 @@ a.button
&:hover, &:focus &:hover, &:focus
@include varprop(border-color, button--highlight-background-hover-color) @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 &.-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($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) @include button-style(var(--button--alt-highlight-background-color), var(--button--alt-highlight-background-hover-color), $button--alt-highlight-font-color, $button-style)

@ -26,6 +26,6 @@
<% end %> <% end %>
<% end %> <% end %>
<%= link_to l(:label_project_view_all), projects_path, <%= link_to l(:label_project_view_all), projects_path,
class: 'button -highlight', class: 'button -highlight-inverted',
title: l(:label_project_view_all) %> title: l(:label_project_view_all) %>
</div> </div>

@ -43,7 +43,7 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="generic-table--action-buttons"> <div class="generic-table--action-buttons">
<%= link_to l(:label_work_package_view_all_assigned_to_me), <%= link_to l(:label_work_package_view_all_assigned_to_me),
work_packages_assigned_to_me_path, work_packages_assigned_to_me_path,
class: 'button -highlight' %> class: 'button -highlight-inverted' %>
</div> </div>
<% end %> <% end %>

@ -51,7 +51,7 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="generic-table--action-buttons"> <div class="generic-table--action-buttons">
<%= link_to l(:label_work_package_view_all_reported_by_me), <%= link_to l(:label_work_package_view_all_reported_by_me),
work_packages_reported_by_me_path, work_packages_reported_by_me_path,
class: 'button -highlight' %> class: 'button -highlight-inverted' %>
</div> </div>
<% end %> <% end %>
<% content_for :header_tags do %> <% content_for :header_tags do %>

@ -50,6 +50,6 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="generic-table--action-buttons"> <div class="generic-table--action-buttons">
<%= link_to l(:label_work_package_view_all_watched), <%= link_to l(:label_work_package_view_all_watched),
work_packages_watched_path, work_packages_watched_path,
class: 'button -highlight' %> class: 'button -highlight-inverted' %>
</div> </div>
<% end %> <% end %>

@ -52,7 +52,7 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="generic-table--action-buttons"> <div class="generic-table--action-buttons">
<%= link_to l(:label_work_package_view_all_responsible_for), <%= link_to l(:label_work_package_view_all_responsible_for),
work_packages_responsible_for_path, work_packages_responsible_for_path,
class: 'button -highlight' %> class: 'button -highlight-inverted' %>
</div> </div>
<% end %> <% end %>

@ -67,7 +67,6 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %> <% end %>
</ul> </ul>
<div> <div>
<%= 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), <%= link_to new_project_work_packages_path(@project),
{ class: 'button -alt-highlight', { class: 'button -alt-highlight',
aria: {label: t(:label_work_package_new)}, aria: {label: t(:label_work_package_new)},
@ -75,6 +74,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= op_icon('button--icon icon-add') %> <%= op_icon('button--icon icon-add') %>
<span class="button--text"><%= l('activerecord.models.work_package') %></span> <span class="button--text"><%= l('activerecord.models.work_package') %></span>
<% end %> <% end %>
<%= link_to l(:label_work_package_view_all), {controller: :work_packages, action: :index, project_id: @project}, class: 'button -highlight-inverted' %>
</div> </div>
</div> </div>
<% end %> <% end %>
@ -92,7 +92,6 @@ See doc/COPYRIGHT.rdoc for more details.
</h3> </h3>
<%= render partial: 'news/news', collection: @news %> <%= render partial: 'news/news', collection: @news %>
<div> <div>
<%= link_to l(:label_news_view_all), {controller: '/news', action: 'index', project_id: @project}, class: 'button -highlight' %>
<%= link_to new_project_news_path(@project), <%= link_to new_project_news_path(@project),
{ class: 'button -alt-highlight', { class: 'button -alt-highlight',
aria: {label: t(:label_news_new)}, aria: {label: t(:label_news_new)},
@ -100,6 +99,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= op_icon('button--icon icon-add') %> <%= op_icon('button--icon icon-add') %>
<span class="button--text"><%= l('activerecord.models.news') %></span> <span class="button--text"><%= l('activerecord.models.news') %></span>
<% end %> <% end %>
<%= link_to l(:label_news_view_all), {controller: '/news', action: 'index', project_id: @project}, class: 'button -highlight-inverted' %>
</div> </div>
</div> </div>
<% end %> <% end %>

Loading…
Cancel
Save