frontend: add home template

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2018-06-24 23:28:44 -07:00
parent 11ba676828
commit 3cbda5fc65
4 changed files with 167 additions and 93 deletions

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Hipster Shop</title>
</head>
<body>
<form method="post" action="/setCurrency" id="currencySelector">
<select name="currency_code"
onchange="document.getElementById('currencySelector').submit()">
{{ range $.currencies }}
<option {{ if (eq . $.user_currency)}}selected="selected"{{end}}>{{.}}</option>
{{ end}}
</select>
</form>
<p>{{ len $.products }} products</p>
</body>
</html>