about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-08-18 14:55:32 +0200
committerGitHub <noreply@github.com>2019-08-18 14:55:32 +0200
commitc6b4b923e6f88b7cc4a1af251cb532a5a15035e2 (patch)
tree319ffb60377d37f3f22bc9ded64fba75522339f5 /app/views
parent96702e7f6727d9c688b2c6e2527c4a5bfefff886 (diff)
Add trends to public pages sidebar (#11594)
Diffstat (limited to 'app/views')
-rw-r--r--app/views/application/_sidebar.html.haml10
1 files changed, 10 insertions, 0 deletions
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