homepage layout update

This commit is contained in:
Ben Harris 2018-02-22 01:27:03 -05:00
parent 7978f4c306
commit dec5d2f68c
3 changed files with 29 additions and 28 deletions

View File

@ -2,6 +2,14 @@ body {
padding-top: 70px;
}
textarea {
resize: vertical;
}
div.panel-body {
background-color: #000;
}
a.permalink {
padding-top: 70px;
}

View File

@ -1,15 +1,17 @@
<a class="permalink" name="<%= @i %>"></a>
<div class="panel panel-default">
<div class="panel-body">
<div class="pull-right"><img src="https://tilde.team/~<%= @post.user.name %>/avatar.png" alt="<%= @post.user.name %> avatar"></div>
<div class="pull-right"><img src="https://tilde.team/~<%= @post.user.name %>/avatar.png" alt="<%= @post.user.name %> avatar" width="96px" height="96px"></div>
<%= @post.content |> Forum.md %>
</div>
<div class="panel-footer">
<%= if @post.user == Forum.get_session_user(@conn) do %>
<div class="pull-right">
<div class="pull-right">
<a href="#<%= @i %>">permalink</a>
<%= if @post.user == Forum.get_session_user(@conn) do %>
<%= link "edit post", to: post_path(@conn, :edit, @post), class: "btn btn-info btn-xs" %>
<%= link "delet this", to: post_path(@conn, :delete, @post), method: :delete, data: [confirm: "are you sure?"], class: "btn btn-danger btn-xs" %>
</div>
<% end %>
<% end %>
</div>
<em><a href="<%= user_path(@conn, :show, @post.user) %>">~<%= @post.user.name %></a></em> //
<small><%= @post.inserted_at |> Forum.pp_time %></small>
</div>

View File

@ -1,31 +1,22 @@
<h1>tilde~forum</h1>
<table class="table">
<thead>
<tr>
<th>threads</th>
<th></th>
</tr>
</thead>
<tbody>
<%= for thread <- @threads do %>
<tr>
<td>
<h4><a href="<%= thread_path(@conn, :show, thread) %>"><%= thread.name %></a></h4>
by: <a href="<%= user_path(@conn, :show, thread.user) %>"><em>~<%= thread.user.name %></em></a> // thread created <%= thread.inserted_at |> Forum.pp_time %>
</td>
<div class="panel panel-default">
<div class="panel-body">
<h4><a href="<%= thread_path(@conn, :show, thread) %>"><%= thread.name %></a></h4>
</div>
<div class="panel-footer">
by: <a href="<%= user_path(@conn, :show, thread.user) %>"><em>~<%= thread.user.name %></em></a> // thread created <%= thread.inserted_at |> Forum.pp_time %>
<td class="text-right">
<%= if thread.user == Forum.get_session_user(@conn) do %>
<span><%= link "edit", to: thread_path(@conn, :edit, thread), class: "btn btn-info btn-xs" %></span>
<span><%= link "delete", to: thread_path(@conn, :delete, thread), method: :delete, data: [confirm: "are you sure?"], class: "btn btn-danger btn-xs" %></span>
<% end %>
</td>
</tr>
<%= if thread.user == Forum.get_session_user(@conn) do %>
<div class="pull-right">
<%= link "edit", to: thread_path(@conn, :edit, thread), class: "btn btn-info btn-xs" %>
<%= link "delete", to: thread_path(@conn, :delete, thread), method: :delete, data: [confirm: "are you sure?"], class: "btn btn-danger btn-xs" %>
</div>
<% end %>
</div>
</div>
<% end %>
</tbody>
</table>
<hr>