From c6b4b923e6f88b7cc4a1af251cb532a5a15035e2 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 18 Aug 2019 14:55:32 +0200 Subject: Add trends to public pages sidebar (#11594) --- app/views/application/_sidebar.html.haml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/views/application') diff --git a/app/views/application/_sidebar.html.haml b/app/views/application/_sidebar.html.haml index b5ce5845e..90c8f9dd1 100644 --- a/app/views/application/_sidebar.html.haml +++ b/app/views/application/_sidebar.html.haml @@ -4,3 +4,13 @@ .hero-widget__text %p= @instance_presenter.site_short_description.html_safe.presence || @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname) + +- if Setting.trends + - trends = TrendingTags.get(3) + + - unless trends.empty? + .endorsements-widget.trends-widget + %h4.emojify= t('footer.trending_now') + + - trends.each do |tag| + = react_component :hashtag, hashtag: ActiveModelSerializers::SerializableResource.new(tag, serializer: REST::TagSerializer).as_json -- cgit