Updated design + added documentation page
This commit is contained in:
1 parent
c33a883c34
commit
76a3c446da
25 files changed
+1080
-448
No files matched your search
@@ -0,0 +1,36 @@
|
||||
<dialog class="card" id="create-card">
|
||||
<h3 class="card-title">Create holiday</h3>
|
||||
<form method="post" action="/admin/holidays">
|
||||
<section>
|
||||
<label for="country">Country:</label>
|
||||
<select id="country" required name="country">
|
||||
<option value="HR">Croatia</option>
|
||||
<option value="US">United states</option>
|
||||
<option value="FR">France</option>
|
||||
<option value="GB">Great Britain</option>
|
||||
</select>
|
||||
</section>
|
||||
<section>
|
||||
<label for="name">Name:</label>
|
||||
<input required id="name" name="name" type="text">
|
||||
</section>
|
||||
<section>
|
||||
<label for="description">Description:</label>
|
||||
<textarea id="description" name="description"></textarea>
|
||||
</section>
|
||||
<section>
|
||||
<label for="date">Date:</label>
|
||||
<input required id="date" name="date" type="date">
|
||||
</section>
|
||||
<section>
|
||||
<label class="checkbox"><span>State holiday</span><input id="state_holiday" value="true" name="state_holiday" type="checkbox"></label>
|
||||
</section>
|
||||
<section>
|
||||
<label class="checkbox"><span>Religious holiday</span><input id="religious_holiday" value="true" name="religious_holiday" type="checkbox"></label>
|
||||
</section>
|
||||
<section class="actions">
|
||||
<button type="submit">Create</button>
|
||||
<button type="button" onclick="closeDialog('#create-card')">Cancel</button>
|
||||
</section>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -0,0 +1,24 @@
|
||||
<dialog class="card" data-closeable id="check-is-a-holiday">
|
||||
<div style="display: flex;">
|
||||
<h2 style="margin-right: 1em;">Is it a holiday?</h2>
|
||||
<button onclick="closeDialog('#check-is-a-holiday')" class="clean icon"><img class="icon" src="/assets/images/close-x.svg"></button>
|
||||
</div>
|
||||
<form method="get" action="/search">
|
||||
<section>
|
||||
<label for="country">Country:</label>
|
||||
<select id="country" name="country">
|
||||
<option value="HR">Croatia</option>
|
||||
<option value="US">United states</option>
|
||||
<option value="FR">France</option>
|
||||
<option value="GB">Great Britain</option>
|
||||
</select>
|
||||
</section>
|
||||
<section>
|
||||
<label for="date">Date:</label>
|
||||
<input id="date" name="date" type="date" required>
|
||||
</section>
|
||||
<section class="actions">
|
||||
<button style="width: 100%;" type="submit">Check is a holiday</button>
|
||||
</section>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
<dialog class="card" id="delete-card">
|
||||
<h3 class="card-title">Delete holiday</h3>
|
||||
<p>Are you sure you want to delete "{{.Holiday.Name}}"?</p>
|
||||
<form method="post" action="/admin/holidays/{{.Holiday.Id}}/delete">
|
||||
<section class="actions">
|
||||
<button type="submit">Delete</button>
|
||||
<button type="button" onclick="closeDialog('#delete-card')">Cancel</button>
|
||||
</section>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -0,0 +1,37 @@
|
||||
<dialog class="card" id="update-card">
|
||||
<h3 class="card-title">Edit holiday</h3>
|
||||
<form method="post" action="/admin/holidays">
|
||||
<input type="hidden" name="id" value="{{.Holiday.Id}}">
|
||||
<section>
|
||||
<label for="country">Country:</label>
|
||||
<select id="country" required name="country">
|
||||
<option {{if eq .Holiday.Country "HR"}}selected{{end}} value="HR">Croatia</option>
|
||||
<option {{if eq .Holiday.Country "US"}}selected{{end}} value="US">United states</option>
|
||||
<option {{if eq .Holiday.Country "FR"}}selected{{end}} value="FR">France</option>
|
||||
<option {{if eq .Holiday.Country "GB"}}selected{{end}} value="GB">Great Britain</option>
|
||||
</select>
|
||||
</section>
|
||||
<section>
|
||||
<label for="name">Name:</label>
|
||||
<input required id="name" value="{{.Holiday.Name}}" name="name" type="text">
|
||||
</section>
|
||||
<section>
|
||||
<label for="description">Description:</label>
|
||||
<textarea id="description" name="description">{{.Holiday.Description}}</textarea>
|
||||
</section>
|
||||
<section>
|
||||
<label for="date">Date:</label>
|
||||
<input required id="date" value="{{.Holiday.Date.Format "2006-01-02"}}" name="date" type="date">
|
||||
</section>
|
||||
<section>
|
||||
<label class="checkbox"><span>State holiday</span><input id="state_holiday" value="true" {{if .Holiday.IsStateHoliday}}checked{{end}} name="state_holiday" type="checkbox"></label>
|
||||
</section>
|
||||
<section>
|
||||
<label class="checkbox"><span>Religious holiday</span><input id="religious_holiday" value="true" {{if .Holiday.IsReligiousHoliday}}checked{{end}} name="religious_holiday" type="checkbox"></label>
|
||||
</section>
|
||||
<section class="actions">
|
||||
<button type="submit">Update</button>
|
||||
<button type="button" onclick="closeDialog('#update-card')">Cancel</button>
|
||||
</section>
|
||||
</form>
|
||||
</dialog>
|
||||
Reference in new issue
Block a user