PostText/templates/layouts/default.html.ep

62 lines
1.7 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<title>Post::Text - <%= title %></title>
<%= asset 'main.css' %>
</head>
<body>
<h1>Post::Text</h1>
<nav>
<div>
<%= link_to List => threads_list => {list_page => 1} %>
<%= link_to New => 'post_thread' %>
<%= link_to About => 'about_page' %>
<%= link_to Rules => 'rules_page' %>
<%= link_to RSS => threads_feed => {format => 'rss'} %>
<span class="login">
<% if (is_mod) { =%>
<%= link_to Logout => 'mod_logout' %>
<% } else { =%>
<%= link_to Login => 'mod_login' %>
<% } =%>
</span>
</div>
<% if (is_mod) { =%>
<div>
<span>Moderate:</span>
<%= link_to Flagged => 'flagged_list' %>
<%= link_to Hidden => 'hidden_list' %>
<%= link_to Reset => 'mod_reset' %>
</div>
<% } =%>
<% if (is_admin) { =%>
<div>
<span>Admin:</span>
<%= link_to Create => 'create_mod' %>
<%= link_to Reset => 'admin_reset' %>
<%= link_to Lock => 'lock_mod' %>
<%= link_to Unlock => 'unlock_mod' %>
<%= link_to Promote => 'promote_mod' %>
<%= link_to Demote => 'demote_admin' %>
</div>
<% } =%>
</nav>
<hr>
<% if (flash 'error') { =%>
<p class="field-with-error" id="error"><%= flash 'error' %></p>
<% } elsif (stash 'error') { =%>
<p class="field-with-error" id="error"><%= stash 'error' %></p>
<% } =%>
<% if (flash 'info') { =%>
<p class="field-with-info" id="info"><%= flash 'info' %></p>
<% } =%>
<% if (stash 'info') { =%>
<p class="field-with-info" id="info"><%= stash 'info' %></p>
<% } =%>
<%= content =%>
<footer>
<p>In UTF-8 we trust. 🫡</p>
</footer>
</body>
</html>