mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 03:32:06 +00:00
Privacy and terms pages with config-driven branding (#91)
* comment out begin with basics until lessons are on the way * route to footer link dead views * proposed >7 piece engame processing * basic privacy and terms pages with default text * add branding to config and reference across the site * disclose guest puzzle limit in privacy policy (#87)
This commit is contained in:
@@ -2,6 +2,7 @@ defmodule ChesstrainerWeb.PageController do
|
||||
use ChesstrainerWeb, :controller
|
||||
|
||||
alias Chesstrainer.Attempts
|
||||
alias Chesstrainer.Branding
|
||||
alias Chesstrainer.DailyPuzzles
|
||||
alias Chesstrainer.Endgames
|
||||
|
||||
@@ -13,7 +14,7 @@ defmodule ChesstrainerWeb.PageController do
|
||||
|
||||
conn
|
||||
|> assign(:js_entry, ~p"/assets/js/marketing.js")
|
||||
|> assign(:page_title, "Lucid Chess — Endgame Trainer")
|
||||
|> assign(:page_title, Branding.home_title())
|
||||
|> assign(:title_suffix, "")
|
||||
|> assign(:meta_description, @description)
|
||||
|> assign(:canonical_url, current_url(conn))
|
||||
@@ -25,4 +26,27 @@ defmodule ChesstrainerWeb.PageController do
|
||||
today: Date.utc_today()
|
||||
)
|
||||
end
|
||||
|
||||
def privacy(conn, _params) do
|
||||
conn
|
||||
|> assign(:js_entry, ~p"/assets/js/marketing.js")
|
||||
|> assign(:page_title, Branding.title("Privacy Policy"))
|
||||
|> assign(:title_suffix, "")
|
||||
|> assign(
|
||||
:meta_description,
|
||||
"How #{Branding.name()} collects, uses, and protects your personal data."
|
||||
)
|
||||
|> assign(:canonical_url, current_url(conn))
|
||||
|> render(:privacy)
|
||||
end
|
||||
|
||||
def terms_conditions(conn, _params) do
|
||||
conn
|
||||
|> assign(:js_entry, ~p"/assets/js/marketing.js")
|
||||
|> assign(:page_title, Branding.title("Terms & Conditions"))
|
||||
|> assign(:title_suffix, "")
|
||||
|> assign(:meta_description, "The terms that apply when you use #{Branding.name()}.")
|
||||
|> assign(:canonical_url, current_url(conn))
|
||||
|> render(:terms_conditions)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user