-
Notifications
You must be signed in to change notification settings - Fork 8
/
home.html
82 lines (76 loc) · 2.76 KB
/
home.html
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{{.Title}}</title>
<meta name="description" content="{{.Intro}}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/app/css/normalize.css">
<link rel="stylesheet" href="/static/app/css/skeleton.css">
<link rel="stylesheet" href="/static/app/css/app.css">
<link rel="stylesheet" href="/static/custom/custom.css">
<link rel="icon" href="/static/custom/favicon.ico" type="image/x-icon" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Inter&display=swap" rel="stylesheet">
</head>
<body>
<div class="container">
<section class="header">
<a href="/">
<img width="100px" src="{{.LogoURL}}">
</a>
<h3>{{.Title}}</h3>
<h5>{{.Intro}}</h5>
</section>
{{ range .Links }}
<div class="row link">
<a class="linker" href="{{.URL}}" target="_blank" onclick="return recordHit({{.ID}})">
{{if .ImageURL}}
<div class="thumb">
<img class="thumbnail" src="{{.ImageURL}}">
</div>
{{end}}
<div class="data">
<span class="text">
{{ .Text }}
</span>
</div>
</a>
</div>
{{ end }}
<hr>
<div class="row">
<div class="social">
{{ range $k, $v := .Social }}
{{ if ne $v "" }}
<a href="{{$v}}" style="text-decoration:none;">
<i data-feather="{{$k}}"></i>
</a>
{{ end }}
{{ end }}
</div>
</div>
<div class="row footer">
powered by <a href="https://github.com/rhnvrm/linkpage">LinkPage</a>
</div>
</div>
<script type="text/javascript">
async function fetchAsync (url) {
let response = await fetch(url);
let data = await response.json();
return data;
}
async function recordHit(id) {
fetchAsync("/hits/"+id)
return true
}
</script>
<script src="static/app/js/feather.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
feather.replace()
});
</script>
</body>
</html>