1
0
mirror of https://github.com/actix/examples synced 2025-06-29 18:24:57 +02:00

Update yarte version to 0.8

This commit is contained in:
Juan Aguilar Santillana
2020-04-28 21:18:18 +02:00
parent 8dab533b40
commit a65abad80d
7 changed files with 44 additions and 41 deletions

View File

@ -3,10 +3,7 @@
!}}
{{> ../deep/welcome id = "welcome", tag = "h1", tail = '!' ~}}
<div>
{{! Title !}}
<h3>What is your name?</h3>
{{! Form !}}
<form>
{{! Input name !}}
Name: <input type="text" name="name" /><br/>

View File

@ -5,4 +5,7 @@
- id
- tail
!}}
{{#unless tag.is_match(r"^p|(h[1-6])$") && !id.is_empty() }}
{{$ "Need static args: tag: str /^h[1-6]$/, id: str" }}
{{/unless }}
<{{ tag }} id="{{ id }}" class="welcome">Welcome{{ tail }}</{{ tag }}>

View File

@ -1,3 +1,6 @@
{{# unless title.is_str() && !title.is_empty() }}
{{$ "Need static args: title: str" }}
{{/unless}}
<head>
<meta charset="utf-8"/>
<title>{{ title }}</title>