Skip to content

Commit

Permalink
in home page move metrics up and have news if not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Sep 5, 2024
1 parent ec5b0df commit 526f811
Showing 1 changed file with 61 additions and 60 deletions.
121 changes: 61 additions & 60 deletions app/views/home/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 526f811

Please sign in to comment.