docbrown/app/views/articles/_main_stories_feed.html.erb
Mac Siri 40f488d991 Migrate to Travis CI (part 2) (#591)
* Update Travis.yml

* Update README

* Update README

* Adjust test to not rely on env vars

* Update encryption

* Refactor

* Update env key

* Stub AWS calls

* Create ApplicationConfig

* Fix specs

* Fix lint

* Update ApplicationConfig

* Remove travis env vars

* Fix lint

* Extend character limit to 100

* Add env to travis

* Take out auto-restart after deploy

* Immediately discarded test cache

* Stub GA in request specs

* Stub Pusher

* Fix broken specs

* Update fixture

* Add CodeClimate id

* Change CodeClimate key

* Remove merge mistakes

* WIP

* Add Envied gem & Change README

* Add missing keys

* Add missing key

* Update fixture

* Fix broken spec

* Add Slack Notification for Travis

* Fix wording

* Fix typo
2018-07-20 20:17:18 -04:00

39 lines
No EOL
1.6 KiB
Text

<% num_showing = 0 %>
<% @stories.each_with_index do |story,i| %>
<% next if story.id == @featured_story.id %>
<% num_showing += 1 %>
<% break if (num_showing == 3 && user_signed_in?) && @home_page %>
<% if !user_signed_in? && i == 4 %>
<div class="single-article single-article-small-pic feed-cta" id="in-feed-cta">
<div class="cta-container" id="cta-content">
<h2>
<% if @tag.blank? %>
Need more relevant posts?<br />Sign in to customize your feed:
<% else %>
<a href="/">dev.to</a> is a community of <br/><%= number_with_delimiter User.all.size %> amazing humans who code.
<% end %>
</h2>
<div class="button-container">
<a href="/users/auth/twitter?callback_url=<%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %>/users/auth/twitter/callback" class="cta cta-button" data-no-instant>
TWITTER
</a>
<a href="/users/auth/github?state=in-feed-cta" class="cta cta-button" data-no-instant>
GITHUB
</a>
</div>
</div>
</div>
<% end %>
<%= render "articles/single_story", story: story %>
<% if i == 0 && @comments && @comments.size > 0 && @user %>
<%= render "articles/comments_section" %>
<% end %>
<% end %>
<% if @stories.length == 0 && @comments && @comments.size > 0 && @user %>
<%= render "articles/comments_section" %>
<% end %>
<% if @stories.size > 1 %>
<div class="placeholder-div">
</div>
<% end %>
<div class="single-article-small-pic" id="article-index-hidden-div" style="display:none"></div>