Started working on a blog for the website; adjusted some styles
This commit is contained in:
14
app/views/blog/index.html.erb
Normal file
14
app/views/blog/index.html.erb
Normal file
@ -0,0 +1,14 @@
|
||||
<h1 class="u-text-center">Bit Goblin Blog</h1>
|
||||
|
||||
<% if @posts.length > 0 %>
|
||||
<ul id="post-list">
|
||||
<% @posts.each do |post| %>
|
||||
<li>
|
||||
<h4 class="post-title"><a href="/blog/post/<%= post.id %>"><%= post.title %></a></h4>
|
||||
<p class="post-body"><%= truncate(raw(post.renderBody()), :length => 300, :escape => false) %></p>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<p>I'm sorry, there don't appear to be any blog posts published at this time. Check back later!</p>
|
||||
<% end %>
|
8
app/views/blog/show.html.erb
Normal file
8
app/views/blog/show.html.erb
Normal file
@ -0,0 +1,8 @@
|
||||
<header id="post-header">
|
||||
<h1 id="post-title" class="u-text-center"><%= @post.title %></h1>
|
||||
<h4 id="post-author" class="u-text-center">written by <%= @post.author %></h4>
|
||||
</header>
|
||||
|
||||
<div class="post-body">
|
||||
<%= raw(@post.renderBody()) %>
|
||||
</div>
|
Reference in New Issue
Block a user