aboutsummaryrefslogtreecommitdiffstats
path: root/template.go
blob: 3b0fe2f3cda0ce49ed988763828a662ecf5c24d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package gopherproxy

var tpltext = `<!doctype html>
<html:>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{.Title}}</title>
<style>
  body {
	background: #FFFFFF;
  }

  section {
	margin: auto;
	width: 50%;
    font-family:Courier;
    color: #CCCCCC;
    background: #000000;
    border: 3px double #CCCCCC;
    color: #FFFFFF;
    border-radius: 1em;
    padding: 1em;
	overflow-x: auto;
  }
</style>
</head>
<body>
<section>
<pre>
{{range .Lines}} {{if .Link}}({{.Type}}) <a class="{{ .Type }}" href="{{.Link}}">{{.Text}}</a>{{else}}      {{.Text}}{{end}}
{{end}}</pre>
</section>
<script src="https://code.jquery.com/jquery-3.1.0.slim.min.js" integrity="sha256-cRpWjoSOw5KcyIOaZNo4i6fZ9tKPhYYb6i5T9RSVJG8=" crossorigin="anonymous"></script>
<script type="text/javascript">
$(document).ready(function () {
  $(".QRY").click(function (e) {
	e.preventDefault();
	var query = prompt("Please enter required input: ", "");
	if (query != null) {
	  window.location = e.target.href + "?" + query;
	}
  });
});
</script>
</body>
</html>`