docbrown/app/views/articles/_sidebar_campaign.html.erb
Anna Buianova e2cb359b2d
Change sidebar campaign view (#6228) [deploy]
* Changed sidebar campaign view

* feat: update the hml of the campaign sidebar config (do not show broken image if the link has not been set)

* feat: update the html and css to make it look like Figma

* chore: revert the classname change as we use write elsewhere

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-02-26 10:36:18 -05:00

19 lines
827 B
Text

<div class="widget">
<% if SiteConfig.campaign_sidebar_image %>
<img src="<%= SiteConfig.campaign_sidebar_image %>" class="widget-image" />
<% end %>
<header>
<h4>
<%= link_to "Stories (#{@campaign_articles_count})", "/t/#{SiteConfig.campaign_featured_tags.first}" %>
</h4>
</header>
<div class="widget-body">
<div class="widget-link-list">
<% @latest_campaign_articles.each do |plucked_article| %>
<%= render "articles/widget_list_item", plucked_article: plucked_article, show_comment_count: true %>
<% end %>
</div>
</div>
<%= link_to "Share your story", "/new/#{SiteConfig.campaign_featured_tags.first}", class: "widget-button write" %>
<%= link_to "See all stories", "/t/#{SiteConfig.campaign_featured_tags.first}", class: "widget-button all-stories" %>
</div>