_sidebar.html.haml 773 B

12345678910111213141516
  1. .hero-widget
  2. .hero-widget__img
  3. = image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.png'), alt: @instance_presenter.title
  4. .hero-widget__text
  5. %p= @instance_presenter.description.html_safe.presence || t('about.about_mastodon_html')
  6. - if Setting.trends && !(user_signed_in? && !current_user.setting_trends)
  7. - trends = Trends.tags.query.allowed.limit(3)
  8. - unless trends.empty?
  9. .endorsements-widget.trends-widget
  10. %h4.emojify= t('footer.trending_now')
  11. - trends.each do |tag|
  12. = react_component :hashtag, hashtag: ActiveModelSerializers::SerializableResource.new(tag, serializer: REST::TagSerializer, scope: current_user, scope_name: :current_user).as_json