-
Notifications
You must be signed in to change notification settings - Fork 20
/
index.html
156 lines (128 loc) · 5.68 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
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
155
156
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Torino Tech</title>
<meta name="description" content="Torino Tech - Eventi OpenSource, OpenHardware, OpenData in Torino" />
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="canonical" href="http://torinotech.github.io" />
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Website",
"publisher": "torinotech.github.io - Eventi tech a Torino",
"url": "http://torinotech.github.io",
"image": "https://cloud.githubusercontent.com/assets/8074/9904181/1be6a5a2-5c7c-11e5-818b-04e135a04309.png",
"description": "Eventi tech a Torino"
}
</script>
<meta name=”keywords” content="torino tech, tecnologia, eventi, open source">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@TorinoTech">
<meta name="twitter:creator" content="@TorinoTech">
<meta name="twitter:title" content="http://torinotech.github.io">
<meta name="twitter:description" content="torinotech.github.io - Eventi tech a Torino">
<meta name="twitter:image" content="http://torinotech.github.io/assets/full-bk.png">
<!-- OG stuff metatags -->
<meta property="og:locale" content="it_IT" />
<meta property="og:site_name" content="torinotech.github.io - Eventi tech a Torino" />
<meta property="og:type" content="website" />
<meta property="og:title" content="torinotech.github.io - Eventi tech a Torino" />
<meta property="og:description" content="Eventi OpenSource, OpenData, OpenHardware in Torino" />
<meta property="og:url" content="http://torinotech.github.io" />
<meta property="og:image" content="http://torinotech.github.io/assets/full-bk.png" />
<!-- Style -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/application.css">
</head>
<body>
<div class="header">
<div class="wrapper">
<h1>Torino Tech</h1>
<a rel="nofollow" class="js-track" href="https://github.com/TorinoTech/torinotech.github.io/blob/master/README.md">Partecipa!</a>
</div>
</div>
<div class="intro">
<div class="wrapper">
<section>
<p>
Tutti gli eventi Tech di Torino in una sola pagina! OpenSource, OpenData, OpenHardware. Vuoi sapere che cos'é TorinoTech? Leggi il <a href="https://github.com/TorinoTech/torinotech.github.io#regolamento">Regolamento</a> (è molto minimal, promesso!).
<br />Puoi anche segnalare un <a href="https://gitter.im/TorinoTech/lavoro">Annuncio di lavoro Tech</a> a Torino.
</p>
</section>
</div>
</div>
<div class="wrapper">
<div id="events-placeholder"></div>
</div>
<div class="wrapper">
<div class="social">
<div class="social__item">
<a href="https://www.facebook.com/TorinoTech"><i class="fa fa-facebook"></i></a>
</div>
<div class="social__item">
<a href="https://twitter.com/TorinoTech"><i class="fa fa-twitter"></i></a>
</div>
<div class="social__item">
<a href="https://github.com/TorinoTech"><i class="fa fa-github"></i></a>
</div>
<div class="social__item">
<a href="https://gitter.im/TorinoTech/chat"><i class="fa fa-weixin"></i></a>
</div>
</div>
<div class="footer">
<section class="col-xs-offset-0 col-xs-7 col-md-offset-2 col-md-10">
<div class="js-footer box" style="color:#999; font-size:14px; float:right;">
<!-- placeholder -->
</div>
</section>
</div>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.1.6/zepto.min.js
"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.5.2/js-yaml.min.js"></script>
<script>
function get(filename, cb) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) {
cb(xhttp.responseText);
}
};
xhttp.open("GET", filename, true);
xhttp.send();
}
function updateEvents(eventsJson) {
var eventsHtml = ''
var today = new Date()
var latestMonth // used for months separator
for (var key in eventsJson) {
var el = eventsJson[key]
el.when = new Date(el.when.replace(' ', 'T')+'+0000')
if (el.when < today) continue
if (latestMonth !== el.when.getMonth()) {
eventsHtml += '<div class="event-separator">' + el.when.toLocaleString('it',{month:'long'}) + '</div>'
latestMonth = el.when.getMonth()
}
eventsHtml += '<div class="event-box" key='+key+'><small>' + el.organizer +'</small>'+
'<h4><a href="' + el.url + '">' + ((el.title) ? el.title : '') + '</a></h4>' +
((el.free || el.free == undefined) ? '<span style="color:green;">free</span> - ' : '') + el.when.toLocaleString('it', {timeZone: 'UTC'}) + ' - ' + el.when.toLocaleString('it' ,{weekday: 'long', timeZone: 'UTC'}) +'<br />' +
'</div>'
}
if (eventsHtml === '') eventsHtml = '<div>Non ci sono eventi in programma, perché non organizzi tu qualcosa?</div>'
$('#events-placeholder').html(eventsHtml)
}
// Fill the list
get('events.yml.txt', function(data) {
var doc = jsyaml.load(data);
updateEvents(doc)
})
</script>
</body>
</html>