holiday-api/templates/search_date.gohtml

43 lines
1.0 KiB
Plaintext
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Holiday-api</title>
</head>
<body>
<h1><a href="/">Holiday-api</a></h1>
<p>{{if .Holidays}}Yes it is a holday{{else}}No it isn't a holiday{{end}}</p>
<p>Search results</p>
<div>
{{if .Holidays}}
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Date</th>
<th>State holiday</th>
<th>Religious holiday</th>
</tr>
</thead>
<tbody>
{{range $entry := .Holidays}}
<tr>
<td>{{$entry.Name}}</td>
<td>{{$entry.Description}}</td>
<td>{{$entry.Date.Format "2006-01-02"}}</td>
<td>{{$entry.IsStateHoliday}}</td>
<td>{{$entry.IsReligiousHoliday}}</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}
</div>
</body>
</html>