Sha256: 5a4a35c558f84a26d896cc96e816767aa58f2f4dad284e581ed17441cf76c725

Contents?: true

Size: 849 Bytes

Versions: 11

Compression:

Stored size: 849 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| %>
	<div class="content">
		<% unless post.image.nil? %>
			<div class="image-post" ><%= image_tag post.image.file %></div>
		<% end %>
		<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

11 entries across 10 versions & 1 rubygems

Version Path
pages_cms-1.0.3 app/views/pages_cms/articles/index.html.erb
pages_cms-1.0.2 app/views/pages_cms/articles/index.html.erb
pages_cms-1.0.1 app/views/pages_cms/articles/index.html.erb
pages_cms-1.0.0 app/views/pages_cms/articles/index.html.erb
pages_cms-0.2.3 app/views/pages_cms/articles/index.html.erb
pages_cms-0.2.2 app/views/pages_cms/articles/index.html.erb
pages_cms-0.2.1 app/views/pages_cms/articles/index.html.erb
pages_cms-0.2.0 app/views/pages_cms/articles/index.html.erb
pages_cms-0.1.1 test/dummy/app/views/pages_cms/articles/index.html.erb
pages_cms-0.1.1 app/views/pages_cms/articles/index.html.erb
pages_cms-0.1.0 app/views/pages_cms/articles/index.html.erb