You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.4 KiB
39 lines
1.4 KiB
{{define "Note"}} |
|
<!DOCTYPE html> |
|
<html> |
|
<head> |
|
<title>NoteHub — {{.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> |
|
{{.Ads}} |
|
<article> |
|
{{.Content}} |
|
</article> |
|
<footer> |
|
<a href="/">⌂ notehub</a> · |
|
{{if .ID}} |
|
<a href="/{{.ID}}/stats">statistics</a> · |
|
<a href="/{{.ID}}/edit">edit</a> · |
|
<a href="/{{.ID}}/export">export</a> · |
|
<a href="javascript:void(0)" onclick="report()">report abuse</a> · |
|
{{end}} |
|
<a href="/TOS.md">terms of service</a> |
|
<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> |
|
</footer> |
|
</body> |
|
</html> |
|
{{end}}
|
|
|