Skip to content

Commit

Permalink
fix social share icons alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Dec 9, 2024
1 parent d94d050 commit 93ab85c
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 36 deletions.
57 changes: 29 additions & 28 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,18 @@ GEM
addressable
csv (3.3.0)
dalli (3.2.8)
date (3.4.0)
date (3.4.1)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
deepl-rb (3.0.2)
deepl-rb (3.1.0)
diff-lcs (1.5.1)
docile (1.4.1)
domain_name (0.6.20240107)
ed25519 (1.3.0)
erubi (1.13.0)
erubis (2.7.0)
excon (1.2.0)
excon (1.2.2)
execjs (2.10.0)
faraday (2.0.1)
faraday-net_http (~> 2.0)
Expand All @@ -181,10 +181,10 @@ GEM
sass-rails
globalid (1.2.1)
activesupport (>= 6.1)
graphql (2.4.3)
graphql (2.4.7)
base64
fiber-storage
graphql-client (0.23.0)
graphql-client (0.24.0)
activesupport (>= 3.0)
graphql (>= 1.13.0)
haml (5.2.2)
Expand All @@ -206,7 +206,7 @@ GEM
htmlbeautifier (1.4.3)
htmlentities (4.3.4)
http-accept (1.7.0)
http-cookie (1.0.7)
http-cookie (1.0.8)
domain_name (~> 0.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
Expand All @@ -229,7 +229,7 @@ GEM
inline_svg (1.10.0)
activesupport (>= 3.0)
nokogiri (>= 1.6)
io-console (0.7.2)
io-console (0.8.0)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
Expand All @@ -243,7 +243,7 @@ GEM
railties (>= 3.2.16)
jsbundling-rails (1.3.1)
railties (>= 6.0.0)
json (2.8.1)
json (2.9.0)
json-jwt (1.16.7)
activesupport (>= 4.2)
aes_key_wrap
Expand All @@ -267,7 +267,7 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.1)
logger (1.6.2)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand Down Expand Up @@ -296,9 +296,9 @@ GEM
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2024.1105)
mime-types-data (3.2024.1203)
mini_mime (1.1.5)
minitest (5.25.1)
minitest (5.25.4)
msgpack (1.7.5)
multi_json (1.15.0)
multi_xml (0.6.0)
Expand All @@ -324,11 +324,11 @@ GEM
net-protocol
net-ssh (7.3.0)
netrc (0.11.0)
newrelic_rpm (9.15.0)
newrelic_rpm (9.16.1)
nio4r (2.7.4)
nokogiri (1.15.6-x86_64-darwin)
nokogiri (1.15.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.15.6-x86_64-linux)
nokogiri (1.15.7-x86_64-linux)
racc (~> 1.4)
oauth2 (2.0.9)
faraday (>= 0.17.3, < 3.0)
Expand Down Expand Up @@ -384,10 +384,11 @@ GEM
ast (~> 2.4.1)
racc
popper_js (1.16.1)
pry (0.14.2)
pry (0.15.0)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.2.0)
psych (5.2.1)
date
stringio
public_suffix (5.1.1)
puma (5.6.9)
Expand Down Expand Up @@ -424,9 +425,9 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
rails-html-sanitizer (1.6.1)
loofah (~> 2.21)
nokogiri (~> 1.14)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails-i18n (7.0.10)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
Expand All @@ -442,13 +443,13 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rdoc (6.7.0)
rdoc (6.8.1)
psych (>= 4.0.0)
recaptcha (5.9.0)
json
redcarpet (3.6.0)
regexp_parser (2.9.2)
reline (0.5.11)
regexp_parser (2.9.3)
reline (0.5.12)
io-console (~> 0.5)
request_store (1.7.0)
rack (>= 1.4)
Expand All @@ -475,18 +476,18 @@ GEM
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.1)
rubocop (1.68.0)
rspec-support (3.13.2)
rubocop (1.69.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.35.0)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.2)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
Expand Down Expand Up @@ -562,7 +563,7 @@ GEM
concurrent-ruby (~> 1.0)
unaccent (0.4.0)
unicode-display_width (2.6.0)
uri (1.0.1)
uri (1.0.2)
validate_email (0.1.6)
activemodel (>= 3.0)
mail (>= 2.2.5)
Expand Down
1 change: 1 addition & 0 deletions app/assets/images/icons/facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/images/icons/linkedin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/images/icons/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions app/assets/images/icons/x.svg

This file was deleted.

3 changes: 3 additions & 0 deletions app/assets/stylesheets/ontologies.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ $widget-table-border-color: #EFEFEF;
.ont-section-toolbar {
display: flex;
align-items: center;
svg{
fill: var(--primary-color);
}
}

.ont-metadata-card {
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/ontologies_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def social_share_link(ont, sharer)
data-sharer='#{sharer.downcase}'
data-title='#{ont.name}'
data-url='#{CGI::escapeHTML($UI_URL + ontology_path(ont.acronym))}'>
#{sharer.downcase.eql?('twitter') ? inline_svg_tag('icons/x.svg', width: '21px', height: '18px') : "<i class=\"fab fa-lg fa-#{sharer.downcase} mt-2\"></i>"}
#{inline_svg_tag("icons/#{sharer.downcase}.svg", width: '21px', height: '18px')}
</a>
HTML
.html_safe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
- l.row do
%section.ont-metadata-card.ont-socialshare-card
%div.ont-section-toolbar
%span Share on socials
%span.mt-1 Share on socials
= social_share_link(@ontology, "Facebook")
= social_share_link(@ontology, "Twitter")
= social_share_link(@ontology, "LinkedIn")
Expand Down

0 comments on commit 93ab85c

Please sign in to comment.