2023-06-20 16:00:12 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2023-08-05 15:50:40 +00:00
|
|
|
<title>Holiday-api | Admin dashboard</title>
|
|
|
|
<link rel="stylesheet" href="/assets/style.css">
|
|
|
|
<script src="/assets/global.js"></script>
|
2023-06-20 16:00:12 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2023-08-05 15:50:40 +00:00
|
|
|
<div id="dialog-container"></div>
|
|
|
|
<header>
|
|
|
|
<section class="container">
|
|
|
|
<h1><a href="/">Holiday-api | {{.Search.Date.Format "2006-01-02"}}</a></h1>
|
|
|
|
</section>
|
|
|
|
</header>
|
|
|
|
<nav>
|
|
|
|
<section class="container">
|
|
|
|
<a href="/">Search</a>
|
|
|
|
<a href="/documentation">Documentation</a>
|
|
|
|
<a class="selected" href="#">For date</a>
|
|
|
|
</section>
|
|
|
|
</nav>
|
|
|
|
<main>
|
|
|
|
<section id="search">
|
|
|
|
<article class="card">
|
|
|
|
<h2 style="margin-right: 1em;">Is it a holiday?</h2>
|
|
|
|
<form method="get" action="/search">
|
|
|
|
<section>
|
|
|
|
<label for="country">Country:</label>
|
|
|
|
<select id="country" name="country">
|
2023-08-05 19:34:09 +00:00
|
|
|
{{range $entry := .Countries}}
|
|
|
|
<option {{if eq $.Search.Country $entry.IsoName}}selected{{end}} value="{{$entry.IsoName}}">{{$entry.Name}}</option>
|
|
|
|
{{end}}
|
2023-08-05 15:50:40 +00:00
|
|
|
</select>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<label for="date">Date:</label>
|
|
|
|
<input id="date" value="{{.Search.Date.Format "2006-01-02"}}" name="date" type="date" required>
|
|
|
|
</section>
|
|
|
|
<section class="actions">
|
|
|
|
<button style="width: 100%;" type="submit">Check is a holiday</button>
|
|
|
|
</section>
|
|
|
|
</form>
|
|
|
|
</article>
|
|
|
|
</section>
|
|
|
|
<section id="results">
|
|
|
|
<h2 style="margin-bottom: 1em;">Results</h2>
|
2023-06-20 16:00:12 +00:00
|
|
|
{{range $entry := .Holidays}}
|
2023-08-05 15:50:40 +00:00
|
|
|
<article class="single-holiday">
|
|
|
|
<table class="clean">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<th>Name: </th>
|
|
|
|
<td>{{$entry.Name}}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Description: </th>
|
|
|
|
<td>{{$entry.Description}}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Is state holiday: </th>
|
2023-12-31 12:35:29 +00:00
|
|
|
<td><img class="icon" src="{{if $entry.IsStateHoliday}}/assets/icons/done-v.svg{{else}}/assets/images/close-x.svg{{end}}"></td>
|
2023-08-05 15:50:40 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Is religious holiday: </th>
|
2023-12-31 12:35:29 +00:00
|
|
|
<td><img class="icon" src="{{if $entry.IsReligiousHoliday}}/assets/icons/done-v.svg{{else}}/assets/images/close-x.svg{{end}}"></td>
|
2023-08-05 15:50:40 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</article>
|
2023-06-20 16:00:12 +00:00
|
|
|
{{end}}
|
2023-08-05 15:50:40 +00:00
|
|
|
</section>
|
|
|
|
</main>
|
2023-06-20 16:00:12 +00:00
|
|
|
</body>
|
|
|
|
</html>
|