mirror of
https://github.com/actix/examples
synced 2025-06-29 02:10:36 +02:00
Update template_yarte (#190)
This commit is contained in:
committed by
Yuki Okushi
parent
dc6e1cc762
commit
663f8a64a8
10
template_yarte/templates/body.hbs
Normal file
10
template_yarte/templates/body.hbs
Normal file
@ -0,0 +1,10 @@
|
||||
<body>
|
||||
|
||||
{{~#if let Some(name) = query.get("name") }}
|
||||
{{ let lastname = query.get("lastname").ok_or(yarte::Error)? }}
|
||||
{{> card/hi ~}}
|
||||
{{ else ~}}
|
||||
{{> card/form ~}}
|
||||
{{/if ~}}
|
||||
|
||||
</body>
|
@ -1,12 +1,8 @@
|
||||
{{! Simple example !}}
|
||||
{{> doc/t ~}}
|
||||
<html>
|
||||
{{~> doc/head title = "Actix web" ~}}
|
||||
<body>
|
||||
{{~#if let Some(name) = query.get("name") }}
|
||||
{{ let lastname = query.get("lastname").ok_or(yarte::Error)? }}
|
||||
{{> card/hi ~}}
|
||||
{{ else ~}}
|
||||
{{> card/form ~}}
|
||||
{{/if ~}}
|
||||
</body></html>
|
||||
|
||||
{{~> doc/head title = "Actix web" }}
|
||||
{{~> body ~}}
|
||||
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user