phoenix/templates/settings.html.tmpl

128 lines
3.7 KiB
Cheetah
Raw Normal View History

2023-04-06 10:36:11 +05:00
<!DOCTYPE html>
<html lang="en">
<head>
{{template "head"}}
2023-04-09 11:33:34 +05:00
<link rel="stylesheet" href="assets/css/settings.css" />
2023-04-06 10:36:11 +05:00
</head>
<body>
<h1>Settings</h1>
<a href="/">Main page</a>
{{range .groups}}
<h2>Group "{{.Name}}"</h2>
2023-04-09 11:55:08 +05:00
<div class="row">
<form method="POST" action="/api/groups/{{.ID}}/put" class="innerForm">
2023-04-09 11:55:08 +05:00
<input
value="{{.Name}}"
placeholder="Name"
name="groupName"
required
/>
<button
type="submit"
aria-label="Save the group"
>
2023-04-09 11:55:08 +05:00
<img src="/assets/svg/floppy-disk-solid.svg" width="16px" height="16px" />
</button>
</form>
<form method="POST" action="/api/groups/{{.ID}}/delete">
<button
type="submit"
aria-label="Delete the group"
>
2023-04-09 11:55:08 +05:00
<img src="/assets/svg/trash-solid.svg" width="16px" height="16px" />
</button>
</form>
</div>
2023-04-06 10:36:11 +05:00
{{range .Links}}
<div class="row">
<form method="POST" action="/api/links/{{.ID}}/put" class="innerForm">
2023-04-06 10:36:11 +05:00
<!-- method: put -->
<input
2023-09-03 19:08:33 +05:00
class="small-row"
value="{{ if .Icon }}{{ .Icon }}{{ end }}"
name="icon"
placeholder="Icon"
/>
<input
class="small-row"
2023-04-06 10:36:11 +05:00
value="{{.Name}}"
name="linkName"
placeholder="Name"
required
/>
<input
value="{{.Href}}"
name="href"
placeholder="Href"
required
/>
<button
type="submit"
aria-label="Save the link"
>
2023-04-06 10:36:11 +05:00
<img src="/assets/svg/floppy-disk-solid.svg" width="16px" height="16px" />
</button>
</form>
<form method="POST" action="/api/links/{{.ID}}/delete">
<button
type="submit"
aria-label="Delete the link"
>
2023-04-06 10:36:11 +05:00
<img src="/assets/svg/trash-solid.svg" width="16px" height="16px" />
</button>
</form>
</div>
{{end}}
<form action="/api/links" method="POST" class="row">
2023-04-06 10:36:11 +05:00
<input
2023-09-03 19:08:33 +05:00
class="small-row"
name="icon"
placeholder="Icon"
/>
<input
class="small-row"
2023-04-06 10:36:11 +05:00
placeholder="Name"
name="linkName"
required
/>
<input
placeholder="Href"
name="href"
type="url"
required
/>
<input
type="hidden"
name="groupID"
value="{{.ID}}"
readonly
/>
<button
type="submit"
aria-label="Create a new link"
>
2023-04-06 10:36:11 +05:00
<img src="/assets/svg/plus-solid.svg" width="16px" height="16px" />
</button>
</form>
{{end}}
<h2>New group</h2>
<form method="POST" action="/api/groups" class="row">
2023-04-06 10:36:11 +05:00
<input
placeholder="Name"
name="groupName"
required
/>
<button
type="submit"
aria-label="Create a new group"
>
2023-04-06 10:36:11 +05:00
<img src="/assets/svg/plus-solid.svg" width="16px" height="16px" />
</button>
</form>
</body>
</html>