From cf94c09e328d0cc0db2e405a9d562d6b2dc2cfb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20Kijewski?=
@@ -22,6 +24,9 @@
{%- when Lang::de -%}
Hallo, {{name}}, schön dich kennenzulernen! {#-~#}
Ich bin eine Rinja-Beispielanwendung.
+ {%- when Lang::fr -%}
+ Bonjour, {{name}}, ravi de vous rencontrer ! {#-~#}
+ Je suis une application d'exemple de Rinja.
{%- endmatch -%}
404: Not Found
Back to the first page.
-{%- endblock %}
+{%- endblock -%}
diff --git a/examples/actix-web-app/templates/_layout.html b/examples/actix-web-app/templates/_layout.html
index 5a0d11cd..4f8360c8 100644
--- a/examples/actix-web-app/templates/_layout.html
+++ b/examples/actix-web-app/templates/_layout.html
@@ -43,6 +43,24 @@
font-size: 80%;
width: max-content;
margin: 2em 0 0 auto;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ }
+ #lang-select li {
+ flex-grow: 1;
+ flex-basis: auto;
+ margin: .25em 0 0 0;
+ padding: 0 1em;
+ text-align: center;
+ list-style-type: none;
+ border-left: 0.1rem solid currentColor;
+ }
+ #lang-select li:first-of-type {
+ border-left: 0 none transparent;
+ }
+ #lang-select li:last-of-type {
+ padding-right: 0;
}
/*]]>*/
diff --git a/examples/actix-web-app/templates/greet.html b/examples/actix-web-app/templates/greet.html
index 1ff47f4c..3ae70f05 100644
--- a/examples/actix-web-app/templates/greet.html
+++ b/examples/actix-web-app/templates/greet.html
@@ -1,17 +1,19 @@
{% extends "_layout.html" %}
-{% block title -%}
+{%- block title -%}
{%- match lang -%}
{%- when Lang::en -%} Hello, {{name}}!
{%- when Lang::de -%} Hallo, {{name}}!
+ {%- when Lang::fr -%} Bonjour, {{name}}!
{%- endmatch -%}
-{%- endblock %}
+{%- endblock -%}
{%- block content -%}
{%- match lang -%}
- {%- when Lang::en -%} Hello
- {%- when Lang::de -%} Hallo
+ {%- when Lang::en -%} Hello!
+ {%- when Lang::de -%} Hallo!
+ {%- when Lang::fr -%} Bonjour!
{%- endmatch -%}
@@ -29,6 +34,7 @@
{%- match lang -%}
{%- when Lang::en -%} Back to the first page.
{%- when Lang::de -%} Zurück zur ersten Seite.
+ {%- when Lang::fr -%} Retour à la première page.
{%- endmatch -%}
@@ -40,5 +46,8 @@
{%- if lang != Lang::de -%}
{%- match lang -%}
- {%- when Lang::en -%} Hello
- {%- when Lang::de -%} Hallo
+ {%- when Lang::en -%} Hello!
+ {%- when Lang::de -%} Hallo!
+ {%- when Lang::fr -%} Bonjour!
{%- endmatch -%}
@@ -34,6 +39,7 @@ {%- match lang -%} {%- when Lang::en -%} My name is {%- when Lang::de -%} Ich heiße + {%- when Lang::fr -%} Je m'appelle {%- endmatch -%}: @@ -63,5 +70,8 @@ {%- if lang != Lang::de -%}