Skip to content

Commit

Permalink
use new twitter icon in summary page for share on social
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Nov 7, 2024
1 parent 3762e8f commit 7a223b8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 6 additions & 0 deletions app/assets/images/icons/x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions app/assets/stylesheets/ontologies.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ $widget-table-border-color: #EFEFEF;

.ont-section-toolbar {
display: flex;
align-items: baseline;
align-items: center;
}

.ont-metadata-card {
Expand Down Expand Up @@ -314,4 +314,4 @@ $widget-table-border-color: #EFEFEF;
color: white;
border-radius: 10px;
position: relative;
}
}
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))}'>
<i class="fab fa-lg fa-#{sharer.downcase}"></i>
#{sharer.downcase.eql?('twitter') ? inline_svg_tag('icons/x', width: '21px', height: '18px') : "<i class=\"fab fa-lg fa-#{sharer.downcase} mt-2\"></i>"}
</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.pb-2 Share on socials
%span Share on socials
= social_share_link(@ontology, "Facebook")
= social_share_link(@ontology, "Twitter")
= social_share_link(@ontology, "LinkedIn")
Expand All @@ -85,4 +85,3 @@
%div.text-center.w-50
= link_to_modal(nil, metadata_export_datacite_export_path(ontology: @ontology.acronym), {data: {show_modal_title_value: "DataCite metadata", show_modal_size_value: 'modal-xl' }}) do
Export to DataCite

0 comments on commit 7a223b8

Please sign in to comment.