Files
notehub/assets/templates/note.html
T

40 lines
1.4 KiB
HTML
Raw Normal View History

2017-09-11 20:40:43 +02:00
{{define "Note"}}
2017-09-09 20:49:45 +02:00
<!DOCTYPE html>
<html>
<head>
<title>NoteHub &mdash; {{.Title}}</title>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<link href="/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
2017-09-18 23:59:01 +02:00
{{.Ads}}
2017-09-09 20:49:45 +02:00
<article>
{{.Content}}
</article>
<footer>
<a href="/">&#8962; notehub</a> &middot;
2017-09-17 13:39:35 +02:00
{{if .ID}}
2017-09-11 22:59:06 +02:00
<a href="/{{.ID}}/stats">statistics</a> &middot;
<a href="/{{.ID}}/edit">edit</a> &middot;
<a href="/{{.ID}}/export">export</a> &middot;
2017-09-20 21:31:23 +02:00
<a href="javascript:void(0)" onclick="report()">report abuse</a> &middot;
2017-09-17 13:39:35 +02:00
{{end}}
2017-09-09 20:49:45 +02:00
<a href="/TOS.md">terms of service</a>
2017-09-20 21:31:23 +02:00
<script>
function report() {
var resp = prompt("Please shortly explain the problem with this note.");
if (resp) {
var xhr = new XMLHttpRequest();
xhr.open('POST', '/{{.ID}}/report');
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send("report=" + encodeURIComponent(resp));
alert("Thank you!")
}
}
</script>
2017-09-09 20:49:45 +02:00
</footer>
</body>
</html>
2017-09-11 20:40:43 +02:00
{{end}}