Add AMA to main sidebar (#219)
This commit is contained in:
parent
02ab21726d
commit
bbeed70ada
1 changed files with 16 additions and 0 deletions
|
|
@ -122,6 +122,22 @@
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if Article.active_threads(["ama"], Timeframer.new(params[:timeframe]).datetime).any? %>
|
||||
<div class="widget">
|
||||
<header>
|
||||
<a href="/t/ama"><#AMA></a>
|
||||
</header>
|
||||
<div class="widget-body">
|
||||
<div class="widget-link-list">
|
||||
<% Article.active_threads(["ama"], Timeframer.new(params[:timeframe]).datetime, 5).
|
||||
each do |plucked_article| %>
|
||||
<%= render "articles/widget_list_item", plucked_article: plucked_article, show_comment_count: true %>
|
||||
<% end %>
|
||||
</div>
|
||||
<a class="cta cta-button" href="/new/ama">START AN "ASK ME ANYTHING"</a>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if Article.active_threads(["challenge"], Timeframer.new(params[:timeframe]).datetime).any? %>
|
||||
<div class="widget">
|
||||
<header>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue