Add French legal notice and complete privacy disclosures (#134)

- Add /mentions-legales (LCEN art. 6-III): publisher, SIRET, VAT status,
  publication director, and host details
- Name the data controller in the privacy policy and the terms
- Disclose Hetzner/Cloudflare hosting, third-country transfers, the CDN
  security cookie, and backup/suppression-list retention
- Remove the children section; the age floor now lives in the terms
- State that request logs are kept by the providers, not by us
- Mirror all changes in the pre-launch static site

The publisher address is a placeholder pending a domiciliation address.
This commit is contained in:
2026-11-10 11:41:40 +01:00
committed by GitHub
parent 73ba25afe3
commit f8897fa5ae
15 changed files with 383 additions and 63 deletions
+4 -2
View File
@@ -9,6 +9,7 @@ deploy/static/
├── index.html # page + inline CSS; uses the app's real brand tokens
├── privacy.html # privacy policy, served at /privacy
├── terms-conditions.html # terms, served at /terms-conditions
├── mentions-legales.html # French legal notice, served at /mentions-legales
├── legal.css # shared styles for the legal pages
├── fonts/ # DM Sans + DM Serif Display woff2 files
├── favicon.ico # copied from priv/static
@@ -17,8 +18,9 @@ deploy/static/
└── README.md
```
The Caddyfile uses `try_files {path}.html {path}` so `/privacy` and
`/terms-conditions` serve the matching `.html` files without a redirect.
The Caddyfile uses `try_files {path}.html {path}` so `/privacy`,
`/terms-conditions`, and `/mentions-legales` serve the matching `.html` files
without a redirect.
## Preview locally
+1
View File
@@ -699,6 +699,7 @@
<nav class="footer-links" aria-label="Legal">
<a href="/privacy">Privacy</a>
<a href="/terms-conditions">Terms</a>
<a href="/mentions-legales">Mentions légales</a>
</nav>
<small>&copy; 2026 Inner Square Chess</small>
</footer>
+108
View File
@@ -0,0 +1,108 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mentions légales — Inner Square Chess</title>
<meta
name="description"
content="Éditeur, hébergeur et informations légales du site Inner Square Chess."
/>
<meta name="robots" content="noindex, nofollow" />
<meta name="theme-color" content="#f4f0e6" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Inner Square Chess" />
<meta property="og:title" content="Mentions légales — Inner Square Chess" />
<meta
property="og:description"
content="Éditeur, hébergeur et informations légales du site Inner Square Chess."
/>
<meta name="twitter:card" content="summary" />
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="/legal.css" />
</head>
<body>
<header>
<nav class="nav-wrap" aria-label="Main navigation">
<a class="brand" href="/" aria-label="Inner Square Chess home">
<span class="brand-mark" aria-hidden="true">♞</span>
<span>INNERSQUARE</span>
</a>
<span class="status">Launching soon</span>
</nav>
</header>
<main id="main-content">
<article class="legal" lang="fr">
<h1>Mentions légales</h1>
<p class="legal-meta">Dernière mise à jour : 10 novembre 2026</p>
<p>
Ces mentions sont publiées en application de l'article 6-III de la loi
n° 2004-575 du 21 juin 2004 pour la confiance dans l'économie numérique.
</p>
<h2>Éditeur du site</h2>
<p>
Le site <a href="/">innersquare.app</a>, édité sous le nom commercial
«&nbsp;Inner Square Chess&nbsp;», est édité par&nbsp;:
</p>
<ul>
<li><strong>Owen REES</strong>, entrepreneur individuel (EI)</li>
<li>Adresse&nbsp;: [adresse à compléter]</li>
<li>SIRET&nbsp;: 929 553 774 00019</li>
<li>Téléphone&nbsp;: <a href="tel:+33683019513">+33 6 83 01 95 13</a></li>
<li>
Courriel&nbsp;:
<a href="mailto:support@innersquare.app">support@innersquare.app</a>
</li>
<li>TVA non applicable, article 293 B du Code général des impôts.</li>
</ul>
<h2>Directeur de la publication</h2>
<p>Owen REES.</p>
<h2>Hébergeur</h2>
<p>
Hetzner Online GmbH<br />
Industriestraße 25<br />
91710 Gunzenhausen<br />
Allemagne<br />
Téléphone&nbsp;: <a href="tel:+4998315050">+49 9831 505-0</a>
</p>
<h2>Propriété intellectuelle</h2>
<p>
Les contenus du site — textes, interface, code, éléments graphiques, ainsi
que les positions et solutions d'échecs — sont protégés par le droit
d'auteur et restent la propriété de l'éditeur ou de ses concédants. Toute
reproduction ou réutilisation non autorisée est interdite.
</p>
<h2>Données personnelles</h2>
<p>
Les données traitées, les finalités, les durées de conservation et vos
droits sont décrits dans la
<a href="/privacy">politique de confidentialité</a>, disponible en anglais.
</p>
</article>
</main>
<footer class="site-footer">
<div class="footer-brand">
<a class="brand" href="/" aria-label="Inner Square Chess home">
<span class="brand-mark" aria-hidden="true">♞</span>
<span>INNERSQUARE</span>
</a>
<p>Short, focused endgame training.</p>
</div>
<nav class="footer-links" aria-label="Legal">
<a href="/privacy">Privacy</a>
<a href="/terms-conditions">Terms</a>
<a href="/mentions-legales">Mentions légales</a>
</nav>
<small>&copy; 2026 Inner Square Chess</small>
</footer>
</body>
</html>
+75 -28
View File
@@ -45,6 +45,17 @@
guest trainer.
</p>
<h2>Data controller</h2>
<p>
The controller responsible for your personal information is Owen REES,
an entrepreneur individuel (EI) established in France, trading as
Inner Square Chess. Our business register number (SIRET) is
929&nbsp;553&nbsp;774&nbsp;00019. You can contact us about anything in
this policy, or about your data, at
<a href="mailto:support@innersquare.app">support@innersquare.app</a>
or <a href="tel:+33683019513">+33 6 83 01 95 13</a>.
</p>
<h2>What we collect</h2>
<ul>
<li>
@@ -66,17 +77,18 @@
</li>
<li>
<strong>Technical data.</strong>
Our hosting and server infrastructure may keep standard request logs
(IP address, browser, timestamps) for security and troubleshooting.
These logs are rotated regularly.
We do not keep our own access logs. The companies that host the site
and run our content delivery network keep short-lived request logs
(IP address, browser, timestamps) for security, abuse prevention, and
troubleshooting, under their own retention policies.
</li>
<li>
<strong>Usage data.</strong>
On public pages and the guest trainer, we use a self-hosted Matomo
instance to understand aggregate usage. Matomo is configured without
cookies, with IP anonymisation, and to respect Do Not Track. We do
not use user IDs, track signed-in account pages, or share this data
with third parties.
cookies, with IP addresses shortened before storage, and to respect
Do Not Track. We do not use user IDs, track signed-in account pages,
or share this data with third parties.
</li>
<li>
<strong>Messages you send us.</strong>
@@ -93,6 +105,10 @@
<ul>
<li>a session cookie that keeps you signed in;</li>
<li>a CSRF token that protects forms from cross-site requests;</li>
<li>
a security cookie that our content delivery network, Cloudflare, may
set when it checks that a request is not automated abuse;
</li>
<li>a colour-mode preference stored in your browser.</li>
<li>
an analytics opt-out preference stored in your browser's local
@@ -100,11 +116,12 @@
</li>
</ul>
<p>
We do not use advertising cookies, third-party analytics, or cross-site
tracking. Our analytics is self-hosted Matomo and is configured without
cookies. You can clear these entries at any time in your browser
settings; doing so will sign you out, reset your colour mode, and reset
your analytics preference.
We do not use advertising cookies, analytics cookies, or cross-site
tracking. The only cookie not set by this site is Cloudflare's security
check described above; our analytics is self-hosted Matomo and is
configured without cookies. You can clear these entries at any time in
your browser settings; doing so will sign you out, reset your colour
mode, and reset your analytics preference.
</p>
<h2>Analytics</h2>
@@ -112,9 +129,9 @@
We use a self-hosted Matomo instance at
<a href="https://analytics.owenrees.eu/">analytics.owenrees.eu</a>
to understand aggregate use of the public site and guest trainer. It is
configured without cookies, with IP anonymisation, and to respect Do
Not Track. We do not use user IDs, track signed-in account pages, or
share this data with third parties.
configured without cookies, with IP addresses shortened before storage,
and to respect Do Not Track. We do not use user IDs, track signed-in
account pages, or share this data with third parties.
</p>
<p>
Raw analytics data is retained for up to 180 days. We process it on the
@@ -169,15 +186,41 @@
to object to this processing; to do so, contact us using the address below.
</p>
<h2 id="hosting-and-infrastructure">Hosting and infrastructure</h2>
<p>
The site runs on a virtual private server operated for us by Hetzner
inside the European Union. Our database runs on the same server, our
transactional email is sent through Amazon SES in the EU, and our
self-hosted Matomo analytics runs on infrastructure we control in the
EU.
</p>
<p>
We also use Cloudflare as our content delivery network and security
proxy. Because Cloudflare sits between your browser and our server, it
processes your IP address, the requested URL, and request headers.
Cloudflare is a US company, so that request data may be transferred
outside the UK and EEA. The transfer relies on the EU–US Data Privacy
Framework and standard contractual clauses. Cloudflare and Hetzner each
keep their own logs under their own retention policies; we do not
receive or keep them.
</p>
<p>
These providers act as our processors under data protection law. We
share with them only what they need to run the service, and we remain
responsible for how your information is handled.
</p>
<h2>Sharing</h2>
<p>
We do not sell your personal information. We share it only with providers
who help us run the site — for example hosting, database, and email
delivery providers — and only as far as they need it to perform that work.
Self-hosted Matomo analytics is operated by us on infrastructure we
control; we do not share that data with third parties. We may also
disclose information where the law requires it or to protect the rights
and safety of our users.
We do not sell your personal information. We share it only with the
providers described under
<a href="#hosting-and-infrastructure">hosting and infrastructure</a>
— our hosting, content delivery, database, and email delivery providers
— and only as far as they need it to perform that work. Self-hosted
Matomo analytics is operated by us on infrastructure we control; we do
not share that data with third parties. We may also disclose
information where the law requires it or to protect the rights and
safety of our users.
</p>
<h2>Retention</h2>
@@ -187,6 +230,16 @@
reasonable period, except where we must keep records for legal, security,
or accounting reasons. We retain raw analytics data for up to 180 days.
</p>
<p>
Two exceptions are worth naming. If you unsubscribe from the mailing
list, or ask us not to email you, we keep your address on a suppression
list so that we do not contact you again; we hold only what is needed to
recognise the address. We also keep database backups for disaster
recovery, stored off the primary server, so a deleted account may remain
in a backup for some time after deletion. We do not use backups to
restore individual accounts, and we delete them once they are no longer
needed.
</p>
<h2>Your rights</h2>
<p>
@@ -199,13 +252,6 @@
authority.
</p>
<h2>Children</h2>
<p>
The service is not directed at children under 13, and we do not knowingly
collect their personal information. If you believe a child has created an
account, contact us and we will remove it.
</p>
<h2>Changes</h2>
<p>
We may update this policy as the service changes. When we do, we will
@@ -232,6 +278,7 @@
<nav class="footer-links" aria-label="Legal">
<a href="/privacy">Privacy</a>
<a href="/terms-conditions">Terms</a>
<a href="/mentions-legales">Mentions légales</a>
</nav>
<small>&copy; 2026 Inner Square Chess</small>
</footer>
+12 -1
View File
@@ -36,13 +36,19 @@
<main id="main-content">
<article class="legal">
<h1>Terms &amp; Conditions</h1>
<p class="legal-meta">Last updated: 6 November 2026</p>
<p class="legal-meta">Last updated: 10 November 2026</p>
<p>
These terms govern your use of Inner Square Chess. By browsing the site,
using the guest trainer, or creating an account, you agree to them. If you
do not agree, please do not use the service.
</p>
<p>
Inner Square Chess is operated by Owen REES, entrepreneur individuel (EI),
established in France, business register number (SIRET)
929&nbsp;553&nbsp;774&nbsp;00019. Full publisher details are on the
<a href="/mentions-legales">mentions légales</a> page.
</p>
<h2>The service</h2>
<p>
@@ -60,6 +66,10 @@
<h2>Accounts</h2>
<ul>
<li>You must be at least 13 years old to create an account.</li>
<li>
If you are under 16 and in the UK or EU, you may only use an account
with the consent of a parent or guardian.
</li>
<li>Give accurate information and keep it up to date.</li>
<li>Keep your password private and tell us promptly about unauthorised use.</li>
<li>You are responsible for activity that happens under your account.</li>
@@ -163,6 +173,7 @@
<nav class="footer-links" aria-label="Legal">
<a href="/privacy">Privacy</a>
<a href="/terms-conditions">Terms</a>
<a href="/mentions-legales">Mentions légales</a>
</nav>
<small>&copy; 2026 Inner Square Chess</small>
</footer>
@@ -186,6 +186,7 @@ defmodule ChesstrainerWeb.Layouts do
<nav class="footer-links" aria-label="Footer">
<a href="/privacy">Privacy Policy</a>
<a href="/terms-conditions">Terms & Conditions</a>
<a href="/mentions-legales">Mentions légales</a>
</nav>
<small>© {@year} {Branding.name()}</small>
@@ -57,6 +57,19 @@ defmodule ChesstrainerWeb.PageController do
|> render(:terms_conditions)
end
def mentions_legales(conn, _params) do
conn
|> assign(:js_entry, ~p"/assets/js/marketing.js")
|> assign(:page_title, Branding.title("Mentions légales"))
|> assign(:title_suffix, "")
|> assign(
:meta_description,
"Éditeur, hébergeur et informations légales de #{Branding.name()}."
)
|> assign(:canonical_url, current_url(conn))
|> render(:mentions_legales)
end
def not_found(conn, _params) do
conn
|> put_status(:not_found)
@@ -0,0 +1,54 @@
<Layouts.flash_group flash={@flash} />
<main>
<article class="legal" lang="fr">
<h1>Mentions légales</h1>
<p class="legal-meta">Dernière mise à jour : 10 novembre 2026</p>
<p>
Ces mentions sont publiées en application de l'article 6-III de la loi
n° 2004-575 du 21 juin 2004 pour la confiance dans l'économie numérique.
</p>
<h2>Éditeur du site</h2>
<p>
Le site <a href="/">innersquare.app</a>, édité sous le nom commercial
«&nbsp;{Branding.name()}&nbsp;», est édité par&nbsp;:
</p>
<ul>
<li><strong>Owen REES</strong>, entrepreneur individuel (EI)</li>
<%!-- <li>Adresse&nbsp;: [adresse à compléter]</li> --%>
<li>SIRET&nbsp;: 929 553 774 00019</li>
<li>Téléphone&nbsp;: <a href="tel:+33683019513">+33 6 83 01 95 13</a></li>
<li>
Courriel&nbsp;:
<a href={"mailto:" <> Branding.support_email()}>{Branding.support_email()}</a>
/ <a href="mailto:owenrees.dev@gmail.com">owenrees.dev@gmail.com</a>
</li>
<li>TVA non applicable, article 293 B du Code général des impôts.</li>
</ul>
<h2>Directeur de la publication</h2>
<p>Owen REES.</p>
<h2>Hébergeur</h2>
<p>
Hetzner Online GmbH<br /> Industriestraße 25<br /> 91710 Gunzenhausen<br /> Allemagne<br />
Téléphone&nbsp;: <a href="tel:+4998315050">+49 9831 505-0</a>
</p>
<h2>Propriété intellectuelle</h2>
<p>
Les contenus du site — textes, interface, code, éléments graphiques, ainsi
que les positions et solutions d'échecs — sont protégés par le droit
d'auteur et restent la propriété de l'éditeur ou de ses concédants. Toute
reproduction ou réutilisation non autorisée est interdite.
</p>
<h2>Données personnelles</h2>
<p>
Les données traitées, les finalités, les durées de conservation et vos
droits sont décrits dans la <a href="/privacy">politique de confidentialité</a>, disponible en anglais.
</p>
</article>
</main>
@@ -12,6 +12,16 @@
guest trainer.
</p>
<h2>Data controller</h2>
<p>
The controller responsible for your personal information is Owen REES, an
entrepreneur individuel (EI) established in France, trading as {Branding.name()}. Our business register number (SIRET) is
929&nbsp;553&nbsp;774&nbsp;00019. You can contact us about anything in this
policy, or about your data, at
<a href={"mailto:" <> Branding.support_email()}>{Branding.support_email()}</a>
or <a href="tel:+33683019513">+33 6 83 01 95 13</a>.
</p>
<h2>What we collect</h2>
<ul>
<li>
@@ -33,17 +43,18 @@
</li>
<li>
<strong>Technical data.</strong>
Our hosting and server infrastructure may keep standard request logs
(IP address, browser, timestamps) for security and troubleshooting.
These logs are rotated regularly.
We do not keep our own access logs. The companies that host the site
and run our content delivery network keep short-lived request logs
(IP address, browser, timestamps) for security, abuse prevention, and
troubleshooting, under their own retention policies.
</li>
<li>
<strong>Usage data.</strong>
On public pages and the guest trainer, we use a self-hosted Matomo
instance to understand aggregate usage. Matomo is configured without
cookies, with IP anonymisation, and to respect Do Not Track. We do not
use user IDs, track signed-in account pages, or share this data with
third parties.
cookies, with IP addresses shortened before storage, and to respect Do
Not Track. We do not use user IDs, track signed-in account pages, or
share this data with third parties.
</li>
<li>
<strong>Messages you send us.</strong>
@@ -60,6 +71,10 @@
<ul>
<li>a session cookie that keeps you signed in;</li>
<li>a CSRF token that protects forms from cross-site requests;</li>
<li>
a security cookie that our content delivery network, Cloudflare, may set
when it checks that a request is not automated abuse;
</li>
<li>a colour-mode preference stored in your browser.</li>
<li>
an analytics opt-out preference stored in your browser's local storage,
@@ -67,11 +82,12 @@
</li>
</ul>
<p>
We do not use advertising cookies, third-party analytics, or cross-site
tracking. Our analytics is self-hosted Matomo and is configured without
cookies. You can clear these entries at any time in your browser settings;
doing so will sign you out, reset your colour mode, and reset your
analytics preference.
We do not use advertising cookies, analytics cookies, or cross-site
tracking. The only cookie not set by this site is Cloudflare's security
check described above; our analytics is self-hosted Matomo and is
configured without cookies. You can clear these entries at any time in
your browser settings; doing so will sign you out, reset your colour mode,
and reset your analytics preference.
</p>
<h2>Analytics</h2>
@@ -79,9 +95,9 @@
We use a self-hosted Matomo instance at
<a href="https://analytics.owenrees.eu/">analytics.owenrees.eu</a>
to understand aggregate use of the public site and guest trainer. It is
configured without cookies, with IP anonymisation, and to respect Do Not
Track. We do not use user IDs, track signed-in account pages, or share
this data with third parties.
configured without cookies, with IP addresses shortened before storage,
and to respect Do Not Track. We do not use user IDs, track signed-in
account pages, or share this data with third parties.
</p>
<p>
Raw analytics data is retained for up to 180 days. We process it on the
@@ -148,15 +164,38 @@
to object to this processing; to do so, contact us using the address below.
</p>
<h2 id="hosting-and-infrastructure">Hosting and infrastructure</h2>
<p>
The site runs on a virtual private server operated for us by Hetzner
inside the European Union. Our database runs on the same server, our
transactional email is sent through Amazon SES in the EU, and our
self-hosted Matomo analytics runs on infrastructure we control in the EU.
</p>
<p>
We also use Cloudflare as our content delivery network and security proxy.
Because Cloudflare sits between your browser and our server, it processes
your IP address, the requested URL, and request headers. Cloudflare is a
US company, so that request data may be transferred outside the UK and
EEA. The transfer relies on the EU–US Data Privacy Framework and standard
contractual clauses. Cloudflare and Hetzner each keep their own logs
under their own retention policies; we do not receive or keep them.
</p>
<p>
These providers act as our processors under data protection law. We share
with them only what they need to run the service, and we remain
responsible for how your information is handled.
</p>
<h2>Sharing</h2>
<p>
We do not sell your personal information. We share it only with providers
who help us run the site — for example hosting, database, and email
delivery providers — and only as far as they need it to perform that work.
Self-hosted Matomo analytics is operated by us on infrastructure we
control; we do not share that data with third parties. We may also
disclose information where the law requires it or to protect the rights
and safety of our users.
We do not sell your personal information. We share it only with the
providers described under
<a href="#hosting-and-infrastructure">hosting and infrastructure</a>
— our hosting, content delivery, database, and email delivery providers —
and only as far as they need it to perform that work. Self-hosted Matomo
analytics is operated by us on infrastructure we control; we do not share
that data with third parties. We may also disclose information where the
law requires it or to protect the rights and safety of our users.
</p>
<h2>Retention</h2>
@@ -166,6 +205,15 @@
reasonable period, except where we must keep records for legal, security,
or accounting reasons. We retain raw analytics data for up to 180 days.
</p>
<p>
Two exceptions are worth naming. If you unsubscribe from the mailing list,
or ask us not to email you, we keep your address on a suppression list so
that we do not contact you again; we hold only what is needed to recognise
the address. We also keep database backups for disaster recovery, stored
off the primary server, so a deleted account may remain in a backup for
some time after deletion. We do not use backups to restore individual
accounts, and we delete them once they are no longer needed.
</p>
<h2>Your rights</h2>
<p>
@@ -178,13 +226,6 @@
authority.
</p>
<h2>Children</h2>
<p>
The service is not directed at children under 13, and we do not knowingly
collect their personal information. If you believe a child has created an
account, contact us and we will remove it.
</p>
<h2>Changes</h2>
<p>
We may update this policy as the service changes. When we do, we will
@@ -3,13 +3,20 @@
<main>
<article class="legal">
<h1>Terms &amp; Conditions</h1>
<p class="legal-meta">Last updated: 6 November 2026</p>
<p class="legal-meta">Last updated: 10 November 2026</p>
<p>
These terms govern your use of {Branding.name()}. By browsing the site, using
the guest trainer, or creating an account, you agree to them. If you do not
agree, please do not use the service.
</p>
<p>
{Branding.name()} is operated by Owen REES, entrepreneur individuel (EI),
established in France, business register number (SIRET)
929&nbsp;553&nbsp;774&nbsp;00019. Full publisher details are on the
<a href="/mentions-legales">mentions légales</a>
page.
</p>
<h2>The service</h2>
<p>
@@ -26,6 +33,10 @@
<h2>Accounts</h2>
<ul>
<li>You must be at least 13 years old to create an account.</li>
<li>
If you are under 16 and in the UK or EU, you may only use an account
with the consent of a parent or guardian.
</li>
<li>Give accurate information and keep it up to date.</li>
<li>Keep your password private and tell us promptly about unauthorised use.</li>
<li>You are responsible for activity that happens under your account.</li>
@@ -14,7 +14,8 @@ defmodule ChesstrainerWeb.SitemapController do
urls = [
url(conn, ~p"/"),
url(conn, ~p"/privacy"),
url(conn, ~p"/terms-conditions")
url(conn, ~p"/terms-conditions"),
url(conn, ~p"/mentions-legales")
]
conn
+1
View File
@@ -15,6 +15,7 @@ defmodule ChesstrainerWeb.Plugs.Prelaunch do
/
/privacy
/terms-conditions
/mentions-legales
/health
/robots.txt
/sitemap.xml
+1
View File
@@ -33,6 +33,7 @@ defmodule ChesstrainerWeb.Router do
get "/", PageController, :home
get "/privacy", PageController, :privacy
get "/terms-conditions", PageController, :terms_conditions
get "/mentions-legales", PageController, :mentions_legales
post "/mailing-list", MailingListController, :create
get "/mailing-list/confirm/:token", MailingListController, :confirm
post "/admin/log-in", UserSessionController, :create_admin
@@ -109,6 +109,11 @@ defmodule ChesstrainerWeb.PageControllerTest do
assert html =~ "Guest puzzle limit"
assert html =~ "HMAC-SHA256"
assert html =~ "Article 6(1)(f) GDPR"
assert html =~ "Hosting and infrastructure"
assert html =~ "Cloudflare"
assert html =~ "Data controller"
assert html =~ "suppression list"
refute html =~ "not directed at children"
assert LazyHTML.text(LazyHTML.query(document, "title")) ==
Branding.title("Privacy Policy")
@@ -124,10 +129,11 @@ defmodule ChesstrainerWeb.PageControllerTest do
document = LazyHTML.from_document(html)
assert LazyHTML.text(LazyHTML.query(document, "h1")) == "Terms & Conditions"
assert html =~ "Last updated: 6 November 2026"
assert html =~ "Last updated: 10 November 2026"
assert html =~ "Acceptable use"
assert html =~ "Governing law"
assert html =~ "fixed number of puzzles per UTC day"
assert html =~ "consent of a parent or guardian"
assert html =~ ~p"/privacy"
assert LazyHTML.text(LazyHTML.query(document, "title")) ==
@@ -139,6 +145,27 @@ defmodule ChesstrainerWeb.PageControllerTest do
assert URI.parse(canonical).path == "/terms-conditions"
end
test "GET /mentions-legales renders the French legal notice", %{conn: conn} do
html = conn |> get(~p"/mentions-legales") |> html_response(200)
document = LazyHTML.from_document(html)
assert LazyHTML.text(LazyHTML.query(document, "h1")) == "Mentions légales"
assert html =~ "Owen REES"
assert html =~ "929"
assert html =~ "293 B"
assert html =~ "Hetzner Online GmbH"
assert html =~ "Directeur de la publication"
assert html =~ ~p"/privacy"
assert LazyHTML.text(LazyHTML.query(document, "title")) ==
Branding.title("Mentions légales")
assert [canonical] =
LazyHTML.attribute(LazyHTML.query(document, ~s(link[rel="canonical"])), "href")
assert URI.parse(canonical).path == "/mentions-legales"
end
test "branding is read from application config", %{conn: conn} do
previous = Application.get_env(:chesstrainer, :branding)
@@ -13,7 +13,8 @@ defmodule ChesstrainerWeb.SitemapControllerTest do
assert body =~ "<loc>#{base_url}/</loc>"
assert body =~ "<loc>#{base_url}/privacy</loc>"
assert body =~ "<loc>#{base_url}/terms-conditions</loc>"
assert length(:binary.matches(body, "<url>")) == 3
assert body =~ "<loc>#{base_url}/mentions-legales</loc>"
assert length(:binary.matches(body, "<url>")) == 4
end
test "is served as XML", %{conn: conn} do