Some template cleanup

This commit is contained in:
swag 2023-04-24 23:00:09 -04:00
parent fe19848b51
commit 9f89b66df7
5 changed files with 25 additions and 19 deletions

View File

@ -13,7 +13,7 @@
border-collapse: collapse;
}
.thread .id, .remark .id {
.thread .id, .remark .id, .thread .flag, nav .login {
float: right;
}

View File

@ -10,10 +10,12 @@
<div>
<%= link_to List => threads_list => {list_page => 1} %>
<%= link_to New => 'post_thread' %>
<% unless (is_mod) { =%>
<%= link_to Login => 'mod_login' %>
<% } =%>
<%= link_to RSS => threads_feed => {format => 'rss'} %>
<% unless (is_mod) { =%>
<span class="login">
<%= link_to Login => 'mod_login' %>
</span>
<% } =%>
</div>
<% if (is_mod) { =%>
<div>

View File

@ -44,7 +44,10 @@
<div class="remarks">
<h3>Last Remark</h3>
<article class="remark">
<nav class="id">#<%= $last_remark_id %></nav>
<nav class="id">
<%= link_to "#$last_remark_id",
single_remark => {remark_id => $last_remark_id} %>
</nav>
<h4 class="date"><%= $last_remark->{'date'} %></h4>
<h5 class="author"><%= $last_remark->{'author'} %></h5>
<p class="body"><%= $last_remark->{'body'} %></p>

View File

@ -33,7 +33,7 @@
<h4 class="date"><%= $remark->{'date'} %></h4>
<h5 class="author"><%= $remark->{'author'} %></h5>
<p class="body"><%= $remark->{'body'} %></p>
<nav>
<nav class="flag">
<%= link_to Flag => flag_remark => {remark_id => $remark->{'id'}} %>
</nav>
</article>

View File

@ -8,24 +8,25 @@
<%= link_to "#$thread->{'id'}",
single_thread => {thread_id => $thread->{'id'}} %>
</nav>
<h3 class="title"><%= $thread->{'title'} %></h3>
<h3 class="title">
<%= link_to single_thread => {thread_id => $thread->{'id'}}, begin %>
<%= $thread->{'title'} %>
<% end %>
</h3>
<h4 class="date"><%= $thread->{'date'} %></h4>
<h5 class="author"><%= $thread->{'author'} %></h5>
<p class="body"><%= truncate_text $thread->{'body'} %></p>
<nav class="remarks">
<nav>
<%= link_to Remark => post_remark => {thread_id => $thread->{'id'}} %>
<%= link_to url_for(single_thread => {thread_id => $thread->{'id'}})
->fragment('remarks'), begin %>
(<%= $thread->{'remark_count'} %> remarks)
<% end %>
</nav>
<nav class="bumps">
<%= link_to bump_thread => {thread_id => $thread->{'id'}}, begin %>
Bump (<%= $thread->{'bump_tally'} %> bumps)
<% end %>
</nav>
<nav>
<%= link_to Flag => flag_thread => {thread_id => $thread->{'id'}} %>
->fragment('remarks'), begin %>
(<%= $thread->{'remark_count'} %> remarks)\
<% end =%>
<%= link_to Bump => bump_thread => {thread_id => $thread->{'id'}} %>
(<%= $thread->{'bump_tally'} %> bumps)
<span class="flag">
<%= link_to Flag => flag_thread => {thread_id => $thread->{'id'}} %>
</span>
</nav>
</article>
<% } =%>