holiday-api/templates/documentation.gohtml

124 lines
5.9 KiB
Plaintext

<!DOCTYPE html>
<html lang="hr">
<head>
<title>Holiday-api | Api dokumentacija</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Preuzmi praznike za neki vremenski raspon programski u JSON, XML ili CSV formatu"/>
<link rel="icon" href="/assets/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="/assets/global.css">
<script src="/assets/global.js"></script>
<script src="/assets/documentation.js"></script>
<style>
.dropdown-content a {
all: unset;
display: block;
padding: 0.5em 1em;
}
.dropdown-content a:hover {
background: rgba(95, 158, 160, 0.2);
}
</style>
</head>
<body>
<div class="background-image" style="position: fixed;"></div>
<header>
<h1><a href="/">Holiday-api</a> | Dokumentacija</h1>
</header>
<main class="dialog documentation-dialog">
<section style="margin-bottom: 1em;">
<section id="query">
<article class="card" style="margin: 1em;">
<form id="query-generator">
<input type="hidden" id="country" name="country" value="HR">
<section class="form-field">
<label for="content-type">Format</label>
<select id="content-type" name="content-type">
<option value="json">JSON</option>
<option value="xml">XML</option>
<option value="csv">CSV</option>
</select>
</section>
<article class="optional-selector">
<div class="header">
<section class="form-field">
<label for="date-selector">Izbornik</label>
<select data-type="section-selector" data-selector-prefix="date-selector" id="date-selector" name="date-selector">
<option value="year">Za godinu</option>
<option value="date">Za datum</option>
<option value="range">Za raspon datuma</option>
<option value="all">Svi</option>
</select>
</section>
</div>
<div data-section-id="date-selector-year">
<section class="form-field">
<label for="dsy-year">Godina</label>
<select id="dsy-year" name="year">
{{range $entry := .Years}}
<option {{if eq $.Year $entry}}selected{{end}} value="{{$entry}}">{{$entry}}</option>
{{end}}
</select>
</section>
</div>
<div data-section-id="date-selector-date">
<section class="form-field">
<label for="dsd-date">Datum</label>
<input type="date" id="dsd-date" name="dsd-date">
</section>
</div>
<div class="range-selector" data-section-id="date-selector-range">
<section class="form-field">
<label for="dsr-start-range">Početak raspona</label>
<input type="date" id="dsr-start-range" name="dsr-start-range">
</section>
<section class="form-field">
<label for="dsr-end-range">Kraj raspona</label>
<input type="date" id="dsr-end-range" name="dsr-end-range">
</section>
</div>
</article>
<section class="radio-group" style="margin-top: 0.5em;">
<label>Državni praznik:</label>
<div>
<input type="radio" value="true" name="sh" id="sh_true"><label for="sh_true">Da
</label><input type="radio" value="false" name="sh" id="sh_false"><label for="sh_false">Ne
</label><input type="radio" value="" name="sh" id="sh_any"><label for="sh_any">Svi</label>
</div>
<input type="hidden" id="state-holiday" name="state_holiday">
</section>
<section class="radio-group">
<label>Religiozni praznik:</label>
<div>
<input type="radio" value="true" name="rh" id="rh_true"><label for="rh_true">Da
</label><input type="radio" value="false" name="rh" id="rh_false"><label for="rh_false">Ne
</label><input type="radio" value="" name="rh" id="rh_any"><label for="rh_any">Svi</label>
</div>
<input type="hidden" id="religious-holiday" name="religious_holiday">
</section>
</form>
</article>
</section>
<section id="result" style="flex-grow: 1; margin: 1em;">
<div style="display: flex; flex-wrap: wrap; align-items: baseline">
<h3 style="margin-bottom: 1em;">Naredba</h3>
<div style="flex-grow: 1"></div>
<div>
<a id="query-link" style="text-decoration: none" class="button secondary" href="." target="_blank">Dohvati</a>
</div>
</div>
<article id="result-content">
Učitavanje...
</article>
</section>
</section>
</main>
</body>
</html>