From 526f8112214945615e0bb51726b964d71046cd1f Mon Sep 17 00:00:00 2001 From: Syphax Date: Thu, 5 Sep 2024 15:37:30 +0200 Subject: [PATCH] in home page move metrics up and have news if not enabled --- app/views/home/index.html.haml | 121 +++++++++++++++++---------------- 1 file changed, 61 insertions(+), 60 deletions(-) diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index a6b66c276..ad457d812 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -63,6 +63,57 @@ .discover-ontologies = discover_ontologies_button + .home-section + %h4 + = t('home.agroportal_figures', site: portal_name) + %hr.home-section-line/ + .home-statistics-container + .home-statistics + .home-statistics-item + %hr/ + %div + %h4 + = format_number_abbreviated(@ont_count) + %p= t("home.ontologies") + .home-statistics-item + %hr/ + %div + %h4 + = format_number_abbreviated(@cls_count) + %p= t("home.classes") + .home-statistics-item + %hr/ + %div + %h4 + = format_number_abbreviated(@individuals_count) + %p= t("home.individuals") + .home-statistics-item + %hr/ + %div + %h4 + = format_number_abbreviated(@prop_count) + %p= t("home.properties") + .home-statistics-item + %hr/ + %div + %h4 + = format_number_abbreviated(@projects_count) + %p= t("home.projects") + .home-statistics-item + %hr/ + %div + %h4 + = format_number_abbreviated(@map_count) + %p= t("home.mappings") + .home-statistics-item + %hr/ + %div + %h4 + = format_number_abbreviated(@users_count) + %p= t("home.users") + .home-statistics-link.justify-content-end{style: @analytics.empty? && "visibility: hidden"} + = link_to t("home.see_details"),'/statistics', target: "_blank" + .home-section %h4 = t('home.recommender_annotator') @@ -116,67 +167,17 @@ %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"} - - .home-section - %h4 - = t('home.agroportal_figures', site: portal_name) - %hr.home-section-line/ - .home-statistics-container - .home-statistics - .home-statistics-item - %hr/ - %div - %h4 - = format_number_abbreviated(@ont_count) - %p= t("home.ontologies") - .home-statistics-item - %hr/ - %div - %h4 - = format_number_abbreviated(@cls_count) - %p= t("home.classes") - .home-statistics-item - %hr/ - %div - %h4 - = format_number_abbreviated(@individuals_count) - %p= t("home.individuals") - .home-statistics-item - %hr/ - %div - %h4 - = format_number_abbreviated(@prop_count) - %p= t("home.properties") - .home-statistics-item - %hr/ - %div - %h4 - = format_number_abbreviated(@projects_count) - %p= t("home.projects") - .home-statistics-item - %hr/ - %div - %h4 - = format_number_abbreviated(@map_count) - %p= t("home.mappings") - .home-statistics-item - %hr/ - %div - %h4 - = format_number_abbreviated(@users_count) - %p= t("home.users") - .home-statistics-link.justify-content-end{style: @analytics.empty? && "visibility: hidden"} - = link_to t("home.see_details"),'/statistics', target: "_blank" + - unless $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 + - unless @slices.blank? .home-section .home-section-title .text