Skip to content

Commit 7aaad58

Browse files
odelcroimcalinghee
andauthored
Feat/add favicon and html page title (#53)
* add favicon and title to app and main * move comments * correct license * correct license --------- Co-authored-by: mcalinghee <[email protected]>
1 parent bd1aa37 commit 7aaad58

File tree

5 files changed

+60
-5
lines changed

5 files changed

+60
-5
lines changed

frontend/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
<head>
1414
<meta charset="UTF-8" />
1515
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
16-
<title>matrix-authentication-service</title>
16+
<!-- :tchap: -->
17+
<title>Tchap</title>
18+
<link rel="icon" href="https://www.tchap.gouv.fr/vector-icons/favicon.e336df8.ico">
19+
<!-- :tchap: -->
1720
<script type="application/javascript">
1821
window.APP_CONFIG = JSON.parse(
1922
'{"root": "/account/", "graphqlEndpoint": "/graphql"}',

tchap/resources/templates/app.html

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{#
2+
MIT License
3+
4+
Copyright (c) 2025, Direction interministérielle du numérique - Gouvernement
5+
Français
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to
9+
deal in the Software without restriction, including without limitation the
10+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
11+
sell copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in
15+
all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
21+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
22+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
23+
USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
-#}
25+
26+
{# Must be kept in sync with frontend/index.html #}
27+
{% set _ = translator(lang) %}
28+
29+
<!DOCTYPE html>
30+
<html lang="{{ lang }}">
31+
<head>
32+
<meta charset="UTF-8" />
33+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
34+
<title>{{ _("app.name") }}</title>
35+
<!-- :tchap: -->
36+
<link rel="icon" href="https://www.tchap.gouv.fr/vector-icons/favicon.e336df8.ico">
37+
<!-- :tchap: -->
38+
{% set config = {
39+
'graphqlEndpoint': app_config.graphqlEndpoint,
40+
'root': app_config.root,
41+
} -%}
42+
<script>
43+
window.APP_CONFIG = JSON.parse("{{ config | tojson | add_slashes | safe }}");
44+
</script>
45+
{{ include_asset('src/main.tsx') | indent(4) | safe }}
46+
</head>
47+
48+
<body>
49+
<div id="root"></div>
50+
</body>
51+
</html>

tchap/resources/templates/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
{{ include_asset('src/templates.css') | indent(4) | safe }}
2929

3030
<!-- :tchap: -->
31+
<link rel="icon" href="https://www.tchap.gouv.fr/vector-icons/favicon.e336df8.ico">
3132
{{ include_asset('tchap/css/tchap.css') | indent(4) | safe }}
3233
{{ include_asset('node_modules/@gouvfr-lasuite/integration/dist/css/homepage-full.css') | indent(4) | safe }}
3334
<script id="lasuite-gaufre-script" async defer src="https://integration.lasuite.numerique.gouv.fr/api/v1/gaufre.js"></script>

tchap/resources/translations/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
}
3535
},
3636
"app": {
37-
"human_name": "Matrix Authentication Service",
37+
"human_name": "Tchap",
3838
"@human_name": {
3939
"context": "index.html:15:29-48, pages/index.html:15:29-48",
4040
"description": "Human readable name of the application"
4141
},
42-
"name": "matrix-authentication-service",
42+
"name": "Tchap",
4343
"@name": {
4444
"context": "app.html:17:14-27, base.html:25:31-44",
4545
"description": "Name of the application"

tchap/resources/translations/fr.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"submit": "Soumettre"
1212
},
1313
"app": {
14-
"human_name": "Matrix Authentication Service",
15-
"name": "matrix-authentication-service",
14+
"human_name": "Tchap",
15+
"name": "Tchap",
1616
"technical_description": "Document de découverte OpenID Connect : <a class=\"cpd-link\" data-kind=\"primary\" href=\"%(discovery_url)s\">%(discovery_url)s</a>"
1717
},
1818
"branding": {

0 commit comments

Comments
 (0)