diff --git a/.env.sample b/.env.sample index 6a8e41d24..d63ef287a 100644 --- a/.env.sample +++ b/.env.sample @@ -10,6 +10,8 @@ API_KEY= UI_THEME=ontoportal +TWITTER_NEWS= + BIOMIXER_URL= BIOMIXER_APIKEY= diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 43fc5ff02..b99138af6 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -165,15 +165,15 @@ %a{:href => "/landscape#fairness_assessment"} %div.home-fair-details %p= t('home.fair_details') - - .home-sub-section-right - %h4= t('home.twitter_news') - %hr.home-section-line - .home-card.home-twitter-news - %a.twitter-timeline{"data-height" => "360", :href => "https://twitter.com/lagroportal?ref_src=twsrc%5Etfw"} - .home-twitter-loader - = render LoaderComponent.new(type: 'pulsing') - %script{:async => "", :charset => "utf-8", :src => "https://platform.twitter.com/widgets.js"} + - if !$TWITTER_NEWS.blank? + .home-sub-section-right + %h4= t('home.twitter_news') + %hr.home-section-line + .home-card.home-twitter-news + %a.twitter-timeline{"data-height" => "360", :href => $TWITTER_NEWS} + .home-twitter-loader + = render LoaderComponent.new(type: 'pulsing') + %script{:async => "", :charset => "utf-8", :src => "https://platform.twitter.com/widgets.js"} - if slices_enabled? .home-section diff --git a/config/bioportal_config_env.rb.sample b/config/bioportal_config_env.rb.sample index 8d6c4b52e..80091a5a5 100644 --- a/config/bioportal_config_env.rb.sample +++ b/config/bioportal_config_env.rb.sample @@ -8,6 +8,9 @@ $ORG_URL = ENV['ORG_URL'] # Site name (required) $SITE = ENV['SITE'] +# Twitter section +$TWITTER_NEWS = ENV["TWITTER_NEWS"] + # Full string for site, EX: "NCBO BioPortal", do not modify $ORG_SITE = $ORG.nil? || $ORG.empty? ? $SITE : "#{$ORG} #{$SITE}"