Sha256: f0fb0cdb1000c0e94c9ad0603cfbf99d44e3b7b9480919dcbd76209a9092390b
Contents?: true
Size: 899 Bytes
Versions: 3
Compression:
Stored size: 899 Bytes
Contents
<h1>Blog</h1> <%= form_tag '#', method: :get, class: 'inline-form' do %> <label>Search</label> <%= text_field_tag :search, params[:search], class: 'form-control inline-form' %> <% end %> <% @articles.each do |post| %> <% unless post.image.nil? %> <div class="image-post" style="background: url(<%= "/images/#{post.image.file}" %>) no-repeat center center;"></div> <% end %> <div class="content"> <div style="cursor: pointer;" onclick="window.location='/articles/<%= post.id.to_s %>';"> <h2 class="center"><%= post.title %></h2> <h6>Posted <%= post.created_at.strftime("%B %d") %></h6> <p><%= truncate(post.content, length: 200) %></p> </div> <div><%= link_to 'Read More', article_path(post) %></div> <div class="tags"> <% post.tags.each do |tag| %> <%= link_to tag, articles_path(search: tag), class: 'btn btn-default btn-xs' %> <% end %> </div> </div> <% end %>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pages_cms-0.0.3 | app/views/pages_cms/articles/index.html.erb |
pages_cms-0.0.2 | app/views/pages_cms/articles/index.html.erb |
pages_cms-0.0.1 | app/views/pages_cms/articles/index.html.erb |