1
0
mirror of https://github.com/actix/examples synced 2024-11-28 08:22:39 +01:00
examples/template_yarte/templates/index.hbs
Juan Aguilar Santillana 7ed8d19b66 Add template yarte
2019-03-12 21:15:53 +01:00

23 lines
442 B
Handlebars

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Actix web</title>
</head>
<body>
{{~#if let Some(name) = query.get("name") ~}}
<h1>Hi, {{ name }}!</h1>
{{~> alias/welcome tag='p' ~}}
{{~ else ~}}
{{~> alias/welcome tag="h1" ~}}
<p>
<h3>What is your name?</h3>
<form>
<input type="text" name="name"/><br/>
<p><input type="submit"></p>
</form>
</p>
{{~/if~}}
</body>
</html>