-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
124 lines (111 loc) · 4.76 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
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
<!DOCTYPE html>
<html lang="fi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Startpage</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Time and date -->
<span class="clock" id="clock"></span>
<h1 id="date"></h1>
<!-- /time and date -->
<!-- Weather from weatherwidget.io with inverse filter to make it white -->
<div class="weather">
<a class="weatherwidget-io" href="https://forecast7.com/en/60d1724d94/helsinki/" data-label_1="HELSINKI" data-label_2="WEATHER"
data-font="Roboto" data-icons="Climacons">Weather</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>
<!-- /weather -->
<br>
<div class="grid">
<div class="col">
<h3>Learning</h3>
<ul id="fav-left">
<li>
<a href="https://www.coursera.org/learn/learning-how-to-learn">Learning How to Learn - Coursera</a>
<button
class="removebtn">x</button>
</li>
</ul>
<div id="new-link-button-l">
<button class="button">Add link</button>
</div>
<div id="add-link-form-l">
<label>Title</label><br /><input id="title-l" placeholder="Title here" /><br /><label>URL</label><br /><input
id="url-l" value="http://" /><br /><button class="button" id="add-left">Save Link</button>
</div>
</div>
<div class="col">
<h3>Code</h3>
<ul id="fav-center">
<li>
<a href="https://cmdchallenge.com/">Commandline Challenge</a><button class="removebtn">x</button>
</li>
</ul>
<div id="new-link-button-c">
<button class="button">Add link</button>
</div>
<div id="add-link-form-c">
<label>Title</label><br /><input id="title-c" placeholder="Title here" /><br /><label>URL</label><br /><input
id="url-c" value="http://" /><br /><button class="button" id="add-center">Save Link</button>
</div>
</div>
<div class="col">
<h3>Everything else</h3>
<ul id="fav-right">
<li>
<a href="https://news.ycombinator.com/">Hacker News</a><button class="removebtn">x</button>
</li>
</ul>
<div id="new-link-button-r">
<button class="button">Add link</button>
</div>
<div id="add-link-form-r">
<label>Title</label><br /><input id="title-r" placeholder="Title here" /><br /><label>URL</label><br /><input
id="url-r" value="http://" /><br /><button class="button" id="add-right">Save Link</button>
</div>
</div>
<!-- Code for date and time -->
<script>
var clockElement = document.getElementById("clock");
function updateClock(clock) {
clock.innerHTML = new Date().toTimeString().split(" ")[0];
}
setInterval(function () {
updateClock(clockElement);
}, 1000);
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1; //January is 0!
var d = new Date();
var weekday = new Array(7);
weekday[0] = "Sunday";
weekday[1] = "Monday";
weekday[2] = "Tuesday";
weekday[3] = "Wednesday";
weekday[4] = "Thursday";
weekday[5] = "Friday";
weekday[6] = "Saturday";
var n = weekday[d.getDay()];
var yyyy = today.getFullYear();
if (dd < 10) {
dd = '0' + dd
}
if (mm < 10) {
mm = '0' + mm
}
today = dd + '.' + mm + '.' + yyyy;
date.innerHTML = n + "<br>" + today;
</script>
<!-- Dependency -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<!-- Scripts to add links - it can be easier, yes-->
<script src="scripts/script-left.js"></script>
<script src="scripts/script-right.js"></script>
<script src="scripts/script-center.js"></script>
</body>
</html>