From 7a223b8e172a2da75d12f7cd738912f08f4b174a Mon Sep 17 00:00:00 2001 From: Syphax Date: Fri, 8 Nov 2024 00:33:09 +0100 Subject: [PATCH] use new twitter icon in summary page for share on social --- app/assets/images/icons/x.svg | 6 ++++++ app/assets/stylesheets/ontologies.scss | 4 ++-- app/helpers/ontologies_helper.rb | 2 +- .../metadata/_ontology_description_section.html.haml | 3 +-- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 app/assets/images/icons/x.svg diff --git a/app/assets/images/icons/x.svg b/app/assets/images/icons/x.svg new file mode 100644 index 0000000000..e2eb4122bf --- /dev/null +++ b/app/assets/images/icons/x.svg @@ -0,0 +1,6 @@ + + + + diff --git a/app/assets/stylesheets/ontologies.scss b/app/assets/stylesheets/ontologies.scss index ccaf70d314..2f87f8ac83 100644 --- a/app/assets/stylesheets/ontologies.scss +++ b/app/assets/stylesheets/ontologies.scss @@ -109,7 +109,7 @@ $widget-table-border-color: #EFEFEF; .ont-section-toolbar { display: flex; - align-items: baseline; + align-items: center; } .ont-metadata-card { @@ -314,4 +314,4 @@ $widget-table-border-color: #EFEFEF; color: white; border-radius: 10px; position: relative; -} \ No newline at end of file +} diff --git a/app/helpers/ontologies_helper.rb b/app/helpers/ontologies_helper.rb index 1cfe84c87f..d8b4f72033 100644 --- a/app/helpers/ontologies_helper.rb +++ b/app/helpers/ontologies_helper.rb @@ -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', width: '21px', height: '18px') : ""} HTML .html_safe diff --git a/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml b/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml index 520c39d8fe..dff44cffed 100644 --- a/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml +++ b/app/views/ontologies/sections/metadata/_ontology_description_section.html.haml @@ -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") @@ -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 -