views: refactor page titles.

Refactor `page_title` helper to automatically include site name.
This commit is contained in:
evazion
2020-01-25 01:29:58 -06:00
parent 95e424ad80
commit 6a984de3d5
64 changed files with 158 additions and 316 deletions

View File

@@ -1,3 +1,6 @@
<% page_title "Settings" %>
<%= render "secondary_links" %>
<div id="c-users">
<div id="a-edit">
<h1>Settings</h1>
@@ -74,10 +77,6 @@
</div>
</div>
<% content_for(:page_title) do %>
Settings - <%= Danbooru.config.app_name %>
<% end %>
<% content_for(:html_header) do %>
<script type="text/javascript">
$(function() {
@@ -93,5 +92,3 @@
});
</script>
<% end %>
<%= render "secondary_links" %>

View File

@@ -1,3 +1,6 @@
<% page_title "Sign up" %>
<%= render "secondary_links" %>
<div id="c-users">
<div id="a-new" class="fixed-width-container">
<h1>Sign Up</h1>
@@ -23,9 +26,3 @@
</div>
</div>
</div>
<%= render "secondary_links" %>
<% content_for(:page_title) do %>
Sign up - <%= Danbooru.config.app_name %>
<% end %>

View File

@@ -1,3 +1,6 @@
<% page_title "@#{@user.pretty_name}" %>
<%= render "secondary_links" %>
<div id="c-users">
<div id="a-show">
<h1><%= link_to_user @user %></h1>
@@ -17,11 +20,5 @@
</div>
</div>
<%= render "secondary_links" %>
<% content_for(:page_title) do %>
User - <%= @user.presenter.name %> - <%= Danbooru.config.app_name %>
<% end %>
<% content_for(:html_header, auto_discovery_link_tag(:atom, comments_url(:atom, search: { post_tags_match: "user:#{@user.name}" }), title: "Comments on #{@user.name}'s uploads")) %>
<% content_for(:html_header, auto_discovery_link_tag(:atom, comments_url(:atom, search: { post_tags_match: "commenter:#{@user.name}" }), title: "Comments on posts commented on by #{@user.name}")) %>