-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
97 lines (89 loc) · 3.53 KB
/
index.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Daily Panda</title>
<meta
name="description"
content="A Panda a day keeps something away."
/>
<!-- Twitter Card data -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@Ope__O" />
<meta name="twitter:title" content="Daily Panda" />
<meta
name="twitter:description"
content="A Panda a day keeps something away."
/>
<meta name="twitter:creator" content="@Ope__O" />
{{if .PandaFound}}
<meta
name="twitter:image"
content="{{.ImageURL}}"
/>
{{end}}
<!-- Open Graph data -->
<meta property="og:title" content="Daily Panda" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://daily-panda.herokuapp.com" />
{{if .PandaFound}}
<meta
property="og:image"
content="{{.ImageURL}}"
/>
{{end}}
<meta
property="og:description"
content="A panda a day keeps something away."
/>
<meta property="og:site_name" content="Daily Panda" />
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
<link rel="icon" href="/static/favicon.ico" type="image/x-icon">
<link href="https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/static/css/style.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-170231983-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-170231983-1');
</script>
</head>
<body>
<div class="main">
{{if .PandaFound}}
<div class="img-container" style="background-image: linear-gradient(0deg, rgba(141, 198, 63, 0) 48%, rgba(6, 6, 6, 0.31)), linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url({{.ImageURL}})">
<div class="img-holder">
<div class="top-right">
<p class="img-year-text"></p>
</div>
<div class="bottom-right">
<p class="img-alt-text"><a href="{{.Source}}" target="_blank">www.todays-source.com</a></p>
<p class="img-director-text">Directed by <a href="https://opeonikute.dev" target="_blank">a fellow panda lover</a> from Lagos - Nigeria, who also delivered <a href="https://marlians.opeonikute.dev" target="_blank">this gem</a>.</p>
</div>
<div class="bottom-left">
<h2>{{.WordOfTheDay}}</h2>
<p class="img-year-text mobile-only"></p>
</div>
</div>
</div>
{{else}}
<h2>Omo. 😔</h2>
<p>There's no panda today. See you tomorrow :)</p>
{{end}}
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/moment.min.js"></script>
<script>
// self executing function here
(function() {
const dateField = document.getElementsByClassName('img-year-text');
for (let field of dateField) {
field.innerHTML = moment().format('Do MMMM, YYYY');
}
})();
</script>
</body>
</html>