mirror of
https://github.com/actix/examples
synced 2025-06-29 02:10:36 +02:00
Add tiny_template as an example. (#358)
This commit is contained in:
10
template_tinytemplate/templates/error.html
Normal file
10
template_tinytemplate/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>
|
17
template_tinytemplate/templates/index.html
Normal file
17
template_tinytemplate/templates/index.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Actix web</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome!</h1>
|
||||
<p>
|
||||
<h3>What is your name?</h3>
|
||||
<form>
|
||||
<input type="text" name="name" /><br/>
|
||||
<p><input type="submit"></p>
|
||||
</form>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
11
template_tinytemplate/templates/user.html
Normal file
11
template_tinytemplate/templates/user.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Actix web</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hi, {name}!</h1>
|
||||
<p>{text}</p>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user