mirror of
https://github.com/actix/examples
synced 2025-06-27 01:27:43 +02:00
add fluent templates example
This commit is contained in:
10
templating/fluent/templates/error.html
Normal file
10
templating/fluent/templates/error.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{{ error }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{ status_code }} {{ error }}</h1>
|
||||
</body>
|
||||
</html>
|
11
templating/fluent/templates/index.html
Normal file
11
templating/fluent/templates/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ fluent "home-title" }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>{{ fluent "home-title" }}</h1>
|
||||
<p>{{ fluent "home-description" }}</p>
|
||||
</body>
|
||||
</html>
|
12
templating/fluent/templates/user.html
Normal file
12
templating/fluent/templates/user.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>{{ fluent "user-title" name=user }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>{{ fluent "user-welcome" name=user }}</h1>
|
||||
<p>{{ fluent "user-data" data=data }}</p>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user