forked from brownbaglunch/BrownBagLunch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
locations.html
175 lines (149 loc) · 7.12 KB
/
locations.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Brown Bag Lunch France</title>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.0/mustache.min.js"></script>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/foundation/3.2.2/stylesheets/foundation.min.css" media="screen">
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<script type="text/javascript" src="js/bbl-locations.js"></script>
<nav class="top-bar" style="">
<ul>
<li class="name"><h1><a href="/">Brown Bag Lunch France</a></h1></li>
<li class="toggle-topbar"><a href="#"></a></li>
<li class="divider"></li>
<li class="name"><h1><a href="/"><i class="icon-lightbulb"></i> <em>Comment ça fonctionne?</em></a></h1></li>
</ul>
<section>
<ul class="right">
<li class="divider"></li>
<li class="has-dropdown">
<a href="#">BBL Hôtes</a>
<ul class="dropdown" id="bblNavigationBar">
{{#locations}}
<li><a href="#{{pseudo}}">{{name}}</a></li>
{{/locations}}
</ul>
</li>
</ul>
</section>
</nav>
<!-- Image header -->
<!--<div class="row">-->
<!--<div class="twelve columns">-->
<!--<img width="910" height="364" src="img/BBL.jpg">-->
<!--<hr>-->
<!--</div>-->
<!--</div>-->
<!-- Carte des BBL -->
<div class="row">
<div class="panel radius">
<div id="map_canvas" style="height: 500px;"></div>
</div>
</div>
<!-- BBL Hotes -->
<div id="bblDetails">
{{#locations}}
<a id="{{pseudo}}"></a>
<div id="{{pseudo}}_box" class="row">
{{^paire}}
<div class="four columns">
<img src="{{picture}}">
</div>
{{/paire}}
<div class="eight columns">
<div class="panel {{#paire}}callout{{/paire}} radius">
<h4>{{name}}</h4>
<div class="row">
<div class="six columns">
<p>{{{bio}}}</p>
<p><a href="{{website}}"><i class="icon-external-link"></i> {{website}}</a></p>
<p><i class="icon-globe"></i> Localisation: {{address}}</p>
<p><i class="icon-envelope"></i> Infos et contact : {{{contact}}}</p>
</div>
<div class="six columns">
<span class="{{#paire}}secondary{{/paire}} round label">Centres d'intérêts :</span>
<ul class="icons">
{{#interests}}
<li><i class="icon-caret-right"></i> <strong>{{.}}</strong></li>
{{/interests}}
</ul>
<span class="{{#paire}}secondary{{/paire}} round label">Audience :</span>
<ul class="icons">
<li><i class="icon-sitemap"></i> {{audience.profiles}}</li>
<li><i class="icon-group"></i> {{audience.number}}</li>
</ul>
</div>
</div>
</div>
</div>
{{#paire}}
<div class="four columns">
<img src="{{picture}}">
</div>
{{/paire}}
</div>
{{/locations}}
</div>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="http://jquery-ui-map.googlecode.com/svn/trunk/ui/jquery.ui.map.js"></script>
<script type="text/javascript">
$('#map_canvas').gmap({'callback': function() {
var self = this; // we can't use "this" inside the click function (that refers to the marker object in this example)
for (var index = 0; index < bblLocationsData.locations.length; index++) {
var loc = bblLocationsData.locations[index];
self.addMarker({
'position': loc.gps,
'name': loc.name,
'pseudo': loc.pseudo,
'bounds': true
}).click(function() {
self.openInfoWindow({
'content': '<a href="#' + this.pseudo + '">' + this.name + '</a>'
}, this);
});
}
}});
</script>
<footer style="width:100%;background:#3f3f3f; color:white; padding: 15px 0">
<div class="row">
<strong>
Vous voulez proposer vous aussi des sujets ? Rejoignez la communauté des baggers :
<a style="color: yellow;" href="https://github.com/nrichand/BrownBagLunch/"><i class="icon-github-alt"></i> page github</a>
| <a style="color: yellow;" href="https://twitter.com/bbl_fr"><i class="icon-twitter"></i> @bbl_fr</a>
</strong>
</div>
</footer>
<!-- Included JS Files -->
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/foundation/3.2.2/javascripts/foundation.min.js"></script>
<script type="text/javascript">
// decorate data
for (var locationIndex = 0; locationIndex < bblLocationsData['locations'].length; locationIndex++) {
bblLocationsData['locations'][locationIndex]['paire'] = (locationIndex % 2 == 1);
}
//get the templates
var templateHeader=document.getElementById('bblNavigationBar').innerHTML;
var templateBaggers=document.getElementById('bblDetails').innerHTML;
//render the template with given data
var htmlHeader=Mustache.to_html(templateHeader, bblLocationsData);
var htmlDetails=Mustache.to_html(templateBaggers, bblLocationsData);
//put the render result on the screen
document.getElementById('bblNavigationBar').innerHTML=htmlHeader;
document.getElementById('bblDetails').innerHTML=htmlDetails;
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-38399904-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>