/
20fish.html
51 lines (47 loc) · 967 Bytes
/
20fish.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<head>
<title>Fishy</title>
</head>
<body>
{{> header}}
{{> query}}
</body>
<template name="header">
<header>
<img alt="Fishy"
src="./logo.png"/>
</header>
</template>
<template name="query">
<section>
<form>
<div>
<button>Use my current location.</button>
</div>
<br/>
<div>
<input type="text" name="address"/>
</div>
</form>
</section>
<section>
{{location}}
</section>
<section>
{{#each fishes}}
{{> fish}}
{{/each}}
</section>
</template>
<template name="fish">
<div class="fish">
<a href="{{link}}" target="_blank">
{{#if name}}
<h3>{{name}}</h3>
{{/if}}
<h3>{{sciname}}</h3>
</a>
{{#if image}}
<img src="{{image}}"/>
{{/if}}
</div>
</template>