Files
notehub/assets/templates/form.html
T

36 lines
1.4 KiB
HTML
Raw Normal View History

2017-09-18 22:12:09 +02:00
{{define "Form"}}
2017-09-11 23:40:03 +02:00
<!DOCTYPE html>
<html>
<head>
2021-04-05 23:20:39 +03:00
<title>Notes</title>
2017-09-21 22:59:23 +02:00
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
2017-09-11 23:40:03 +02:00
<link href="/style.css" rel="stylesheet" type="text/css" />
2017-09-24 00:43:58 +02:00
<script src='/new.js'></script>
2017-09-23 23:29:06 +02:00
<script src='/note.js'></script>
2017-09-11 23:40:03 +02:00
</head>
<body>
2017-09-23 23:43:56 +02:00
<form autocomplete="off" onsubmit="return false">
2017-09-23 23:29:06 +02:00
<textarea autofocus id="text">{{.Text}}</textarea>
2017-09-11 23:40:03 +02:00
<fieldset>
2017-09-23 23:29:06 +02:00
<input id="id" value="{{.ID}}" type="hidden" />
<input class="ui-elem" id="password" placeholder="Password for editing" type="text" autocomplete="off" />
2021-04-05 23:16:36 +03:00
{{if not .ID}}
<input class="ui-elem" id="name" placeholder="Note name" type="text" autocomplete="off" />
{{else}}
<input class="ui-elem" id="name" placeholder="Note name" type="text" autocomplete="off" hidden value=""/>
{{end}}
<button class="button ui-elem" id="publish-button" type="button" onclick="submitForm()">
2017-09-23 23:29:06 +02:00
{{if .ID}}Update{{else}}Publish{{end}} Note
</button>
<span id="feedback"></span>
2017-09-11 23:40:03 +02:00
</fieldset>
</form>
<footer>
2017-09-18 23:59:01 +02:00
<a href="/">&#8962; notehub</a> &middot;
2017-09-11 23:40:03 +02:00
<a href="https://github.com/chmllr/NoteHub">source code</a> &middot;
</footer>
</body>
</html>
2021-04-05 23:16:36 +03:00
{{end}}