1
0
mirror of https://github.com/actix/examples synced 2025-06-27 01:27:43 +02:00

restructure folders

This commit is contained in:
Rob Ede
2022-02-18 02:01:48 +00:00
parent 4d8573c3fe
commit cc3d356209
201 changed files with 52 additions and 49 deletions

View File

@ -0,0 +1,16 @@
{{!
Form: What is your name?
!}}
{{> ../deep/welcome id = "welcome", tag = "h1", tail = '!' ~}}
<div>
<h3>What is your name?</h3>
<form>
{{! Input name !}}
Name: <input type="text" name="name" /><br/>
{{! Input last name !}}
Last name: <input type="text" name="lastname"/><br/>
<p>
<input type="submit">
</p>
</form>
</div>

View File

@ -0,0 +1,8 @@
{{!
Hi message:
args:
- lastname
- name
!}}
<h1>Hi, {{ name }} {{ lastname }}!</h1>
{{~> alias/welcome id = "hi", tag = 'p', tail = "" }}

View File

@ -0,0 +1,11 @@
{{!
Welcome card:
args:
- tag
- 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

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

View File

@ -0,0 +1 @@
<!DOCTYPE html>