<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>Musitag - Futur en Seine 2012</title>
<link rel="stylesheet" type="text/css" href="css/musitag.css" />
<script type="text/javascript" src="libs/jquery.min.js"></script>
<script type="text/javascript" src="libs/mustache.js"></script>
<script type="text/javascript" src="libs/underscore-min.js"></script>
<script type="text/javascript" src="metadataplayer/LdtPlayer-core.js"></script>
</head>
<body>
<div class="big-container">
<div class="home-header">
<h1>Musitag</h1>
<h2>Mets tes couleurs, tes émotions<br />et ta voix sur la musique !</h2>
</div>
<div class="home-media">
<a href="#">
<img class="home-media-image" src="media/wari-120.jpg" />
</a>
<h3>
<a href="#">Au Clair de la Lune</a>
</h3>
<h4>
<a href="#">Steve Waring</a>
</h4>
<div id="dataviz-1"></div>
</div>
<div class="home-media">
<a href="#">
<img class="home-media-image" src="media/wari-120.jpg" />
</a>
<h3>
<a href="#">Au Clair de la Lune</a>
</h3>
<h4>
<a href="#">Steve Waring</a>
</h4>
</div>
<div class="home-media">
<a href="#">
<img class="home-media-image" src="media/wari-120.jpg" />
</a>
<h3>
<a href="#">Au Clair de la Lune</a>
</h3>
<h4>
<a href="#">Steve Waring</a>
</h4>
</div>
<div class="home-media">
<a href="#">
<img class="home-media-image" src="media/wari-120.jpg" />
</a>
<h3>
<a href="#">Au Clair de la Lune</a>
</h3>
<h4>
<a href="#">Steve Waring</a>
</h4>
</div>
<div class="home-media">
<a href="#">
<img class="home-media-image" src="media/wari-120.jpg" />
</a>
<h3>
<a href="#">Au Clair de la Lune</a>
</h3>
<h4>
<a href="#">Steve Waring</a>
</h4>
</div>
<div class="home-media">
<a href="#">
<img class="home-media-image" src="media/wari-120.jpg" />
</a>
<h3>
<a href="#">Au Clair de la Lune</a>
</h3>
<h4>
<a href="#">Steve Waring</a>
</h4>
</div>
<div class="footer">
<div class="footer-idf">
<p class="footer-soutenu">Soutenu par le<br />Conseil Régional</p>
<a href="http://www.iledefrance.fr/" title="Région Île-de-France">
<img src="img/logo-idf.png" alt="Région Île-de-France" />
</a>
</div>
<a href="http://www.futur-en-seine.fr/" title="Festival Futur En Seine 2012">
<img src="img/logo-fens.png" class="footer-logo" alt="Festival Futur En Seine 2012" />
</a>
<a href="http://www.tralalere.com/" title="Tralalere">
<img src="img/logo-tralalere.png" class="footer-logo" alt="Tralalere" />
</a>
<a href="http://www.iri.centrepompidou.fr/" title="Institut de Recherche et d'Innovation">
<img src="img/logo-iri.png" class="footer-logo" alt="Institut de Recherche et d'Innovation" />
</a>
</div>
</div>
<script type="text/javascript">
function getVolumes(_source, _list) {
var _volumes = _(_list).map(function(_e) {
return {
annotation: _e,
volume: _source.getAnnotations().searchByTitle(_e).length
};
}),
_max = _(_volumes).max(function(_e) { return _e.volume }).volume,
_volumes = _(_volumes).filter(function(_e) { return _e.volume });
if (_max) {
var _total = 0;
_(_volumes).each(function(_e) {
_e.size = 50 * _e.volume / _max;
_e.scale = 1 * _e.volume / _max;
_total += _e.size;
});
if (_total > 140) {
var _f = 140 / _total;
_(_volumes).each(function(_e) {
_e.size = _f * _e.size;
_e.scale = _f * _e.scale;
});
}
}
//return _volumes;
return _(_volumes).sortBy(function(_e) {return -_e.volume;});
}
IriSP._ = _;
IriSP.jQuery = jQuery;
var _sourceManager = new IriSP.Model.Directory(),
_emoticons = ['happy', 'unhappy', 'laughing', 'surprised'],
_colors = ['red', 'yellow', 'green', 'blue'],
_source = _sourceManager.remoteSource({
url: "http://192.168.56.101/musitag/tralalere/ldt/cljson/id/156c66cc-afe5-11e1-807a-58b035f6b93d",
serializer: IriSP.serializers.ldt
}),
_template =
'<ul class="home-dataviz home-dataviz-colors">'
+ '{{#colors}}<li style="width: {{size}}px">'
+ '<div class="tag-container-50" style="-webkit-transform-origin: bottom left; -webkit-transform: scale({{scale}}); -moz-transform-origin: bottom left; -moz-transform: scale({{scale}});">'
+ '<div class="tag-color tag-{{annotation}}"></div></div></li>{{/colors}}'
+ '</ul><ul class="home-dataviz home-dataviz-emoticon">'
+ '{{#emoticons}}<li style="width: {{size}}px">'
+ '<div class="tag-container-50" style="-webkit-transform-origin: bottom left; -webkit-transform: scale({{scale}}); -moz-transform-origin: bottom left; -moz-transform: scale({{scale}});">'
+ '<div class="tag-color"></div><div class="tag-emoticon tag-{{annotation}}"></div></div></li>{{/emoticons}}'
+ '</ul>';
_source.onLoad(function() {
$("#dataviz-1").html(Mustache.to_html(_template,{emoticons:getVolumes(_source, _emoticons),colors:getVolumes(_source, _colors)}));
});
</script>
</body>
</html>