frontend: add home template
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
11ba676828
commit
3cbda5fc65
4 changed files with 167 additions and 93 deletions
23
src/frontend/templates/home.html
Normal file
23
src/frontend/templates/home.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue