Set up page titles

This commit is contained in:
Trevor Vallender 2023-08-18 19:46:38 +01:00
parent 9d17c1d838
commit 88ccf7d958
8 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>SummonPlayer</title>
<title><%= @title.present? ? "#{@title} | #{t('site_title')}" : t("site_title") %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>

View File

@ -1,3 +1,4 @@
<% @title = "Log in" %>
<%= form_with url: sessions_path, method: :post do |f| %>
<h2><%= t ".log_in" %></h2>

View File

@ -1,3 +1,4 @@
<% @title = "Edit account details" %>
<%= render partial: "form",
locals: {
user: @user,

View File

@ -1,3 +1,4 @@
<% @title = "Edit account details" %>
<%= turbo_stream.replace "flash_wrapper" do %>
<%= render "shared/flash" %>
<% end %>

View File

@ -1,3 +1,4 @@
<% @title = "Register" %>
<%= render partial: "form",
locals: {
user: @user,

View File

@ -1,3 +1,4 @@
<% @title = "Register" %>
<%= turbo_stream.replace "flash_wrapper" do %>
<%= render "shared/flash" %>
<% end %>

View File

@ -1,3 +1,4 @@
<% @title = @user.username %>
<h2><%= @user.username %></h2>
<h4><%= @user.full_name %></h4>

View File

@ -1,4 +1,5 @@
en:
site_title: Summon Player
home: Home
log_in: Log in
log_out: Log out