Commit 9141e628 authored by luxcem's avatar luxcem

modifs suite retours

parent d80953d7
...@@ -3,3 +3,4 @@ bower_components/ ...@@ -3,3 +3,4 @@ bower_components/
.sass-cache/ .sass-cache/
.tmp/ .tmp/
dist/ dist/
src/assets/deputes
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
"latedef": true, "latedef": true,
"newcap": true, "newcap": true,
"noarg": true, "noarg": true,
"quotmark": "single",
"regexp": true, "regexp": true,
"undef": true, "undef": true,
"unused": true, "unused": true,
......
...@@ -154,137 +154,7 @@ angular.module('soussurveillance') ...@@ -154,137 +154,7 @@ angular.module('soussurveillance')
'Saint-Pierre-et-Miquelon' 'Saint-Pierre-et-Miquelon'
]) ])
.constant('Groupes', [ .constant('Groupes', { "UMP":"Union pour un Mouvement Populaire", "SRC":"Socialiste, Républicain et Citoyen", "ECOLO":"Écologiste", "UDI":"Union des Démocrates et Indépendants", "RRDP":"Radical, Républicain, Démocrate et Progressiste", "GDR":"Gauche Démocrate et Républicaine", "NI":"Non Inscrits"})
{
'abbr': 'UMP',
'name': 'Union pour un Mouvement Populaire'
},
{
'abbr': 'SRC',
'name': 'Parti socialiste'
},
{
'abbr': 'UDI',
'name': 'Association PSLE Nouveau Centre'
},
{
'abbr': 'RRDP',
'name': 'Parti radical de gauche'
},
{
'abbr': 'SRC',
'name': ''
},
{
'abbr': 'ECOLO',
'name': 'Europe Écologie Les Verts'
},
{
'abbr': 'RRDP',
'name': 'Parti socialiste'
},
{
'abbr': 'UDI',
'name': 'Union des radicaux, centristes, indépendants et démocrates'
},
{
'abbr': 'GDR',
'name': 'Forces de gauche'
},
{
'abbr': 'UDI',
'name': 'Debout la République'
},
{
'abbr': 'GDR',
'name': 'Parti communiste Français'
},
{
'abbr': 'NI',
'name': 'Debout la République'
},
{
'abbr': 'GDR',
'name': 'Mouvement Indépendantiste Martiniquais'
},
{
'abbr': 'UMP',
'name': ''
},
{
'abbr': 'UMP',
'name': 'Debout la République'
},
{
'abbr': 'SRC',
'name': 'Parti progressiste Martiniquais'
},
{
'abbr': 'GDR',
'name': 'Pour la Réunion, de toutes nos forces'
},
{
'abbr': 'NI',
'name': 'Le Centre pour la France'
},
{
'abbr': 'NI',
'name': 'Parti socialiste'
},
{
'abbr': 'SRC',
'name': 'Parti communiste guadeloupéen'
},
{
'abbr': 'SRC',
'name': 'Démocratie et République'
},
{
'abbr': 'UDI',
'name': 'Tahoeraa Huiraatira'
},
{
'abbr': 'ECOLO',
'name': ''
},
{
'abbr': 'UDI',
'name': 'Calédonie Ensemble'
},
{
'abbr': 'RRDP',
'name': 'La politique autrement (Union de la majorité municipale)'
},
{
'abbr': 'SRC',
'name': 'Non rattaché'
},
{
'abbr': 'GDR',
'name': 'Rassemblement démocratique pour la Martinique'
},
{
'abbr': 'RRDP',
'name': 'Guadeloupe Unie Socialisme et Réalité'
},
{
'abbr': 'NI',
'name': 'Front national'
},
{
'abbr': 'GDR',
'name': 'Démocratie et République'
},
{
'abbr': 'RRDP',
'name': ''
},
{
'abbr': 'UDI',
'name': ''
}
])
/* /*
0 = unknown 0 = unknown
1 = green 1 = green
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
@main-secondary: #67809F; @main-secondary: #67809F;
@red-mask: #F22613; @red-mask: #F22613;
@green-mask: #2ECC71; @green-mask: #37FE2B;
@unknown-mask: #BFBFBF; @unknown-mask: #BFBFBF;
// //
// @red-mask: black; // @red-mask: black;
...@@ -19,6 +19,14 @@ ...@@ -19,6 +19,14 @@
@import 'less/description.less'; @import 'less/description.less';
@import 'less/oppositions.less'; @import 'less/oppositions.less';
html {
font-size: 100%;
}
body {
font-size: 85%;
}
@font-face { @font-face {
font-family: 'Oswald-Regular'; font-family: 'Oswald-Regular';
src: url(../assets/fonts/Oswald-Regular.ttf); src: url(../assets/fonts/Oswald-Regular.ttf);
...@@ -29,6 +37,22 @@ ...@@ -29,6 +37,22 @@
src: url(../assets/fonts/Oswald-DemiBold.ttf); src: url(../assets/fonts/Oswald-DemiBold.ttf);
} }
h1 {
font-size: 2em;
}
h2 {
font-size: 3em;
}
h3 {
font-size: 1.6em;
}
h4 {
font-size: 1.3em;
}
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
font-family: 'Oswald-Regular', sans-serif; font-family: 'Oswald-Regular', sans-serif;
} }
...@@ -42,37 +66,20 @@ p { ...@@ -42,37 +66,20 @@ p {
color: white; color: white;
h1 { h1 {
font-size: 6em; font-size: 5em;
@media (max-width: 640px) {
font-size: 3em;
}
font-family: 'Oswald-Bold', sans-serif; font-family: 'Oswald-Bold', sans-serif;
} }
h2 {
text-indent: 100px;
}
strong { strong {
background: white; background: white;
color: @main-primary; color: @main-primary;
} }
} }
#main {
h1 {
text-align:center;
font-size:4em;
// background: @main-secondary;
color: black;
text-indent: 1em;
padding: 10px;
font-weight: bold;
}
p {
padding: 0 10px;
}
}
// //
.clear { .clear {
clear: both; clear: both;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
.mask { .mask {
img { img {
opacity: @opacity; opacity: @opacity;
filter: grayscale(100%); // filter: grayscale(100%);
} }
} }
...@@ -36,10 +36,6 @@ ...@@ -36,10 +36,6 @@
background: @red-mask; background: @red-mask;
} }
.unknown-mask {
// background: @unknown-mask;
}
.depute-image:hover .depute-name{ .depute-image:hover .depute-name{
opacity:1; opacity:1;
animation: fadein 0.8s; animation: fadein 0.8s;
...@@ -91,21 +87,27 @@ ...@@ -91,21 +87,27 @@
} }
#depute-info { .depute-info {
background: #fff; background: #fff;
position: relative; position: relative;
z-index: 1000; z-index: 1000;
left: @depute-width; left: @depute-width;
width: 220px; width: 300px;
text-align: center; text-align: center;
border-radius: 4px; border-radius: 4px;
top: -249px; top: -249px;
opacity:1; opacity:1;
transition: opacity 1s ease 0s; transition: opacity 1s ease 0s;
ul {
text-align: left;
list-style-type: none;
padding-left:10px;
}
} }
#depute-info.ng-hide { .depute-info.ng-hide {
opacity:0; opacity:0;
} }
#description-block { #description-block {
.panel { .panel {
font-size: 1.4em; font-size: 1.1em;
} }
.panel-heading { .panel-heading {
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
} }
.panel-title { .panel-title {
font-size: 36px; font-size: 1.4em;
@media (max-width: 640px) {
font-size: 24px;
}
font-weight: bold; font-weight: bold;
} }
} }
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
} }
.thumbnail { .thumbnail {
// width: 30%; width: 30%;
width: 300px; // max-width: 300px;
min-width: 300px;
margin: 10px; margin: 10px;
} }
......
...@@ -10,6 +10,13 @@ angular.module('soussurveillance') ...@@ -10,6 +10,13 @@ angular.module('soussurveillance')
'status': '' 'status': ''
}; };
var currentDepute = null;
var hideCurrentDepute = function hideCurrentDepute() {
if (currentDepute) {
currentDepute.show = false;
}
};
$scope.deputes = []; $scope.deputes = [];
$scope.filteredDeputees = []; $scope.filteredDeputees = [];
$scope.currentPage = 1; $scope.currentPage = 1;
...@@ -20,27 +27,26 @@ angular.module('soussurveillance') ...@@ -20,27 +27,26 @@ angular.module('soussurveillance')
$scope.Groupes = Groupes; $scope.Groupes = Groupes;
$scope.DeputesInfos = DeputesInfos; $scope.DeputesInfos = DeputesInfos;
$scope.depute = {'show': false};
$http.get('assets/data/deputes_en_mandat.json').success(function(data){ $http.get('assets/data/deputes_en_mandat.json').success(function(data){
deputes = data.deputes; deputes = data.deputes;
$scope.deputes = _.shuffle(data.deputes); $scope.deputes = _.shuffle(data.deputes);
for (var i = 0; i < $scope.deputes.length; i++) {
var slug = $scope.deputes[i].depute.slug;
$scope.deputes[i].infos = DeputesInfos[slug];
$scope.deputes[i].show = false;
}
$scope.totalItems = data.deputes.length; $scope.totalItems = data.deputes.length;
$scope.applyPaginate(); $scope.applyPaginate();
}); });
$scope.selectDepute = function selectDepute(deputeSlug) { $scope.selectDepute = function selectDepute(depute) {
if ($scope.depute.show === true && $scope.depute.depute.slug === deputeSlug) { if (depute.show === true) {
$scope.depute.show = false; depute.show = false;
currentDepute = null;
} else { } else {
$scope.depute.show = false; depute.show = true;
for (var i = 0; i < deputes.length; i++) { hideCurrentDepute();
if (deputes[i].depute.slug === deputeSlug) { currentDepute = depute;
$scope.depute = deputes[i];
$scope.depute.infos = DeputesInfos[$scope.depute.depute.slug];
$scope.depute.show = true;
break;
}
}
} }
}; };
...@@ -56,7 +62,7 @@ angular.module('soussurveillance') ...@@ -56,7 +62,7 @@ angular.module('soussurveillance')
$scope.search.group = ''; $scope.search.group = '';
$scope.search.circ = ''; $scope.search.circ = '';
$scope.search.status = ''; $scope.search.status = '';
$scope.depute.show = false; hideCurrentDepute();
$scope.totalItems = $scope.deputes.length; $scope.totalItems = $scope.deputes.length;
$scope.applyPaginate(); $scope.applyPaginate();
...@@ -73,7 +79,7 @@ angular.module('soussurveillance') ...@@ -73,7 +79,7 @@ angular.module('soussurveillance')
$scope.search.group = ''; $scope.search.group = '';
$scope.search.name = ''; $scope.search.name = '';
$scope.search.status = ''; $scope.search.status = '';
$scope.depute.show = false; hideCurrentDepute();
$scope.totalItems = $scope.deputes.length; $scope.totalItems = $scope.deputes.length;
$scope.applyPaginate(); $scope.applyPaginate();
...@@ -92,25 +98,24 @@ angular.module('soussurveillance') ...@@ -92,25 +98,24 @@ angular.module('soussurveillance')
$scope.search.group = ''; $scope.search.group = '';
$scope.search.circ = ''; $scope.search.circ = '';
$scope.search.name = ''; $scope.search.name = '';
$scope.depute.show = false; hideCurrentDepute();
$scope.totalItems = $scope.deputes.length; $scope.totalItems = $scope.deputes.length;
$scope.applyPaginate(); $scope.applyPaginate();
}; };
$scope.changeGroup = function changeCirc() { $scope.changeGroup = function changeGroup() {
if ($scope.search.group === '') { if ($scope.search.group === '') {
$scope.deputes = deputes; $scope.deputes = deputes;
} else { } else {
$scope.deputes = _.filter(deputes, function(depute) { $scope.deputes = _.filter(deputes, function(depute) {
var group = Groupes[$scope.search.group]; return depute.depute.groupe_sigle === $scope.search.group;
return depute.depute.groupe_sigle === group.abbr && depute.depute.parti_ratt_financier === group.name;
}); });
} }
$scope.search.circ = ''; $scope.search.circ = '';
$scope.search.name = ''; $scope.search.name = '';
$scope.search.status = ''; $scope.search.status = '';
$scope.depute.show = false; hideCurrentDepute();
$scope.totalItems = $scope.deputes.length; $scope.totalItems = $scope.deputes.length;
$scope.applyPaginate(); $scope.applyPaginate();
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<label for="circonscriptionFilter">Circonscription</label> <label for="circonscriptionFilter">Circonscription</label>
<select id="circonscriptionFilter" class="form-control" ng-change="changeCirc()" ng-model="search.circ"> <select id="circonscriptionFilter" class="form-control" ng-change="changeCirc()" ng-model="search.circ">
<option></option> <option></option>
<option ng-repeat="circ in Circonscriptions" value="{{circ}}">{{circ}}</option> <option ng-repeat="circ in Circonscriptions | orderBy:circ " value="{{circ}}">{{circ}}</option>
</select> </select>
</div> </div>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<label for="groupFilter">Groupe</label> <label for="groupFilter">Groupe</label>
<select id="groupFilter" class="form-control" ng-change="changeGroup()" ng-model="search.group"> <select id="groupFilter" class="form-control" ng-change="changeGroup()" ng-model="search.group">
<option></option> <option></option>
<option ng-repeat="group in Groupes" value="{{ $index }}">{{ group.abbr }} ‑ {{ group.name }}</option> <option ng-repeat="(groupe, nom) in Groupes | orderBy:groupe" value="{{ groupe }}">{{ groupe }} - {{ nom }}</option>
</select> </select>
</div> </div>
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
<label for="statusFilter">Position</label> <label for="statusFilter">Position</label>
<select id="statusFilter" class="form-control" ng-change="changeStatus()" ng-model="search.status"> <select id="statusFilter" class="form-control" ng-change="changeStatus()" ng-model="search.status">
<option></option> <option></option>
<option value="0">Inconnue</option> <option value="0">Inconnues</option>
<option value="1">Opposée au texte</option> <option value="1">Opposées au texte</option>
<option value="2">Favorable au texte</option> <option value="2">Favorables au texte</option>
</select> </select>
</div> </div>
...@@ -40,17 +40,26 @@ ...@@ -40,17 +40,26 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div id="deputes-list" class="col-md-12"> <div id="deputes-list" class="col-md-12">
<a href="#depute-info" ng-click="selectDepute(depute.depute.slug)" ng-repeat="depute in filteredDeputees" class="depute-image"> <div ng-repeat="depute in filteredDeputees" class="depute-image">
<a href="" ng-click="selectDepute(depute)">
<figure class="mask" ng-class="colorMask(depute)" fade-on-load> <figure class="mask" ng-class="colorMask(depute)" fade-on-load>
<img ng-src="http://www.nosdeputes.fr/depute/photo/{{depute.depute.slug}}/200"> <img ng-src="assets/deputes/{{depute.depute.slug}}.png">
</figure> </figure>
<div class="depute-name">{{ depute.depute.nom }}</div> <div class="depute-name">{{ depute.depute.nom }}</div>
<div ng-show="depute.show" id="depute-info">
<!-- <div ng-include="'app/main/components/deputes/depute-call.html'"></div> -->
<h2>{{ depute.depute.nom }}</h2>
<object data="http://piphone.lqdn.fr/campaign/widgetan/pjl_renseignement/verti/fr/{{ depute.depute.slug }}" width="215" height="380"></object>
</div>
</a> </a>
<div class="depute-info" ng-show="depute.show">
<h3>{{ depute.depute.nom }}</h3>
<ul>
<li ng-repeat="email in depute.depute.emails">
<a ng-href="mailto:{{email.email}}">{{ email.email }}</a>
</li>
<li ng-if="depute.infos.twitter">Twitter : <a ng-href="https://twitter.com/{{ depute.infos.twitter }}">@{{ depute.infos.twitter }}</a></li>
<li ng-if="depute.infos.website"><a ng-href="{{ depute.infos.website }}">{{ depute.infos.website }}</a></li>
<!-- <li><a ng-href="{{depute.depute.url_an}}">{{ depute.depute.url_an }}</a></li> -->
<!-- <li><a ng-href="{{depute.depute.url_nosdeputes}}">{{ depute.depute.url_nosdeputes }}</a></li> -->
</ul>
<object data="http://piphone.lqdn.fr/campaign/widgetan/pjl_renseignement/verti/fr/{{ depute.depute.slug }}" width="215" height="380"></object>
</div>
</div> </div>
</div> </div>
</div> </div>
......