-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
128 lines (114 loc) · 5.78 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>dis-moi où tu me plaîs</title>
<script src="lib/jquery.js"></script>
<script src="lib/d3.v2.min.js"></script>
<script src="lib/mapbox.js"></script>
<script src="lib/bootstrap.min.js"></script>
<script src="lib/bootstrap-tooltip.js"></script>
<script src="lib/sigma.min.js"></script>
<script src="lib/sigma.parseGexf.js"></script>
<script src="lib/sigma.forceatlas2.js"></script>
<script src="lib/cdlm.js"></script>
<link href='http://fonts.googleapis.com/css?family=Clicker+Script|Oleo+Script+Swash+Caps|Cantora+One|Text+Me+One|Merienda|Roboto' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="css/mapbox.css" type="text/css" />
<link rel="stylesheet" href="css/cdlm.css" type="text/css" />
<!--<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />-->
</head>
<body>
<! ------------------------------------------------------------ -->
<div id="cdlm_graph"></div>
<div id="cdlm_map"></div>
<! ------------------------------------------------------------ -->
<div id="topbar" title="change le type d'exporation" data-placement="right">
<a id="help" href="#helpModal" data-toggle="modal" title="où suis-je ?" data-placement="bottom"><img class="img-rounded" src="img/help_white.png"/></a>
<div id="topbar_modes">
<div class="btn-group" data-toggle="buttons-radio">
<div class="btn btn-large btn-inverse active" class-toggle="btn-inverse" id="m_map">Carte</div>
<div class="btn btn-large" class-toggle="btn-inverse" id="m_graph">Graphe</div>
</div>
</div>
</div>
<! ------------------------------------------------------------ -->
<div id="helpModal" class="modal show fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h1>dis-moi où tu me plaîs</h1>
<p><i>exploration des annonces du site <a href="http://croisedanslemetro.com" target="_blank">croisedanslemetro.com</a></i></p>
</div>
<div class="modal-body"><img src='img/dismoi.jpg'/></div>
<div class="modal-footer">
<p><a href="http://jdlf.info/p" target="_blank">Pierre JdlF</a> a mis tout ça sur <a href="http://github.com/pierrejdlf/cdlm" target="_blank">Github</a> avec des explications irrationnelles</p>
</div>
</div>
<! ------------------------------------------------------------ -->
<div id="panel_graph">
<ul class="nav nav-pills nav-stacked" title="afficher ou masquer une catégorie de mots" data-placement="bottom"></ul>
</div>
<! ------------------------------------------------------------ -->
<div id="panel_map">
<div id="panel_bys_outter">
<div id="panel_bys_overlay"></div>
<div id="panel_bys" title="COULEUR DES ZONES = nombre d'annonces pour les sexes selectionnés" data-placement="right">
<div class="btn-group fromto" data-toggle="buttons-radio" title="sexe du rédacteur" data-placement="bottom">
<div id="fH" class="bys btn btn-mini active btn-success" class-toggle="btn-success"><img src="img/homme.png"/></div>
<div id="fF" class="bys btn btn-mini" class-toggle="btn-warning"><img src="img/femme.png"/></div>
</div>
<div id="panel_fromto"> recherche </div><div class="btn-group fromto" data-toggle="buttons-radio" title="sexe du destinataire" data-placement="bottom">
<div id="tH" class="bys btn btn-mini" class-toggle="btn-success"><img src="img/homme.png"/></div>
<div id="tF" class="bys btn btn-mini active btn-warning" class-toggle="btn-warning"><img src="img/femme.png"/></div>
</div>
</div>
</div>
<div id="panel_stationname"><img src="img/metro.png" title="modifie l'affichage des stations. les couleurs correspondent aux lignes, la taille à la fréquentation annuelle." data-placement="bottom"/><div>Sélectionner une station</div></div>
<div id="panel_words_outter">
<div id="panel_words_overlay"></div>
<div id="panel_words" title="TAILLE DES STATIONS = présence cumulée du/des mot(s) sélectionné(s)" data-placement="right"></div>
</div>
</div>
<! ------------------------------------------------------------ -->
<script type="text/javascript">
d3.select("#cdlm_graph").style("opacity",0);
d3.select("#panel_graph").style("opacity",0);
$(document).ready(function(){
$('#helpModal').modal();
$('#helpModal').on("click",function(){ $('#helpModal').modal('hide'); });
init_map("cdlm_map");
init_graph("cdlm_graph");
$("#topbar_modes #m_graph").on("click", function(u) { // TO GRAPH
d3.select("#cdlm_map").style("display","none");
d3.select("#panel_map").style("pointer-events","none").style("opacity",0);
d3.select("#cdlm_graph").style("opacity",1);
d3.select("#panel_graph").style("opacity",1);
});
$("#topbar_modes #m_map").on("click", function(u) { // TO MAP
d3.select("#cdlm_graph").style("opacity",0);
d3.select("#panel_graph").style("opacity",0);
d3.select("#cdlm_map").style("display","");
d3.select("#panel_map").style("pointer-events","all").style("opacity",1);
});
$('.btn-group > .btn, .btn[data-toggle="button"]').click(function() {
if ($(this).attr('class-toggle') != undefined && !$(this).hasClass('disabled')) {
var btnGroup = $(this).parent('.btn-group');
if (btnGroup.attr('data-toggle') == 'buttons-radio') {
btnGroup.find('.btn').each(function() {
$(this).removeClass($(this).attr('class-toggle'));
});
$(this).addClass($(this).attr('class-toggle'));
}
if (btnGroup.attr('data-toggle') == 'buttons-checkbox' || $(this).attr('data-toggle') == 'button') {
if ($(this).hasClass('active')) {
$(this).removeClass($(this).attr('class-toggle'));
} else {
$(this).addClass($(this).attr('class-toggle'));
}
}
}
});
});
</script>
</body>
</html>