Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix some icons issues

Benjamin Bädorf19203ce9f9af
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb
index 9f3b4d84f79..3c05c1f2255 100644
--- a/app/helpers/icons_helper.rb
+++ b/app/helpers/icons_helper.rb
@@ -36,13 +36,18 @@ module IconsHelper
%(<i class="#{classnames}" #{title} aria-hidden="true"></i>).html_safe
end
- def spot_icon(icon_name, title: nil, size: nil, classnames: nil)
+ def spot_icon(icon_name, title: nil, size: nil, inline: false, classnames: nil)
size_class = if size.nil?
""
else
"spot-icon_#{size}"
end
- content_tag(:span, title, class: "spot-icon #{size_class} spot-icon_#{icon_name} #{classnames}")
+ inline_class = if inline
+ "spot-icon_inline"
+ else
+ ""
+ end
+ content_tag(:span, title, class: "spot-icon #{size_class} #{inline_class} spot-icon_#{icon_name} #{classnames}")
end
##
diff --git a/app/views/homescreen/blocks/_upsale.html.erb b/app/views/homescreen/blocks/_upsale.html.erb
index bade7a0d63c..fd578155ddc 100644
--- a/app/views/homescreen/blocks/_upsale.html.erb
+++ b/app/views/homescreen/blocks/_upsale.html.erb
@@ -3,7 +3,7 @@
<div class="widget-box--blocks--upsale-description">
<div class="widget-box--blocks--upsale-title">
- <%= spot_icon('enterprise-addons') %>
+ <%= spot_icon('enterprise-addons', inline: true) %>
<span><%= t('homescreen.blocks.upsale.title') %></span>
<p class="widget-box--blocks--upsale-description">
@@ -24,12 +24,12 @@
<div class="widget-box--blocks--upsale-buttons">
<%= link_to "#{OpenProject::Static::Links.links[:upsale][:href]}/?utm_source=unknown&utm_medium=community-edition&utm_campaign=home-screen",
- { class: 'button--link widget-box--blocks--upsale-info-button',
+ { class: 'spot-link widget-box--blocks--upsale-info-button',
aria: {label: t('homescreen.blocks.upsale.more_info')},
target: '_blank',
title: t('homescreen.blocks.upsale.more_info')} do %>
<span class="button--text"><%= t('homescreen.blocks.upsale.more_info') %></span>
- <%= spot_icon('button--icon icon-external-link') %>
+ <%= spot_icon('external-link') %>
<% end %>
<%= link_to(OpenProject::Static::Links.links[:pricing][:href],
diff --git a/frontend/src/app/core/global_search/input/global-search-input.component.sass b/frontend/src/app/core/global_search/input/global-search-input.component.sass
index 1ef5ecae1ea..d7fae50ba39 100644
--- a/frontend/src/app/core/global_search/input/global-search-input.component.sass
+++ b/frontend/src/app/core/global_search/input/global-search-input.component.sass
@@ -22,7 +22,7 @@ $search-input-height: 30px
&--button
@include unset-button-styles
position: absolute
- right: 2px
+ right: 4px
font-size: var(--header-item-font-size)
color: var(--header-item-font-color)
display: inline-flex
diff --git a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.html b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.html
index 4ae99858bc8..92b16380f77 100644
--- a/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.html
+++ b/frontend/src/app/shared/components/enterprise-banner/enterprise-banner.component.html
@@ -8,7 +8,7 @@
<img [src]="image.enterprise_edition" class="hidden-for-mobile op-enterprise-banner--image">
<div class="op-toast--content">
<div class="op-enterprise-banner--header">
- <span class="spot-icon spot-icon_enterprise-addons"></span>
+ <span class="spot-icon spot-icon_enterprise-addons spot-icon_inline"></span>
<span [textContent]="text.enterpriseFeature" class="op-enterprise-banner--title"></span>
<button
*ngIf="collapsible"
diff --git a/frontend/src/app/spot/styles/sass/common/icon.sass b/frontend/src/app/spot/styles/sass/common/icon.sass
index 39095fc1611..c611a5de59e 100644
--- a/frontend/src/app/spot/styles/sass/common/icon.sass
+++ b/frontend/src/app/spot/styles/sass/common/icon.sass
@@ -4,14 +4,17 @@
align-items: center
font-size: 1.5rem
- &_2
- font-size: 2rem
+ &_0_75
+ font-size: $spot-spacing-0_75
+
+ &_1
+ font-size: $spot-spacing-1
&_1_25
- font-size: 1.25rem
+ font-size: $spot-spacing-1_25
- &_1
- font-size: 1rem
+ &_2
+ font-size: $spot-spacing-2
&_inline
transform: translateY(0.25em)
diff --git a/frontend/src/global_styles/content/_enterprise.sass b/frontend/src/global_styles/content/_enterprise.sass
index e59e6f31e99..b8a5aeaf56a 100644
--- a/frontend/src/global_styles/content/_enterprise.sass
+++ b/frontend/src/global_styles/content/_enterprise.sass
@@ -36,9 +36,11 @@
.widget-box--blocks--upsale-buttons
display: flex
justify-content: end
+ align-items: center
-.widget-box--blocks--upsale-info-button
- margin: 0.5rem 1rem 0 0
+ .button
+ margin: 0
+ margin-left: 1rem
.widget-box--blocks--upsale-title
font-weight: 400