-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.html
154 lines (136 loc) · 6.34 KB
/
main.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<html lang="en">
<head>
<title>Dashboard | {{.Title}}</title>
<meta http-equiv="refresh" content="300">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/styles/main.css">
</head>
<body>
<!-- Main page container -->
<div class="container">
<!-- Left pannel -->
<div class="panel left">
<!-- Weather module -->
<div class="module weather">
<a class="weatherwidget-io" href="https://forecast7.com/en/n33d87151d21/sydney/" data-label_1="SYDNEY" data-label_2="WEATHER" data-theme="dark" ></a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src='https://weatherwidget.io/js/widget.min.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','weatherwidget-io-js');
</script>
</div>
<div class="module clock">
<!-- <iframe src="http://free.timeanddate.com/clock/i79vsnh8/n145/tluk/fn14/fs48/fcfff/tc000/pc000/th1/ts1" frameborder="0" width="100%" height="60px"></iframe> -->
<iframe src="https://free.timeanddate.com/clock/i8v4au7s/n240/tluk/fn14/fs48/fcfff/tc000/pc000/ts1" frameborder="0" width="100%" height="60px"></iframe>
</div>
<!-- Calendar module -->
<div id="calendar-container" class="module calendar">
<!-- <iframe src="https://calendar.google.com/calendar/embed?height=600&wkst=1&bgcolor=%23ffffff&ctz=Asia%2FManila&src=a2hhbmgucGhvbmljLm5ndXllbkBnbWFpbC5jb20&src=NThqajhpbW1zaW1vOXY1Mmg2MTRjN2Y4MjBAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&src=MTAzOWY0azNhNDh1ZnRvdnNvaXJlY3BqNGNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&src=ZW4uYXVzdHJhbGlhbiNob2xpZGF5QGdyb3VwLnYuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&src=ZW4tZ2IucGhpbGlwcGluZXMjaG9saWRheUBncm91cC52LmNhbGVuZGFyLmdvb2dsZS5jb20&color=%238E24AA&color=%23C0CA33&color=%234285F4&color=%2333B679&color=%239E69AF&showDate=1&mode=DAY&showPrint=0&showTabs=0&showCalendars=0&showTz=0&showNav=0&showTitle=0" style="border-width:0" width="100%" height="100%" frameborder="0" scrolling="no"></iframe> -->
<div class="calendar-header">
<p class="calendar-date">{{ .DateNow }}</p>
</div>
<div class="calendar-body">
<div class="times">
{{ range .Times }}
<div class="time">{{ . }}</div>
{{ end }}
</div>
<div class="events">
{{ with .Events }}
{{ range . }}
<div class="event" style="{{ if .Visible }} {{ else }} visibility: hidden; {{end}}min-height: calc(2*{{ .Hours }}*19px + (2*{{ .Hours }} - 1)*4px)">
<p>{{ .Summary }}</p>
</div>
{{ end }}
{{ end }}
<div id="time-now" class="time-now" style="top: calc(({{ .TimeNow }} - 24)*46px)"></div>
</div>
</div>
<div class="calendar-footer">
<a style="height: inherit;" href="https://calendar.google.com/calendar/r/week">
<img class="calenar-settings" src="/images/settings.png">
</a>
</div>
</div>
</div>
<!-- Middle pannel -->
<div class="panel middle">
<!-- Focus module -->
<div class="module focus">
<textarea id="focus" class="focus-input" name="focus"></textarea>
<div>
<input id="save" type="submit" value="Save">
</div>
</div>
<!-- Task module -->
<div class="module task">
{{ with .Card }}
<h2>
<a href="{{ .URL }}">{{ .Name }}</a>
</h2>
<p class="heading">Description</p>
{{if .Desc }}
<p>{{ .Desc }}</p>
{{else}}
<p>–</p>
{{end}}
<p class="heading">Comments</p>
{{if .Actions }}
{{ with .Actions }}
{{ range . }}
<p>{{ .Date }}</p>
{{ with .Data }}
<p>{{ .Text }}</p>
{{ end }}
{{ end }}
{{ end }}
{{else}}
<p>–</p>
{{end}}
<form action="/done/" method="POST">
<input type="hidden" name="id" value="{{ .ID }}">
<input type="submit" value="Mark as Done">
</form>
{{ end }}
</div>
</div>
<!-- Right pannel -->
<div class="panel right">
<!-- Slideshow module -->
<!--
<div class="module slideshow">
TODO.
</div>
-->
<!-- Tasklist module -->
<div class="module tasklist">
{{ with .Tasklist }}
{{ range . }}
<div class="card" target="_blank">
<a href="{{ .URL }}">{{ .Name }}</a>
<form action="/" method="GET">
<input type="hidden" name="id" value="{{ .ID }}">
<input type="submit" value="Select">
</form>
</div>
{{ end }}
{{ end }}
</div>
<div class="tasklist-overlay"></div>
</div>
</div>
<script type="text/javascript">
document.getElementById("save").addEventListener("click", function () {
var focus = document.getElementById("focus").value;
localStorage.setItem("focus", focus);
alert("Saved!");
} , false);
document.getElementById("focus").value = localStorage.getItem("focus");
window.onload = function onPageLoad() {
document.getElementById("time-now").scrollIntoView({behavior: 'smooth'});
// This is totally a hack, because there is some weird shit going on.
setTimeout(function resetCalendarContainer() {
document.getElementById("calendar-container").scrollTo(0, 0);
}, 500);
}
</script>
</body>
</html>