mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-28 05:21:14 +00:00
44 lines
1.6 KiB
HTML
44 lines
1.6 KiB
HTML
{% extends "_layout.html" %}
|
|
|
|
{%- block title -%}
|
|
{%- match lang -%}
|
|
{%- when Lang::en -%} Hello, {{name}}!
|
|
{%- when Lang::de -%} Hallo, {{name}}!
|
|
{%- when Lang::fr -%} Bonjour, {{name}}!
|
|
{%- endmatch -%}
|
|
{%- endblock -%}
|
|
|
|
{%- block content -%}
|
|
<h1>
|
|
{%- match lang -%}
|
|
{%- when Lang::en -%} Hello!
|
|
{%- when Lang::de -%} Hallo!
|
|
{%- when Lang::fr -%} Bonjour!
|
|
{%- endmatch -%}
|
|
</h1>
|
|
<p>
|
|
{%- match lang -%}
|
|
{%- when Lang::en -%}
|
|
Hello, <strong>{{name}}</strong>, nice to meet you! {#-~#}
|
|
I'm a <a href="https://askama.readthedocs.io/">Askama</a> example application.
|
|
{%- when Lang::de -%}
|
|
Hallo, <strong>{{name}}</strong>, schön dich kennenzulernen! {#-~#}
|
|
Ich bin eine <a href="https://askama.readthedocs.io/">Askama</a>-Beispielanwendung.
|
|
{%- when Lang::fr -%}
|
|
Bonjour, <strong>{{name}}</strong>, ravi de vous rencontrer ! {#-~#}
|
|
Je suis une application d'exemple de <a href="https://askama.readthedocs.io/">Askama</a>.
|
|
{%- endmatch -%}
|
|
</p>
|
|
<h2>
|
|
<a href="/{{ lang }}/index.html?name={{ name | urlencode }}">
|
|
{%- 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 -%}
|
|
</a>
|
|
</h2>
|
|
|
|
{%- call lang_select("greet-me", name|urlencode|fmt("?name={}")) -%}{%- endcall -%}
|
|
{%- endblock -%}
|