Sha256: 7b9c198b3988e133a6cb53bf27b2c404c194fe89696e5bc43f42c3a3556ee8ec

Contents?: true

Size: 1.68 KB

Versions: 8

Compression:

Stored size: 1.68 KB

Contents

    <div id="elsewhere">
      <% cache "#{__FILE__}/latest_tweet", :ttl => 3.minutes do %>
        <!-- Cached at <%= Time.now %> -->
        <% tweet = ::BrighterPlanetLayout.latest_tweet -%>
        <% if tweet %>
          <div id="twitter">
            <p>
              <%= auto_link tweet.description.sub('brighterplanet: ', '') %>
              <span>via <%= link_to '@brighterplanet', 'http://twitter.com/brighterplanet' %></span>
            </p>
          </div>
        <% else %>
          <div id="twitter">
            <p>
              Check out our <a href="http://twitter.com/brighterplanet">Twitter feed</a>
              <span>via <a href="http://twitter.com/brighterplanet">@brighterplanet</a></span>
            </p>
          </div>
        <% end %>
      <% end %>
      <% cache "#{__FILE__}/latest_blog_post", :ttl => 3.minutes do %>
        <!-- Cached at <%= Time.now %> -->
        <% blog_post = ::BrighterPlanetLayout.latest_blog_post -%>
        <% if blog_post %>
          <div id="blog" class="<%= blog_post.author.downcase.dasherize %>">
            <p>
              <%= link_to blog_post.title, blog_post.link %>
              <span>by <%= blog_post.author %> <%= time_ago_in_words blog_post.updated %> ago on <%= link_to 'Safety in Numbers', 'http://numbers.brighterplanet.com' %>, our blog</span>
            </p>
          </div>
        <% else %>
          <div id="blog" class="andy">
            <p>
              See <a href="http://numbers.brighterplanet.com">the latest posts</a>
              <span>by Andy on <a href="http://numbers.brighterplanet.com">Safety in Numbers</a>, our blog</span>
            </p>
          </div>
        <% end %>
      <% end %>
    </div>

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
brighter_planet_layout-0.2.46 app/views/layouts/_elsewhere.html.erb
brighter_planet_layout-0.2.45 app/views/layouts/_elsewhere.html.erb
brighter_planet_layout-0.2.44 app/views/layouts/_elsewhere.html.erb
brighter_planet_layout-0.2.43 app/views/layouts/_elsewhere.html.erb
brighter_planet_layout-0.2.42 app/views/layouts/_elsewhere.html.erb
brighter_planet_layout-0.2.41 app/views/layouts/_elsewhere.html.erb
brighter_planet_layout-ruby19-0.2.40 app/views/layouts/_elsewhere.html.erb
brighter_planet_layout-0.2.40 app/views/layouts/_elsewhere.html.erb