Sha256: c4ddf36866c49db665cf8801aab2409180181e3574f7d771ddde1c328de1ae80

Contents?: true

Size: 1.68 KB

Versions: 4

Compression:

Stored size: 1.68 KB

Contents

    <div id="elsewhere">
      <% cache "#{__FILE__}/latest_tweet", :ttl => 43.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 => 47.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

4 entries across 4 versions & 2 rubygems

Version Path
brighter_planet_layout-ruby19-0.2.48 app/views/layouts/_elsewhere.html.erb
brighter_planet_layout-0.2.48 app/views/layouts/_elsewhere.html.erb
brighter_planet_layout-ruby19-0.2.47 app/views/layouts/_elsewhere.html.erb
brighter_planet_layout-0.2.47 app/views/layouts/_elsewhere.html.erb