Compare commits

..

No commits in common. "60422a64007b5bc6fad71596c0d4c7d93d731d8a" and "6e07aec3a558708926f603ea2f879412798ce747" have entirely different histories.

16 changed files with 673 additions and 926 deletions

View File

@ -34,7 +34,6 @@
<article class="main"> <article class="main">
<h1>Biographie</h1> <h1>Biographie</h1>
<img src="images/ginou50.jpg" class="bio-img" alt="Ginou, peignant dans les années 50">
<p>Ginou, née Geneviève Collignon, était une artiste-peintre qui a vécu la plus grande partie de sa vie à Dugny-sur-Meuse, village de la vallée de la Meuse où elle trouvera de nombreux sujets dinspiration.</p> <p>Ginou, née Geneviève Collignon, était une artiste-peintre qui a vécu la plus grande partie de sa vie à Dugny-sur-Meuse, village de la vallée de la Meuse où elle trouvera de nombreux sujets dinspiration.</p>
<p>Comme l'écrit Ginou en 2016 dans un texte sur sa jeunesse, &laquo;&#8239;je suis née un jour de mars 1936 dans un petit village de la Meuse : Mouilly, le berceau des parents de mon père&#8239;&raquo;. Elle a 4 ans quand la Seconde Guerre Mondiale éclate, et en garde des souvenirs très précis, même 75 ans après. Après avoir passé le certificat d'études avec succès, Geneviève apprend le métier de couturière de son père Eugène, tailleur installé dans le bas du petit village isolé dans la forêt meusienne, dans une maison sur les berges du petit ruisseau qui serpente au fond d'une vallée accrochée aux contreforts des côtes de Meuse.</p> <p>Comme l'écrit Ginou en 2016 dans un texte sur sa jeunesse, &laquo;&#8239;je suis née un jour de mars 1936 dans un petit village de la Meuse : Mouilly, le berceau des parents de mon père&#8239;&raquo;. Elle a 4 ans quand la Seconde Guerre Mondiale éclate, et en garde des souvenirs très précis, même 75 ans après. Après avoir passé le certificat d'études avec succès, Geneviève apprend le métier de couturière de son père Eugène, tailleur installé dans le bas du petit village isolé dans la forêt meusienne, dans une maison sur les berges du petit ruisseau qui serpente au fond d'une vallée accrochée aux contreforts des côtes de Meuse.</p>

File diff suppressed because one or more lines are too long

View File

@ -102,10 +102,6 @@
<img src="photos/divers/mini/exposaintjean.jpg" alt="Fête du collège Saint-Jean de Verdun (2005)."> <img src="photos/divers/mini/exposaintjean.jpg" alt="Fête du collège Saint-Jean de Verdun (2005).">
</a> </a>
<a data-fancybox="divers" href="photos/divers/normal/expojeannot.jpg" data-caption="Exposition à la foire aux puces de Dugny, avec le Jeannot (1995).">
<img src="photos/divers/mini/expojeannot.jpg" alt="Exposition à la foire aux puces de Dugny, avec le Jeannot (1995).">
</a>
<a data-fancybox="divers" href="photos/divers/normal/foiredugny.jpg" data-caption="Foire aux puces de Dugny-sur-Meuse (2004)."> <a data-fancybox="divers" href="photos/divers/normal/foiredugny.jpg" data-caption="Foire aux puces de Dugny-sur-Meuse (2004).">
<img src="photos/divers/mini/foiredugny.jpg" alt="Foire aux puces de Dugny-sur-Meuse (2004)."> <img src="photos/divers/mini/foiredugny.jpg" alt="Foire aux puces de Dugny-sur-Meuse (2004).">
</a> </a>
@ -114,10 +110,6 @@
<img src="photos/divers/mini/foirethierville.jpg" alt="Foire de Thierville-sur-Meuse (2002)."> <img src="photos/divers/mini/foirethierville.jpg" alt="Foire de Thierville-sur-Meuse (2002).">
</a> </a>
<a data-fancybox="divers" href="photos/divers/normal/expobarleduc.jpg" data-caption="Exposition au siège du Conseil Général de Bar-le-Duc (1994).">
<img src="photos/divers/mini/expobarleduc.jpg" alt="Exposition au siège du Conseil Général de Bar-le-Duc (1994).">
</a>
<a data-fancybox="divers" href="photos/divers/normal/derniereexpo.jpg" data-caption="Dernière exposition où les tableaux de Ginou ont été présentés à titre posthume (2017)."> <a data-fancybox="divers" href="photos/divers/normal/derniereexpo.jpg" data-caption="Dernière exposition où les tableaux de Ginou ont été présentés à titre posthume (2017).">
<img src="photos/divers/mini/derniereexpo.jpg" alt="Dernière exposition où les tableaux de Ginou ont été présentés à titre posthume (2017)."> <img src="photos/divers/mini/derniereexpo.jpg" alt="Dernière exposition où les tableaux de Ginou ont été présentés à titre posthume (2017).">
</a> </a>
@ -148,7 +140,7 @@
<p> <p>
De 1956 à 2016, soit sur une période de 60 ans, Ginou a peint plus de de 385 tableaux.<br> De 1956 à 2016, soit sur une période de 60 ans, Ginou a peint plus de de 385 tableaux.<br>
Parmi ceux-ci, elle a le plus souvent aimé travailler à la lumière printanière du mois de mai avec un total de 50 tableaux.<br> Parmi ceux-ci, elle a le plus souvent aimé travailler à la lumière printanière du mois de mai avec un total de 50 tableaux.<br>
Son année la plus active fut 1988 où elle réalisa 23 &oelig;uvres. Enfin, le genre de tableau quelle préféra peindre était des paysages, plus particulièrement à la campagne. Son année la plus active fut 1988 où elle réalisa 23 &oelig;uvres. Enfin, le format qu'elle privilégia fut le <em>55x46</em>, utilisé pour 53 toiles.
</p> </p>
<div id="stats"> <div id="stats">

View File

@ -61,7 +61,16 @@
<div class="item-cont"> <div class="item-cont">
<span><input type="checkbox" id="photos" name="photos" value="all"> <span><input type="checkbox" id="photos" name="photos" value="all">
<label for="photos">Tout état</label></span> <label for="photos">Tout état</label></span>
<div class="generated"></div> <span><input type="checkbox" id="none" name="photo" value="none">
<label for="none">&#x2606; manquant</label></span>
<span><input type="checkbox" id="exist" name="photo" value="exist">
<label for="exist">Disponible</label></span>
<span><input type="checkbox" id="bad" name="photo" value="bad">
<label for="bad">&#x2605; mauvais</label></span>
<span><input type="checkbox" id="ok" name="photo" value="ok">
<label for="ok">&#x2605;&#x2605; acceptable</label></span>
<span><input type="checkbox" id="good" name="photo" value="good">
<label for="good">&#x2605;&#x2605;&#x2605; bon</label></span>
</div> </div>
</div> </div>
<div class="box years"> <div class="box years">
@ -69,7 +78,20 @@
<div class="item-cont"> <div class="item-cont">
<span><input type="checkbox" id="years" name="years" value="all"> <span><input type="checkbox" id="years" name="years" value="all">
<label for="years">Toutes</label></span> <label for="years">Toutes</label></span>
<div class="generated"></div> <span><input type="checkbox" id="50s" name="year" value="50s">
<label for="50s">1956 - 1959</label></span>
<span><input type="checkbox" id="60s" name="year" value="60s">
<label for="60s">1960 - 1969</label></span>
<span><input type="checkbox" id="70s" name="year" value="70s">
<label for="70s">1970 - 1979</label></span>
<span><input type="checkbox" id="80s" name="year" value="80s">
<label for="80s">1980 - 1989</label></span>
<span><input type="checkbox" id="90s" name="year" value="90s">
<label for="90s">1990 - 1999</label></span>
<span><input type="checkbox" id="00s" name="year" value="00s">
<label for="00s">2000 - 2009</label></span>
<span><input type="checkbox" id="10s" name="year" value="10s">
<label for="10s">2010 - 2016</label></span>
</div> </div>
</div> </div>
<div class="box months"> <div class="box months">
@ -77,7 +99,30 @@
<div class="item-cont"> <div class="item-cont">
<span><input type="checkbox" id="months" name="months" value="all"> <span><input type="checkbox" id="months" name="months" value="all">
<label for="months">Tous</label></span> <label for="months">Tous</label></span>
<div class="generated"></div> <span><input type="checkbox" id="01" name="month" value="01">
<label for="01">Janvier</label></span>
<span><input type="checkbox" id="02" name="month" value="02">
<label for="02">Février</label></span>
<span><input type="checkbox" id="03" name="month" value="03">
<label for="03">Mars</label></span>
<span><input type="checkbox" id="04" name="month" value="04">
<label for="04">Avril</label></span>
<span><input type="checkbox" id="05" name="month" value="05">
<label for="05">Mai</label></span>
<span><input type="checkbox" id="06" name="month" value="06">
<label for="06">Juin</label></span>
<span><input type="checkbox" id="07" name="month" value="07">
<label for="07">Juillet</label></span>
<span><input type="checkbox" id="08" name="month" value="08">
<label for="08">Août</label></span>
<span><input type="checkbox" id="09" name="month" value="09">
<label for="09">Septembre</label></span>
<span><input type="checkbox" id="10" name="month" value="10">
<label for="10">Octobre</label></span>
<span><input type="checkbox" id="11" name="month" value="11">
<label for="11">Novembre</label></span>
<span><input type="checkbox" id="12" name="month" value="12">
<label for="12">Décembre</label></span>
</div> </div>
</div> </div>
<div class="box genres"> <div class="box genres">
@ -85,7 +130,6 @@
<div class="item-cont"> <div class="item-cont">
<span><input type="checkbox" id="genres" name="genres" value="all"> <span><input type="checkbox" id="genres" name="genres" value="all">
<label for="genres">Tous</label></span> <label for="genres">Tous</label></span>
<div class="generated"></div>
</div> </div>
</div> </div>
<div class="box themes"> <div class="box themes">
@ -93,7 +137,6 @@
<div class="item-cont"> <div class="item-cont">
<span><input type="checkbox" id="themes" name="themes" value="all"> <span><input type="checkbox" id="themes" name="themes" value="all">
<label for="themes">Tous</label></span> <label for="themes">Tous</label></span>
<div class="generated"></div>
</div> </div>
</div> </div>
<div class="box places"> <div class="box places">
@ -109,7 +152,7 @@
<div class="item-cont"> <div class="item-cont">
<span><input type="checkbox" id="tags" name="tags" value="all"> <span><input type="checkbox" id="tags" name="tags" value="all">
<label for="tags">Tous</label></span> <label for="tags">Tous</label></span>
<span class="first"><span class="inline">&#x203B;&nbsp;</span><select name="tag"></select></span> <span><span class="inline">&#x203B;&nbsp;</span><select name="tag"></select></span>
</div> </div>
</div> </div>
<div class="box dimensions"> <div class="box dimensions">
@ -117,7 +160,26 @@
<div class="item-cont"> <div class="item-cont">
<span><input type="checkbox" id="dimensions" name="dimensions" value="all"> <span><input type="checkbox" id="dimensions" name="dimensions" value="all">
<label for="dimensions">Toutes</label></span> <label for="dimensions">Toutes</label></span>
<div class="generated"></div> <span><input type="checkbox" id="18" name="dimension" value="18">
<label for="18">&lt; 20cm</label></span>
<span><input type="checkbox" id="20" name="dimension" value="20">
<label for="20">20cm - 29cm</label></span>
<span><input type="checkbox" id="30" name="dimension" value="30">
<label for="30">30cm - 39cm</label></span>
<span><input type="checkbox" id="40" name="dimension" value="40">
<label for="40">40cm - 49cm</label></span>
<span><input type="checkbox" id="50" name="dimension" value="50">
<label for="50">50cm - 59cm</label></span>
<span><input type="checkbox" id="60" name="dimension" value="60">
<label for="60">60cm - 69cm</label></span>
<span><input type="checkbox" id="70" name="dimension" value="70">
<label for="70">70cm - 79cm</label></span>
<span><input type="checkbox" id="80" name="dimension" value="80">
<label for="80">80cm - 89cm</label></span>
<span><input type="checkbox" id="90" name="dimension" value="90">
<label for="90">90cm - 99cm</label></span>
<span><input type="checkbox" id="100" name="dimension" value="100">
<label for="100">>= 100cm</label></span>
</div> </div>
</div> </div>
<div class="box help"> <div class="box help">
@ -125,14 +187,14 @@
<div class="item-cont"> <div class="item-cont">
<span><input type="checkbox" id="helps" name="helps" value="all"> <span><input type="checkbox" id="helps" name="helps" value="all">
<label for="helps">Toute</label></span> <label for="helps">Toute</label></span>
<div class="generated"></div> <span><input type="checkbox" id="no" name="help" value="no">
<label for="no">Non</label></span>
<span><input type="checkbox" id="yes" name="help" value="yes">
<label for="yes"><img width="5rem" src="styles/icons/exclamation-mark.svg" alt="Oui"> Oui</label></span>
</div> </div>
</div> </div>
</div> </div>
<div class="button-cont">
<input type="submit" value="Générer"> <input type="submit" value="Générer">
<input type="button" value="Réinitialiser">
</div>
</form> </form>
<p class="no-result"><strong>Aucun résultat.</strong> Veuillez réessayer avec d'autres paramètres.</p> <p class="no-result"><strong>Aucun résultat.</strong> Veuillez réessayer avec d'autres paramètres.</p>
<div id="style-container"> <div id="style-container">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

View File

@ -35,7 +35,7 @@
<h1>L'art de Ginou</h1> <h1>L'art de Ginou</h1>
<p>Ginou était une artiste peintre autodidacte très appréciée dans son entourage. Elle a réalisé de nombreuses &oelig;uvres, principalement à la <strong>peinture à lhuile</strong>, occasionnellement à l<strong>aquarelle</strong>, mais aussi par le biais de la <strong>peinture sur soie</strong> et <strong>sur bois</strong> ou bien encore dans les cahiers où elle écrivait des <strong>poèmes illustrés</strong>.</p> <p>Ginou était une artiste peintre autodidacte très appréciée dans son entourage. Elle a réalisé de nombreuses &oelig;uvres, principalement à la <strong>peinture à lhuile</strong>, occasionnellement à l<strong>aquarelle</strong>, mais aussi par le biais de la <strong>peinture sur soie</strong> et <strong>sur bois</strong> ou bien encore dans les cahiers où elle écrivait des <strong>poèmes illustrés</strong>.</p>
<p>Tout au long de sa vie, Ginou a tenu à jour un petit carnet où elle consignait ses tableaux, en leur attribuant un numéro et un titre et reportait les dimensions et leur destinataires / acheteurs / commanditaires. Dans ce petit carnet, <strong>de 1958 à 2017</strong>, sont référencés 383 tableaux. Cependant deux tableaux (nº33 et nº49) ont été recouverts par Ginou elle-même. Nous avons aussi retrouvé 4 inédits. Ginou a commencé à prendre en photos certains tableaux quelle peignait dans les années 1980 puis plus systématiquement à partir des années 2000. Pour compléter cette base iconographique, nous avons repris en photo haute résolution les tableaux en notre possession. Ainsi, pour le moment, nous pouvons présenter sur ce site <strong>249 des 385 tableaux recensés.</strong></p> <p>Tout au long de sa vie, Ginou a tenu à jour un petit carnet où elle consignait ses tableaux, en leur attribuant un numéro et un titre et reportait les dimensions et leur destinataires / acheteurs / commanditaires. Dans ce petit carnet, <strong>de 1958 à 2017</strong>, sont référencés 383 tableaux. Cependant 2 tableaux (nº33 et nº49) ont été recouverts par Ginou elle-même. Nous avons aussi retrouvé 4 inédits. Ginou a commencé à prendre en photos certains tableaux quelle peignait dans les années 1980 puis plus systématiquement à partir des années 2000. Pour compléter cette base iconographique, nous avons repris en photo haute résolution les tableaux en notre possession. Ainsi, pour le moment, nous pouvons présenter sur ce site <strong>249 des 385 tableaux recensés.</strong></p>
<p>Ce site est conçu pour présenter un aperçu de son talent et pour que tout le monde puisse apprécier son &oelig;uvre.</p> <p>Ce site est conçu pour présenter un aperçu de son talent et pour que tout le monde puisse apprécier son &oelig;uvre.</p>

View File

@ -44,7 +44,7 @@
<div class="stat"> <div class="stat">
<canvas id="photo"></canvas> <canvas id="photo"></canvas>
<span class="legend-cont"><span class="legend none"></span><span>Photo manquante</span></span> <span class="legend-cont"><span class="legend none"></span><span>Pas de photo</span></span>
<span class="legend-cont"><span class="legend bad"></span><span>Photo de mauvaise qualité</span></span> <span class="legend-cont"><span class="legend bad"></span><span>Photo de mauvaise qualité</span></span>
<span class="legend-cont"><span class="legend ok"></span><span>Photo de qualité acceptable</span></span> <span class="legend-cont"><span class="legend ok"></span><span>Photo de qualité acceptable</span></span>
<span class="legend-cont"><span class="legend good"></span><span>Photo de bonne qualité</span></span> <span class="legend-cont"><span class="legend good"></span><span>Photo de bonne qualité</span></span>
@ -70,7 +70,7 @@
<p>Le code source est librement disponible <em>via git</em> en <a href="https://git.n700.ovh/keb/ginou">cliquant ici</a>. Cela signifie qu'il est possible d'obtenir le site en local pour son utilisation personnelle, moyennant quelques connaissances techniques.</p> <p>Le code source est librement disponible <em>via git</em> en <a href="https://git.n700.ovh/keb/ginou">cliquant ici</a>. Cela signifie qu'il est possible d'obtenir le site en local pour son utilisation personnelle, moyennant quelques connaissances techniques.</p>
<p>Site réalisé par <a href="https://theo.marchal.dev">Théo</a> et Denis Marchal avec la participation de toute la famille. Dernière mise à jour en mars 2021.</p> <p>Site réalisé par <a href="https://theo.marchal.dev">Théo</a> et Denis Marchal avec la participation de toute la famille. Dernière mise à jour en février 2021.</p>
</article> </article>
</body> </body>
</html> </html>

2
photos

@ -1 +1 @@
Subproject commit cb8156ed916c95b1f3012ae769434414bcbb134e Subproject commit 06d11b6b2f872ffb7bfcabf4e098000ff70b24fb

View File

@ -12,13 +12,6 @@ function onSubmit() {
return true; return true;
} }
function removeFromArray(array, item)
{
index = array.indexOf(item);
if (index > -1)
array.splice(index, 1);
}
jQuery(document).ready(function($) jQuery(document).ready(function($)
{ {
// get URL parameters // get URL parameters
@ -32,7 +25,6 @@ jQuery(document).ready(function($)
paramTag = (urlParams.get('tags') == null ? urlParams.getAll('tag') : urlParams.getAll('tags')); paramTag = (urlParams.get('tags') == null ? urlParams.getAll('tag') : urlParams.getAll('tags'));
paramPhoto = (urlParams.get('photos') == null ? urlParams.getAll('photo') : urlParams.getAll('photos')); paramPhoto = (urlParams.get('photos') == null ? urlParams.getAll('photo') : urlParams.getAll('photos'));
paramHelp = (urlParams.get('helps') == null ? urlParams.getAll('help') : urlParams.getAll('helps')); paramHelp = (urlParams.get('helps') == null ? urlParams.getAll('help') : urlParams.getAll('helps'));
params = { "year": paramYear, "month": paramMonth, "dimension": paramDimension, "genre": paramGenre, "theme": paramTheme, "place": paramPlace, "tag": paramTag, "photo": paramPhoto, "help": paramHelp }
$.getJSON("data.json", function(data) $.getJSON("data.json", function(data)
{ {
@ -41,118 +33,21 @@ jQuery(document).ready(function($)
/** MENU **/ /** MENU **/
/**********/ /**********/
var availableOptions = []; var genres = [];
var selectedOptions = []; var themes = [];
var places = [];
var tags = [];
// filter data depending of parameters function generateMenu()
function filterData(selectedOptions)
{ {
function CheckItem(name, selectedElements)
{
return function(item)
{
if (selectedElements.length == 0)
return true;
for (elem of selectedElements)
{
if (elem == "all")
return true;
if (item[name] == elem)
return true;
}
return false;
}
}
function CheckTag(item)
{
for (tag of selectedOptions.tags)
{
if (tag == "all")
return true;
if (!item.tags.includes(tag))
return false;
}
return true;
}
function CheckDimension(item)
{
if (selectedOptions.dimensions.length == 0)
return true;
for (dimension of selectedOptions.dimensions)
{
if (dimension == "all")
return true;
if (item.dimension.split("x")[0] == dimension)
return true;
}
return false;
}
data = data.filter(CheckTag);
data = data.filter(CheckDimension);
data = data.filter(CheckItem("year", selectedOptions.years));
data = data.filter(CheckItem("photo", selectedOptions.photos));
data = data.filter(CheckItem("month", selectedOptions.months));
data = data.filter(CheckItem("genre", selectedOptions.genres));
data = data.filter(CheckItem("theme", selectedOptions.themes));
data = data.filter(CheckItem("place", selectedOptions.places));
data = data.filter(CheckItem("help", selectedOptions.helps));
}
// gather data from json to make form
function gatherData()
{
var photos = []; var years = []; var months = []; var genres = [];
var themes = []; var places = []; var tags = []; var dimensions = []; var helps = [];
function makeItem(item, array, displayName, min, max)
{
if (item >= min && item <= max)
{
if (array.indexOf(displayName) === -1)
array.push(displayName);
}
}
for (i of data) for (i of data)
{ {
if (photos.indexOf(i.photo) === -1 && i.photo != "" && i.photo != "—")
photos.push(i.photo);
if (months.indexOf(i.month) === -1 && i.month != "" && i.month != "—")
months.push(i.month);
if (genres.indexOf(i.genre) === -1 && i.genre != "" && i.genre != "—") if (genres.indexOf(i.genre) === -1 && i.genre != "" && i.genre != "—")
genres.push(i.genre); genres.push(i.genre);
if (themes.indexOf(i.theme) === -1 && i.theme != "" && i.theme != "—") if (themes.indexOf(i.theme) === -1 && i.theme != "" && i.theme != "—")
themes.push(i.theme); themes.push(i.theme);
if (places.indexOf(i.place) === -1 && i.place != "" && i.place != "—") if (places.indexOf(i.place) === -1 && i.place != "" && i.place != "—")
places.push(i.place); places.push(i.place);
if (helps.indexOf(i.help) === -1 && i.help != "" && i.help != "—")
helps.push(i.help);
if (i.year != "" && i.year != "—")
{
makeItem(i.year, years, "50s", 1956, 1959);
makeItem(i.year, years, "60s", 1960, 1969);
makeItem(i.year, years, "70s", 1970, 1979);
makeItem(i.year, years, "80s", 1980, 1989);
makeItem(i.year, years, "90s", 1990, 1999);
makeItem(i.year, years, "00s", 2000, 2009);
makeItem(i.year, years, "10s", 2010, 2016);
}
if (i.dimension != "" && i.dimension != "—")
{
makeItem(i.dimension.split("x")[0], dimensions, "18", 0, 19);
makeItem(i.dimension.split("x")[0], dimensions, "20", 20, 29);
makeItem(i.dimension.split("x")[0], dimensions, "30", 30, 39);
makeItem(i.dimension.split("x")[0], dimensions, "40", 40, 49);
makeItem(i.dimension.split("x")[0], dimensions, "50", 50, 59);
makeItem(i.dimension.split("x")[0], dimensions, "60", 60, 69);
makeItem(i.dimension.split("x")[0], dimensions, "70", 70, 79);
makeItem(i.dimension.split("x")[0], dimensions, "80", 80, 89);
makeItem(i.dimension.split("x")[0], dimensions, "90", 90, 99);
makeItem(i.dimension.split("x")[0], dimensions, "100", 100, 109);
}
if (tags.indexOf(i.tags) === -1 && i.tags != "" && i.tags != "—") if (tags.indexOf(i.tags) === -1 && i.tags != "" && i.tags != "—")
{ {
splitTags = i.tags.split(", "); splitTags = i.tags.split(", ");
@ -167,134 +62,145 @@ jQuery(document).ready(function($)
genres.sort(); genres.sort();
themes.sort(); themes.sort();
helps.sort();
places.sort(Intl.Collator().compare); places.sort(Intl.Collator().compare);
tags.sort(Intl.Collator().compare); tags.sort(Intl.Collator().compare);
dimensions.sort(function(a, b) { return a - b; });
var targetMonths = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"];
months.sort(function(a, b) { return targetMonths.indexOf(a) - targetMonths.indexOf(b); });
var targetPhotos = ["none", "bad", "ok", "good"];
photos.sort(function(a, b) { return targetPhotos.indexOf(a) - targetPhotos.indexOf(b); });
return {"photos": photos, "years": years, "months": months, "genres": genres, "themes": themes, "places": places, "tags": tags, "dimensions": dimensions, "helps": helps}; for (genre of genres)
{
html = '<span><input type="checkbox" id="' + genre + '" name="genre" value="' + genre + '"></input>\n';
html += '<label for="' + genre + '">' + genre + '</label></span>';
$(".box.genres .item-cont").append(html);
} }
// gather data from url to check available options for (theme of themes)
function gatherURLdata()
{ {
selectedYears = []; html = '<span><input type="checkbox" id="' + theme + '" name="theme" value="' + theme + '"></input>\n';
selectedDimensions = []; html += '<label for="' + theme + '">' + theme + '</label></span>';
selectedPhotos = params.photo; $(".box.themes .item-cont").append(html);
if (selectedPhotos.includes("exist"))
{
if (selectedPhotos.indexOf("bad") === -1) selectedPhotos.push("bad");
if (selectedPhotos.indexOf("ok") === -1) selectedPhotos.push("ok");
if (selectedPhotos.indexOf("good") === -1) selectedPhotos.push("good");
}
selectedMonths = params.month;
selectedGenres = params.genre;
selectedThemes = params.theme;
selectedPlaces = params.place;
selectedTags = params.tag;
selectedHelps = params.help;
for (p of params.year)
{
if (p == "50s") for (i = 1956; i <= 1959; i++) selectedYears.push(i);
if (p == "60s") for (i = 1960; i <= 1969; i++) selectedYears.push(i);
if (p == "70s") for (i = 1970; i <= 1979; i++) selectedYears.push(i);
if (p == "80s") for (i = 1980; i <= 1989; i++) selectedYears.push(i);
if (p == "90s") for (i = 1990; i <= 1999; i++) selectedYears.push(i);
if (p == "00s") for (i = 2000; i <= 2009; i++) selectedYears.push(i);
if (p == "10s") for (i = 2010; i <= 2016; i++) selectedYears.push(i);
}
for (p of params.dimension)
{
if (p == "18") for (i = 18; i <= 19; i++) selectedDimensions.push(i);
if (p == "20") for (i = 20; i <= 29; i++) selectedDimensions.push(i);
if (p == "30") for (i = 30; i <= 39; i++) selectedDimensions.push(i);
if (p == "40") for (i = 40; i <= 49; i++) selectedDimensions.push(i);
if (p == "50") for (i = 50; i <= 59; i++) selectedDimensions.push(i);
if (p == "60") for (i = 60; i <= 69; i++) selectedDimensions.push(i);
if (p == "70") for (i = 70; i <= 79; i++) selectedDimensions.push(i);
if (p == "80") for (i = 80; i <= 89; i++) selectedDimensions.push(i);
if (p == "90") for (i = 90; i <= 99; i++) selectedDimensions.push(i);
if (p == "100") for (i = 100; i <= 109; i++) selectedDimensions.push(i);
}
return {"photos": selectedPhotos, "years": selectedYears, "months": selectedMonths, "genres": selectedGenres, "themes": selectedThemes,
"places": selectedPlaces, "tags": selectedTags, "dimensions": selectedDimensions, "helps": selectedHelps};
} }
var originalData = data; $(".box.places select").append('<option value="">Aucun</option');
var originalAvailableOptions = gatherData(); for (place of places)
$(".box.places select").append('<option value="' + place + '">' + place + '</option');
selectedOptions = gatherURLdata(); $(".box.tags select").append('<option value="">Aucun</option');
filterData(selectedOptions); for (tag of tags)
$(".box.tags select").append('<option value="' + tag + '">' + tag + '</option');
// menu initial generation
$.getScript("scripts/explorer_menu.js", function()
{
generateMenu(originalAvailableOptions);
availableOptions = gatherData();
userActionHandle(availableOptions); function URLGeneration()
URLGeneration(originalAvailableOptions);
updateMenu(availableOptions);
function handleVisualFilterChanges()
{ {
function makeFilterChanges() // populate checkboxes depending on URL
function URLcheckBoxSelector(names, name, urlParam)
{ {
selectedOptions = gatherURLdata(); if (urlParam == "all")
data = originalData;
filterData(selectedOptions);
availableOptions = [];
availableOptions = gatherData();
updateMenu(availableOptions);
}
// handle tags
function handleTags()
{ {
$('input[name="tags"]').change(function() $('input[name="'+names+'"]').prop("checked", true);
{ $('input[name="'+name+'"]').prop("disabled", true);
params["tag"] = []; // remove filter $('input[name="'+name+'"]').prop("checked", true);
if (this.checked)
{
$('select[name="tag"] option[value=""]').prop('selected', true);
$('select[name="tag"]').attr('disabled', 'disabled');
$(".box.tags span:not(.first) select").parent().remove();
} }
else else
$('select[name="tag"]').removeAttr('disabled');
makeFilterChanges();
});
$('.box.tags .item-cont').delegate('select[name="tag"]', 'change', function()
{ {
params.tag = []; // collect all tags from all dropdowns for (a of urlParam)
$('.box.tags .item-cont select[name="tag"]').each(function()
{ {
if (params.tag.indexOf(this.value) === -1 && this.value != "") $('input[id="'+a+'"]').prop("checked", true);
params.tag.push(this.value); }
}); }
}
// populate list depending on URL
function URLlistSelector(selector, name, param, names)
{
if (param.length >= 1)
$(selector + ' select').parent().remove();
for (a of param)
{
html = '<span><span class="inline">&#x203B;&nbsp;</span><select name="' + name + '">';
html += '<option value="">Aucun</option>';
for (i of names)
{
if (i == a)
html += '<option value="' + i + '" selected>' + i + '</option>';
else
html += '<option value="' + i + '">' + i + '</option>';
}
html += '</select></span>';
$(selector + ' .item-cont').append(html);
}
if (!param.includes("all") && param.length >= 1)
{
html = '<span><span class="inline">&#x203B;&nbsp;</span><select name="' + name + '">';
html += '<option value="">Aucun</option>';
for (i of names)
html += '<option value="' + i + '">' + i + '</option>';
html += '</select></span>';
$(selector + ' .item-cont').append(html);
}
}
URLcheckBoxSelector("years", "year", paramYear)
URLcheckBoxSelector("months", "month", paramMonth);
URLcheckBoxSelector("dimensions", "dimension", paramDimension);
URLcheckBoxSelector("genres", "genre", paramGenre);
URLcheckBoxSelector("themes", "theme", paramTheme);
URLcheckBoxSelector("places", "place", paramPlace);
URLcheckBoxSelector("tags", "tag", paramTag);
URLcheckBoxSelector("photos", "photo", paramPhoto);
URLcheckBoxSelector("helps", "help", paramHelp);
URLlistSelector(".box.places", "place", paramPlace, places);
URLlistSelector(".box.tags", "tag", paramTag, tags);
// URL special case for photos with "exist"
if (paramPhoto == "exist")
{
$('input[id="exist"]').prop("checked", true);
$('input[id="bad"]').prop("checked", true); $('input[id="bad"]').prop("disabled", true);
$('input[id="ok"]').prop("checked", true); $('input[id="ok"]').prop("disabled", true);
$('input[id="good"]').prop("checked", true); $('input[id="good"]').prop("disabled", true);
}
}
function userActionHandle()
{
// if "all" is selected, check all other options and disable them
function allCheckBoxSelected(names, name)
{
$('input[id="' + names + '"]').click(function()
{
if ($(this).prop("checked") == true)
{
$('input[name="' + name + '"]').prop("checked", true);
$('input[name="' + name + '"]').prop("disabled", true);
}
else if ($(this).prop("checked") == false)
{
$('input[name="' + name + '"]').prop("checked", false);
$('input[name="' + name + '"]').prop("disabled", false);
}
});
}
// for places and tags
function listOptionSelected(selector, name, names)
{
$(selector).on('change', 'select[name="' + name + '"]', function()
{
if (this.value != "") if (this.value != "")
{ {
createNewElem = true; // if we modify an existing element to a value, we don't delete it createNewElem = true; // if we modify an existing element to a value, we don't delete it
$('.box.tags select').each(function() $(selector + ' select').each(function()
{ {
if ($(this).val() == "") if ($(this).val() == "")
createNewElem = false; createNewElem = false;
}); });
if (createNewElem) if (createNewElem)
{ {
html = '<span><span class="inline">&#x203B;&nbsp;</span><select name="tag">'; html = '<span><span class="inline">&#x203B;&nbsp;</span><select name="' + name + '">';
html += '<option value="">Aucun filtre</option>'; html += '<option value="">Aucun</option>';
for (a of originalAvailableOptions.tags) for (a of names)
html += '<option value="' + a + '">' + a + '</option>'; html += '<option value="' + a + '">' + a + '</option>';
html += '</select></span>'; html += '</select></span>';
$(".box.tags .item-cont").append(html); $(selector + " .item-cont").append(html);
} }
} }
else else
@ -302,93 +208,191 @@ jQuery(document).ready(function($)
// if the element has no value, we delete it // if the element has no value, we delete it
$(this).parent().remove(); $(this).parent().remove();
} }
makeFilterChanges();
}); });
} }
handleTags();
function visualFilterCheckboxItem(name) $("input").prop("checked", false); // by default, uncheck all options
{ allCheckBoxSelected("years", "year");
$('input[name="' + name + 's"]').change(function() allCheckBoxSelected("months", "month");
{ allCheckBoxSelected("dimensions", "dimension");
params[name] = []; // remove filter allCheckBoxSelected("genres", "genre");
makeFilterChanges(); allCheckBoxSelected("themes", "theme");
}); allCheckBoxSelected("places", "place");
allCheckBoxSelected("tags", "tag");
allCheckBoxSelected("photos", "photo");
allCheckBoxSelected("helps", "help");
listOptionSelected(".box.places", "place", places);
listOptionSelected(".box.tags", "tag", tags);
$('input[name="' + name + '"]').change(function() // special case for photos with "exist"
$('input[id="exist"]').click(function()
{ {
if (this.checked) if ($(this).prop("checked") == true)
{ {
if (this.id == "exist") // photos special case $('input[id="bad"]').prop("checked", true); $('input[id="bad"]').prop("disabled", true);
{ $('input[id="ok"]').prop("checked", true); $('input[id="ok"]').prop("disabled", true);
params[name].push("bad"); $('input[id="good"]').prop("checked", true); $('input[id="good"]').prop("disabled", true);
params[name].push("ok");
params[name].push("good");
}
params[name].push(this.id);
} }
else else
{ {
if (this.id == "exist") // photos special case $('input[id="bad"]').prop("checked", false); $('input[id="bad"]').prop("disabled", false);
{ $('input[id="ok"]').prop("checked", false); $('input[id="ok"]').prop("disabled", false);
removeFromArray(params[name], "bad"); $('input[id="good"]').prop("checked", false); $('input[id="good"]').prop("disabled", false);
removeFromArray(params[name], "ok");
removeFromArray(params[name], "good");
} }
removeFromArray(params[name], this.id);
}
makeFilterChanges();
}); });
} }
function visualFilterListItem(name) // menu configurer show / hide
$("article.explorer h2").click(function()
{ {
$('input[name="' + name + 's"]').change(function() if ($(this).hasClass("active"))
{ {
params[name] = []; // remove filter $(this).removeClass("active");
if (this.checked) $("form").slideUp(200);
{
$('select[name="' + name + '"] option[value=""]').prop('selected', true);
$('select[name="' + name + '"]').attr('disabled', 'disabled');
} }
else else
$('select[name="' + name + '"]').removeAttr('disabled');
makeFilterChanges();
});
$('select[name="' + name + '"]').change(function()
{ {
if (this.value == "" && name == "place") $(this).addClass("active");
params[name].pop(); $("form").slideDown(200);
}
});
// menu configurer child on mobile show/hide
if ($(window).width() <= 600)
{
$("article.explorer .box h3").click(function()
{
if ($(this).parent().hasClass("active"))
{
$(this).parent().removeClass("active");
$(this).parent().children(".item-cont").slideUp(200);
}
else else
params[name].push(this.value); {
$(this).parent().addClass("active");
makeFilterChanges(); $(this).parent().children(".item-cont").slideDown(200);
}
}); });
} }
visualFilterCheckboxItem("photo"); userActionHandle();
visualFilterCheckboxItem("year"); URLGeneration();
visualFilterCheckboxItem("month");
visualFilterCheckboxItem("genre");
visualFilterCheckboxItem("theme");
visualFilterCheckboxItem("dimension");
visualFilterCheckboxItem("help");
visualFilterListItem("place");
} }
handleVisualFilterChanges();
});
/*********************/ /*********************/
/** TABLE & GALLERY **/ /** TABLE & GALLERY **/
/*********************/ /*********************/
function checkYear(year)
{
if (paramYear == "all") return true;
if (paramYear.includes("50s") && year >= 1950 && year <= 1959) return true;
if (paramYear.includes("60s") && year >= 1960 && year <= 1969) return true;
if (paramYear.includes("70s") && year >= 1970 && year <= 1979) return true;
if (paramYear.includes("80s") && year >= 1980 && year <= 1989) return true;
if (paramYear.includes("90s") && year >= 1990 && year <= 1999) return true;
if (paramYear.includes("00s") && year >= 2000 && year <= 2009) return true;
if (paramYear.includes("10s") && year >= 2010 && year <= 2020) return true;
return false;
}
function checkMonth(month)
{
if (paramMonth == "all") return true;
if (paramMonth.includes("01") && month == "Janvier") return true;
if (paramMonth.includes("02") && month == "Février") return true;
if (paramMonth.includes("03") && month == "Mars") return true;
if (paramMonth.includes("04") && month == "Avril") return true;
if (paramMonth.includes("05") && month == "Mai") return true;
if (paramMonth.includes("06") && month == "Juin") return true;
if (paramMonth.includes("07") && month == "Juillet") return true;
if (paramMonth.includes("08") && month == "Août") return true;
if (paramMonth.includes("09") && month == "Septembre") return true;
if (paramMonth.includes("10") && month == "Octobre") return true;
if (paramMonth.includes("11") && month == "Novembre") return true;
if (paramMonth.includes("12") && month == "Décembre") return true;
return false;
}
function checkDimension(dimension)
{
if (paramDimension == "all") return true;
if (paramDimension.includes("18") && dimension.split("x")[0] >= 18 && dimension.split("x")[0] <= 19) return true;
if (paramDimension.includes("20") && dimension.split("x")[0] >= 20 && dimension.split("x")[0] <= 29) return true;
if (paramDimension.includes("30") && dimension.split("x")[0] >= 30 && dimension.split("x")[0] <= 39) return true;
if (paramDimension.includes("40") && dimension.split("x")[0] >= 40 && dimension.split("x")[0] <= 49) return true;
if (paramDimension.includes("50") && dimension.split("x")[0] >= 50 && dimension.split("x")[0] <= 59) return true;
if (paramDimension.includes("60") && dimension.split("x")[0] >= 60 && dimension.split("x")[0] <= 69) return true;
if (paramDimension.includes("70") && dimension.split("x")[0] >= 70 && dimension.split("x")[0] <= 79) return true;
if (paramDimension.includes("80") && dimension.split("x")[0] >= 80 && dimension.split("x")[0] <= 89) return true;
if (paramDimension.includes("90") && dimension.split("x")[0] >= 90 && dimension.split("x")[0] <= 99) return true;
if (paramDimension.includes("100") && dimension.split("x")[0] >= 100 && dimension.split("x")[0] <= 109) return true;
return false;
}
function checkGenre(genre)
{
if (paramGenre == "all")
return true;
if (paramGenre.includes(genre))
return true;
return false;
}
function checkTheme(theme)
{
if (paramTheme == "all")
return true;
if (paramTheme.includes(theme))
return true;
return false;
}
function checkPlace(place)
{
if (paramPlace == "all")
return true;
if (paramPlace.includes(place))
return true;
return false;
}
function checkTag(tag)
{
if (paramTag == "all")
return true;
splitTag = tag.split(", ");
for (t of paramTag)
{
if (!splitTag.includes(t))
return false;
}
return true;
}
function checkPhoto(photo)
{
if (paramPhoto == "all") return true;
if (paramPhoto.includes("none") && photo == "none") return true;
if (paramPhoto.includes("bad") && photo == "bad") return true;
if (paramPhoto.includes("ok") && photo == "ok") return true;
if (paramPhoto.includes("good") && photo == "good") return true;
if (paramPhoto.includes("exist") && (photo == "bad" || photo == "ok" || photo == "good")) return true;
return false;
}
function checkHelp(help)
{
if (paramHelp == "all") return true;
if (paramHelp.includes("no") && help == "no") return true;
if (paramHelp.includes("yes") && help == "yes") return true;
return false;
}
// gallery vars // gallery vars
window.pageSize = 14; var pageSize = 14;
window.paintingList = []; var paintingList = [];
function generateTable() function generateTable()
{ {
@ -403,6 +407,17 @@ jQuery(document).ready(function($)
else else
res = true; res = true;
// check URL parameters and compute result
if (paramYear != "") res = res && checkYear(i.year);
if (paramMonth != "") res = res && checkMonth(i.month);
if (paramDimension != "") res = res && checkDimension(i.dimension);
if (paramGenre != "") res = res && checkGenre(i.genre);
if (paramTheme != "") res = res && checkTheme(i.theme);
if (paramPlace != "") res = res && checkPlace(i.place);
if (paramTag != "") res = res && checkTag(i.tags);
if (paramPhoto != "") res = res && checkPhoto(i.photo);
if (paramHelp != "") res = res && checkHelp(i.help);
if (!res) if (!res)
continue; continue;
@ -446,7 +461,6 @@ jQuery(document).ready(function($)
$("table").append(result); $("table").append(result);
// gallery // gallery
paintingList.push(i.number); paintingList.push(i.number);
if (paintingList.length % (pageSize + 1) == 0) if (paintingList.length % (pageSize + 1) == 0)
@ -457,7 +471,6 @@ jQuery(document).ready(function($)
paintingHtml += 'active">'; paintingHtml += 'active">';
else else
paintingHtml += 'inactive">'; paintingHtml += 'inactive">';
if (i.photo == "none") if (i.photo == "none")
{ {
paintingHtml += '<a data-fancybox="exposition" href="images/unknown.jpg" data-fancybox-index="' + i.number + '">' paintingHtml += '<a data-fancybox="exposition" href="images/unknown.jpg" data-fancybox-index="' + i.number + '">'
@ -468,7 +481,6 @@ jQuery(document).ready(function($)
paintingHtml += '<a data-fancybox="exposition" href="photos/paintings/normal/' + i.number + '.jpg" data-fancybox-index="' + i.number + '">' paintingHtml += '<a data-fancybox="exposition" href="photos/paintings/normal/' + i.number + '.jpg" data-fancybox-index="' + i.number + '">'
paintingHtml += '<img src="photos/paintings/mini/" alt="Tableau ' + i.number + '"></a>' paintingHtml += '<img src="photos/paintings/mini/" alt="Tableau ' + i.number + '"></a>'
} }
paintingHtml += '<span class="item-title">' + i.title; paintingHtml += '<span class="item-title">' + i.title;
if (i.year != '—') if (i.year != '—')
paintingHtml += ' (' + i.year + ')'; paintingHtml += ' (' + i.year + ')';
@ -486,6 +498,7 @@ jQuery(document).ready(function($)
if (urlParams.get('page') != "") if (urlParams.get('page') != "")
targetPage = urlParams.get('page'); targetPage = urlParams.get('page');
generateMenu();
var res = generateTable(); var res = generateTable();
if (res) // display table or no result depending of computed result if (res) // display table or no result depending of computed result
@ -495,15 +508,70 @@ jQuery(document).ready(function($)
$("form").slideUp(200); $("form").slideUp(200);
$("article.explorer p.result").css("display", "block"); $("article.explorer p.result").css("display", "block");
// pagination configuration
window.currentPage = 0; // pagination
window.previousArray = [] function getPageRange()
$.getScript("scripts/pagination.js", function() { {
paginationInit(data, paintingList, true); if (window.innerWidth >= 600)
return 6;
else if (window.innerWidth < 600 && window.innerWidth > 450)
return 4;
else
return 1;
}
var currentPage = 0;
var previousArray = []
var options =
{
dataSource: paintingList,
pageSize: pageSize,
pageRange: getPageRange(),
className: 'paginationjs-theme-ginou',
hideWhenLessThanOnePage: true,
callback: function (response, pagination)
{
currentPage = pagination.pageNumber;
urlParams = new URLSearchParams(window.location.search)
if (urlParams.get('page') == undefined)
{
window.history.replaceState('', '', window.location.pathname + window.location.search + '&page=' + currentPage + window.location.hash);
}
else
{
trimSearch = window.location.search.substr(0, window.location.search.lastIndexOf('&'));
window.history.replaceState('', '', window.location.pathname + trimSearch + '&page=' + currentPage + window.location.hash);
}
if (previousArray.length > 0)
{
for (i of previousArray)
$('[data-fancybox-index="'+i+'"]').parent().removeClass("active").addClass("inactive");
}
previousArray = response;
$.each(response, function(index, item)
{
$('[data-fancybox="exposition"][data-fancybox-index="'+item+'"]').parent().removeClass("inactive").addClass("active");
idx = item-1;
if (item >= 1000)
idx = item - 1000 + 383 - 1; // inédit: index starts at 1000 // 383: total number of paintings except inédit
if (data[idx].photo != "none")
$('[data-fancybox="exposition"][data-fancybox-index="'+item+'"] img').attr("src", "photos/paintings/mini/"+item+".jpg");
else
$('[data-fancybox="exposition"][data-fancybox-index="'+item+'"] img').attr("src", "images/unknown.jpg");
});
}
};
$('#pagination').pagination(options);
if (targetPage > 0) if (targetPage > 0)
$("#pagination").pagination('go', targetPage); $("#pagination").pagination('go', targetPage);
});
} }
else else
{ {
@ -511,10 +579,90 @@ jQuery(document).ready(function($)
$("article.explorer p.result").css("display", "none"); $("article.explorer p.result").css("display", "none");
} }
// on mobile, show only the first item slided down
if ($(window).width() <= 600)
{
$("article.explorer .container .box").each(function()
{
if (!$(this).hasClass('active'))
{
$(this).children(".item-cont").slideUp(200);
}
});
}
// change display: gallery/table
$(".style-select.frame").click(function()
{
$("table").hide();
$("#gallery").show();
})
$(".style-select.list").click(function()
{
$("#gallery").hide();
$("table").show();
})
// fancybox configuration // fancybox configuration
$.getScript("scripts/fancybox.js", function() { $('[data-fancybox="exposition"], [data-fancybox="exposition-list"]').fancybox(
fancyboxInit(data, true); {
infobar: false,
toolbar: true,
smallBtn: false,
buttons: ["arrowLeft", "arrowRight", "close"],
arrows: false,
transitionEffect: "fade",
baseClass: 'fancybox-custom-layout',
mobile: {
preventCaptionOverlap: true,
},
caption: function(instance, item)
{
var idx = item.opts.fancyboxIndex - 1; // painting number
if (item.opts.fancyboxIndex >= 1000)
idx = item.opts.fancyboxIndex - 1000 + 383 - 1; // inédit: index starts at 1000 // 383: total number of paintings except inédit
function generateCartel()
{
cartel = '<div id="info"><span class="info">';
cartel += '<a href="painting.html?number=' + data[idx].number + '">&#8505;&#xFE0E;</span></a></span>';
cartel += '<span class="title">' + data[idx].title + '</span><span class="year">';
if (data[idx].month != '—')
cartel += data[idx].month + '&nbsp;';
if (data[idx].year != '—')
cartel += data[idx].year;
cartel += '&nbsp;</span><span class="format">' + data[idx].paint + ' sur ' + data[idx].support.toLowerCase();
if (data[idx].dimension != '—')
cartel += ' (' + data[idx].dimension + ')';
cartel += '</span>';
if (data[idx].comment != '—')
cartel += '<span class="comment">' + data[idx].comment + '</span>';
cartel += '</div>';
return cartel;
}
return generateCartel();
},
beforeShow : function(instance, current)
{
if (current.opts.fancyboxIndex > previousArray[previousArray.length - 1])
$('#pagination').pagination('next');
if (current.opts.fancyboxIndex < previousArray[0])
$('#pagination').pagination('previous');
},
afterClose : function(instance)
{
// after closing, changing the URL again. I guess there's no better way except by changing fancybox code...
// (apparently fancybox changes back to the original url it had when starting)
urlParams = new URLSearchParams(window.location.search)
trimSearch = window.location.search.substr(0, window.location.search.lastIndexOf('&'));
window.history.replaceState('', '', window.location.pathname + trimSearch + '&page=' + currentPage + window.location.hash);
}
}); });
}); });
}); });

View File

@ -1,350 +0,0 @@
function generateMenu(availableOptions)
{
function createPhotoName(photo)
{
if (photo == "none") return "&#x2606; manquant";
if (photo == "bad") return "&#x2605; mauvais";
if (photo == "ok") return "&#x2605;&#x2605; acceptable";
if (photo == "good") return "&#x2605;&#x2605;&#x2605; bon";
}
function createYearName(year)
{
if (year == "50s") return "1956 - 1959";
if (year == "60s") return "1960 - 1969";
if (year == "70s") return "1970 - 1979";
if (year == "80s") return "1980 - 1989";
if (year == "90s") return "1990 - 1999";
if (year == "00s") return "2000 - 2009";
if (year == "10s") return "2010 - 2016";
}
function createDimensionName(dimension)
{
if (dimension == "18") return "< 20cm";
if (dimension == "20") return "20cm - 29cm";
if (dimension == "30") return "30cm - 39cm";
if (dimension == "40") return "40cm - 49cm";
if (dimension == "50") return "50cm - 59cm";
if (dimension == "60") return "60cm - 69cm";
if (dimension == "70") return "70cm - 79cm";
if (dimension == "80") return "80cm - 89cm";
if (dimension == "90") return "90cm - 99cm";
if (dimension == "100") return ">= 100cm";
}
function createHelpName(photo)
{
if (photo == "yes") return '<img width="5rem" src="styles/icons/exclamation-mark.svg" alt="Oui"> Oui';
if (photo == "no") return "Non";
}
hasExist = false;
for (photo of availableOptions.photos)
{
if (!hasExist && (photo == "bad" || photo == "ok" || photo == "good"))
{
html = '<span><input type="checkbox" id="exist" name="photo" value="exist"></input>\n';
html += '<label for="exist">Disponible</label></span>';
$(".box.photos .item-cont .generated").append(html);
hasExist = true;
}
html = '<span><input type="checkbox" id="' + photo + '" name="photo" value="' + photo + '"></input>\n';
html += '<label for="' + photo + '">' + createPhotoName(photo) + '</label></span>';
$(".box.photos .item-cont .generated").append(html);
}
for (year of availableOptions.years)
{
html = '<span><input type="checkbox" id="' + year + '" name="year" value="' + year + '"></input>\n';
html += '<label for="' + year + '">' + createYearName(year) + '</label></span>';
$(".box.years .item-cont .generated").append(html);
}
for (month of availableOptions.months)
{
html = '<span><input type="checkbox" id="' + month + '" name="month" value="' + month + '"></input>\n';
html += '<label for="' + month + '">' + month + '</label></span>';
$(".box.months .item-cont .generated").append(html);
}
for (genre of availableOptions.genres)
{
html = '<span><input type="checkbox" id="' + genre + '" name="genre" value="' + genre + '"></input>\n';
html += '<label for="' + genre + '">' + genre + '</label></span>';
$(".box.genres .item-cont .generated").append(html);
}
for (theme of availableOptions.themes)
{
html = '<span><input type="checkbox" id="' + theme + '" name="theme" value="' + theme + '"></input>\n';
html += '<label for="' + theme + '">' + theme + '</label></span>';
$(".box.themes .item-cont .generated").append(html);
}
for (dimension of availableOptions.dimensions)
{
html = '<span><input type="checkbox" id="' + dimension + '" name="dimension" value="' + dimension + '"></input>\n';
html += '<label for="' + dimension + '">' + createDimensionName(dimension) + '</label></span>';
$(".box.dimensions .item-cont .generated").append(html);
}
for (help of availableOptions.helps)
{
html = '<span><input type="checkbox" id="' + help + '" name="help" value="' + help + '"></input>\n';
html += '<label for="' + help + '">' + createHelpName(help) + '</label></span>';
$(".box.help .item-cont .generated").append(html);
}
$(".box.places select").append('<option value="">Aucun filtre</option');
for (place of availableOptions.places)
$(".box.places select").append('<option value="' + place + '">' + place + '</option');
$(".box.tags select").append('<option value="">Aucun filtre</option');
for (tag of availableOptions.tags)
$(".box.tags select").append('<option value="' + tag + '">' + tag + '</option');
}
function updateMenu(availableOptions)
{
function checkItem(name, array)
{
$('.' + name + ' .item-cont span input').each(function()
{
if (!array.includes($(this).prop("value")))
{
if ($(this).prop("value") != "all" && $(this).prop("value") != "exist")
$(this).parent().addClass("filter");
if ($(this).prop("value") == "exist") // special case for "exist" in photos
{
if (array.includes("none") && !array.includes("bad") && !array.includes("ok") && !array.includes("good"))
$(this).parent().addClass("filter");
else
$(this).parent().removeClass("filter");
}
}
else
$(this).parent().removeClass("filter");
});
}
function checkListItem(name, array)
{
$('.' + name + ' select option').each(function()
{
if (!array.includes($(this).prop("value")))
{
if ($(this).prop("value") != "")
{
$(this).hide();
$(this).attr('disabled', 'disabled'); // for iOS
}
}
else
{
$(this).show();
$(this).removeAttr('disabled'); // for iOS
}
});
}
checkItem("photos", availableOptions.photos);
checkItem("years", availableOptions.years);
checkItem("months", availableOptions.months);
checkItem("genres", availableOptions.genres);
checkItem("themes", availableOptions.themes);
checkItem("dimensions", availableOptions.dimensions);
checkItem("help", availableOptions.helps);
checkListItem("places", availableOptions.places);
checkListItem("tags", availableOptions.tags);
}
function URLGeneration(availableOptions)
{
// populate checkboxes depending on URL
function URLcheckBoxSelector(names, name, urlParam)
{
if (urlParam == "all")
{
$('input[name="'+names+'"]').prop("checked", true);
$('input[name="'+name+'"]').prop("disabled", true);
$('input[name="'+name+'"]').prop("checked", true);
}
else
{
for (a of urlParam)
{
$('input[id="'+a+'"]').prop("checked", true);
}
}
}
// populate list depending on URL
function URLlistSelector(selector, name, param, names)
{
if (param.length >= 1)
$(selector + ' select').parent().remove();
for (a of param)
{
html = '<span><span class="inline">&#x203B;&nbsp;</span><select name="' + name + '">';
html += '<option value="">Aucun filtre</option>';
for (i of names)
{
if (i == a)
html += '<option value="' + i + '" selected>' + i + '</option>';
else
html += '<option value="' + i + '">' + i + '</option>';
}
html += '</select></span>';
$(selector + ' .item-cont').append(html);
}
if (!param.includes("all") && param.length >= 1 && name != "place")
{
html = '<span><span class="inline">&#x203B;&nbsp;</span><select name="' + name + '">';
html += '<option value="">Aucun filtre</option>';
for (i of names)
html += '<option value="' + i + '">' + i + '</option>';
html += '</select></span>';
$(selector + ' .item-cont').append(html);
}
}
URLcheckBoxSelector("years", "year", paramYear)
URLcheckBoxSelector("months", "month", paramMonth);
URLcheckBoxSelector("dimensions", "dimension", paramDimension);
URLcheckBoxSelector("genres", "genre", paramGenre);
URLcheckBoxSelector("themes", "theme", paramTheme);
URLcheckBoxSelector("places", "place", paramPlace);
URLcheckBoxSelector("tags", "tag", paramTag);
URLcheckBoxSelector("photos", "photo", paramPhoto);
URLcheckBoxSelector("helps", "help", paramHelp);
URLlistSelector(".box.places", "place", paramPlace, availableOptions.places);
URLlistSelector(".box.tags", "tag", paramTag, availableOptions.tags);
// URL special case for photos with "exist"
if (paramPhoto.includes("exist"))
{
$('input[id="exist"]').prop("checked", true);
$('input[id="bad"]').prop("checked", true); $('input[id="bad"]').prop("disabled", true);
$('input[id="ok"]').prop("checked", true); $('input[id="ok"]').prop("disabled", true);
$('input[id="good"]').prop("checked", true); $('input[id="good"]').prop("disabled", true);
}
}
function userActionHandle(availableOptions)
{
// if "all" is selected, check all other options and disable them
function allCheckBoxSelected(names, name)
{
$('input[id="' + names + '"]').click(function()
{
if ($(this).prop("checked") == true)
{
$('input[name="' + name + '"]').prop("checked", true);
$('input[name="' + name + '"]').prop("disabled", true);
}
else if ($(this).prop("checked") == false)
{
$('input[name="' + name + '"]').prop("checked", false);
$('input[name="' + name + '"]').prop("disabled", false);
}
});
}
$("input").prop("checked", false); // by default, uncheck all options
allCheckBoxSelected("years", "year");
allCheckBoxSelected("months", "month");
allCheckBoxSelected("dimensions", "dimension");
allCheckBoxSelected("genres", "genre");
allCheckBoxSelected("themes", "theme");
allCheckBoxSelected("places", "place");
allCheckBoxSelected("tags", "tag");
allCheckBoxSelected("photos", "photo");
allCheckBoxSelected("helps", "help");
// special case for photos with "exist"
$('input[id="exist"]').click(function()
{
if ($(this).prop("checked") == true)
{
$('input[id="bad"]').prop("checked", true); $('input[id="bad"]').prop("disabled", true);
$('input[id="ok"]').prop("checked", true); $('input[id="ok"]').prop("disabled", true);
$('input[id="good"]').prop("checked", true); $('input[id="good"]').prop("disabled", true);
}
else
{
$('input[id="bad"]').prop("checked", false); $('input[id="bad"]').prop("disabled", false);
$('input[id="ok"]').prop("checked", false); $('input[id="ok"]').prop("disabled", false);
$('input[id="good"]').prop("checked", false); $('input[id="good"]').prop("disabled", false);
}
});
// menu configurer show / hide
$("article.explorer h2").click(function()
{
if ($(this).hasClass("active"))
{
$(this).removeClass("active");
$("form").slideUp(200);
}
else
{
$(this).addClass("active");
$("form").slideDown(200);
}
});
// menu configurer child on mobile show/hide
if ($(window).width() <= 600)
{
$("article.explorer .box h3").click(function()
{
if ($(this).parent().hasClass("active"))
{
$(this).parent().removeClass("active");
$(this).parent().children(".item-cont").slideUp(200);
}
else
{
$(this).parent().addClass("active");
$(this).parent().children(".item-cont").slideDown(200);
}
});
}
// on mobile, show only the first item slided down
if ($(window).width() <= 600)
{
$("article.explorer .container .box").each(function()
{
if (!$(this).hasClass('active'))
{
$(this).children(".item-cont").slideUp(200);
}
});
}
// change display: gallery/table
$(".style-select.frame").click(function()
{
$("table").hide();
$("#gallery").show();
});
$(".style-select.list").click(function()
{
$("#gallery").hide();
$("table").show();
});
}

View File

@ -2,7 +2,7 @@ jQuery(document).ready(function($)
{ {
$.getJSON("data.json", function(data) $.getJSON("data.json", function(data)
{ {
window.pageSize = 14; var pageSize = 14;
var paintingList = []; var paintingList = [];
canDisplay = true; canDisplay = true;
@ -38,19 +38,110 @@ jQuery(document).ready(function($)
if (urlParams.get('page') != "") if (urlParams.get('page') != "")
targetPage = urlParams.get('page'); targetPage = urlParams.get('page');
// pagination configuration function getPageRange()
window.currentPage = 0; {
window.previousArray = []; if (window.innerWidth >= 600)
$.getScript("scripts/pagination.js", function() { return null;
paginationInit(data, paintingList, false); else if (window.innerWidth < 600 && window.innerWidth > 450)
return 4;
else
return 1;
}
var currentPage = 0;
var previousArray = []
var options =
{
dataSource: paintingList,
pageSize: pageSize,
pageRange: getPageRange(),
className: 'paginationjs-theme-ginou',
hideWhenLessThanOnePage: true,
callback: function (response, pagination)
{
currentPage = pagination.pageNumber;
window.history.replaceState('', '', window.location.pathname + '?page=' + currentPage + window.location.hash);
if (previousArray.length > 0)
{
for (i of previousArray)
$('[data-fancybox-index="'+i+'"]').parent().removeClass("active").addClass("inactive");
}
previousArray = response;
$.each(response, function(index, item)
{
$('[data-fancybox-index="'+item+'"]').parent().removeClass("inactive").addClass("active");
$('[data-fancybox-index="'+item+'"] img').attr("src", "photos/paintings/mini/"+item+".jpg");
});
}
};
$('#pagination').pagination(options);
if (targetPage > 0) if (targetPage > 0)
$("#pagination").pagination('go', targetPage); $("#pagination").pagination('go', targetPage);
});
// fancybox configuration
$.getScript("scripts/fancybox.js", function() { $('[data-fancybox="exposition"]').fancybox(
fancyboxInit(data, false); {
selector: '.gallery a',
infobar: false,
toolbar: true,
smallBtn: false,
buttons: ["arrowLeft", "arrowRight", "close"],
arrows: false,
transitionEffect: "fade",
baseClass: 'fancybox-custom-layout',
mobile: {
preventCaptionOverlap: true,
},
caption: function(instance, item)
{
var idx = item.opts.fancyboxIndex - 1; // painting number
if (item.opts.fancyboxIndex >= 1000)
idx = item.opts.fancyboxIndex - 1000 + 383 - 1; // inédit: index starts at 1000 // 383: total number of paintings except inédit
function generateCartel()
{
cartel = '<div id="info"><span class="info">';
cartel += '<a href="painting.html?number=' + data[idx].number + '">&#8505;&#xFE0E;</span></a></span>';
cartel += '<span class="title">' + data[idx].title + '</span><span class="year">';
if (data[idx].month != '—')
cartel += data[idx].month + '&nbsp;';
if (data[idx].year != '—')
cartel += data[idx].year;
cartel += '&nbsp;</span><span class="format">' + data[idx].paint + ' sur ' + data[idx].support.toLowerCase();
if (data[idx].dimension != '—')
cartel += ' (' + data[idx].dimension + ')';
cartel += '</span>';
if (data[idx].comment != '—')
cartel += '<span class="comment">' + data[idx].comment + '</span>';
cartel += '</div>';
return cartel;
}
return generateCartel();
},
beforeShow : function(instance, current)
{
if (current.opts.fancyboxIndex > previousArray[previousArray.length - 1])
$('#pagination').pagination('next');
if (current.opts.fancyboxIndex < previousArray[0])
$('#pagination').pagination('previous');
},
afterClose : function(instance)
{
// after closing, changing the URL again. I guess there's no better way except by changing fancybox code...
// (apparently fancybox changes back to the original url it had when starting)
window.history.replaceState('', '', window.location.pathname + '?page=' + currentPage + window.location.hash);
}
}); });
}); });
}); });

View File

@ -1,71 +0,0 @@
function fancyboxInit(data, explorer)
{
$('[data-fancybox="exposition"], [data-fancybox="exposition-list"]').fancybox(
{
selector: '.gallery a',
infobar: false,
toolbar: true,
smallBtn: false,
buttons: ["arrowLeft", "arrowRight", "close"],
arrows: false,
transitionEffect: "fade",
baseClass: 'fancybox-custom-layout',
mobile: {
preventCaptionOverlap: true,
},
caption: function(instance, item)
{
var idx = 0; // search the index of the painting of filtered data
for (i = 0; i < data.length; i++)
{
if (data[i].number == item.opts.fancyboxIndex)
idx = i;
}
function generateCartel()
{
cartel = '<div id="info"><span class="info">';
cartel += '<a href="painting.html?number=' + data[idx].number + '">&#8505;&#xFE0E;</span></a></span>';
cartel += '<span class="title">' + data[idx].title + '</span><span class="year">';
if (data[idx].month != '—')
cartel += data[idx].month + '&nbsp;';
if (data[idx].year != '—')
cartel += data[idx].year;
cartel += '&nbsp;</span><span class="format">' + data[idx].paint + ' sur ' + data[idx].support.toLowerCase();
if (data[idx].dimension != '—')
cartel += ' (' + data[idx].dimension + ')';
cartel += '</span>';
if (data[idx].comment != '—')
cartel += '<span class="comment">' + data[idx].comment + '</span>';
cartel += '</div>';
return cartel;
}
return generateCartel();
},
beforeShow : function(instance, current)
{
if (current.opts.fancyboxIndex > previousArray[previousArray.length - 1])
$('#pagination').pagination('next');
if (current.opts.fancyboxIndex < previousArray[0])
$('#pagination').pagination('previous');
},
afterClose : function(instance)
{
// after closing, changing the URL again. I guess there's no better way except by changing fancybox code...
// (apparently fancybox changes back to the original url it had when starting)
if (explorer)
{
urlParams = new URLSearchParams(window.location.search)
trimSearch = window.location.search.substr(0, window.location.search.lastIndexOf('&'));
window.history.replaceState('', '', window.location.pathname + trimSearch + '&page=' + currentPage + window.location.hash);
}
else
window.history.replaceState('', '', window.location.pathname + '?page=' + currentPage + window.location.hash);
}
});
}

View File

@ -1,78 +0,0 @@
function paginationInit(data, paintingList, explorer)
{
function getPageRange()
{
if (window.innerWidth >= 600)
return explorer ? 6 : null;
else if (window.innerWidth < 600 && window.innerWidth > 450)
return 4;
else
return 1;
}
var options =
{
dataSource: paintingList,
pageSize: pageSize,
pageRange: getPageRange(),
className: 'paginationjs-theme-ginou',
hideWhenLessThanOnePage: true,
callback: function (response, pagination)
{
currentPage = pagination.pageNumber;
// url handling
if (explorer)
{
urlParams = new URLSearchParams(window.location.search)
if (urlParams.get('page') == undefined)
{
window.history.replaceState('', '', window.location.pathname + window.location.search + '&page=' + currentPage + window.location.hash);
}
else
{
trimSearch = window.location.search.substr(0, window.location.search.lastIndexOf('&'));
window.history.replaceState('', '', window.location.pathname + trimSearch + '&page=' + currentPage + window.location.hash);
}
}
else
{
window.history.replaceState('', '', window.location.pathname + '?page=' + currentPage + window.location.hash);
}
if (previousArray.length > 0)
{
for (i of previousArray)
$('[data-fancybox-index="'+i+'"]').parent().removeClass("active").addClass("inactive");
}
previousArray = response;
infoArray = []
for (a of response)
{
for (d of data)
{
if (a == d.number)
infoArray.push({"number": d.number, "photo": d.photo});
}
}
$.each(response, function(index, item)
{
for (i of infoArray)
{
if (i.number == item)
{
$('[data-fancybox="exposition"][data-fancybox-index="' + item + '"]').parent().removeClass("inactive").addClass("active");
if (i.photo != "none")
$('[data-fancybox="exposition"][data-fancybox-index="' + item + '"] img').attr("src", "photos/paintings/mini/" + item + ".jpg");
else
$('[data-fancybox="exposition"][data-fancybox-index="' + item + '"] img').attr("src", "images/unknown.jpg");
}
}
});
}
};
$('#pagination').pagination(options);
}

View File

@ -2,17 +2,14 @@ jQuery(document).ready(function($)
{ {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
const pageId = urlParams.get('number'); const pageId = urlParams.get('number');
if (pageId > 1000)
i = pageId - 1000 + 383 - 1; // inédit: index starts at 1000 // 383: total number of paintings except inédit
else
i = pageId - 1; // index is 0
$.getJSON("data.json", function(data) $.getJSON("data.json", function(data)
{ {
var idx = 0; // search the index of the painting of filtered data if (!data[i]) // the number specified in URL does not exist
for (i = 0; i < data.length; i++)
{
if (data[i].number == pageId)
idx = i;
}
if (!data[idx]) // the number specified in URL does not exist
{ {
$(".container").css("display", "none"); $(".container").css("display", "none");
$("#info").css("display", "none"); $("#info").css("display", "none");
@ -21,75 +18,75 @@ jQuery(document).ready(function($)
function GetNumber() function GetNumber()
{ {
if (data[idx].number > 1000) if (data[i].number > 1000)
return "Inédit"; return "Inédit";
return data[idx].number; return data[i].number;
} }
// page title // page title
$("head title").append(GetNumber()); $("head title").append(GetNumber());
// photo // photo
if (data[idx].photo != "none") if (data[i].photo != "none")
$(".photo img").attr("src", "photos/paintings/normal/" + data[idx].number + ".jpg"); $(".photo img").attr("src", "photos/paintings/normal/" + data[i].number + ".jpg");
else else
$(".photo img").attr("src", "images/unknown.jpg"); $(".photo img").attr("src", "images/unknown.jpg");
$(".photo img").attr("alt", "Tableau " + data[idx].number); $(".photo img").attr("alt", "Tableau " + data[i].number);
// metadata // metadata
$(".metadata .content.number").append(GetNumber()); $(".metadata .content.number").append(GetNumber());
if (data[idx].month != "—") if (data[i].month != "—")
$(".metadata .content.date").append(data[idx].month + " " + data[idx].year); $(".metadata .content.date").append(data[i].month + " " + data[i].year);
else else
$(".metadata .content.date").append(data[idx].year); $(".metadata .content.date").append(data[i].year);
$(".metadata .content.dimension").append(data[idx].dimension); $(".metadata .content.dimension").append(data[i].dimension);
$(".metadata .content.support").append(data[idx].support); $(".metadata .content.support").append(data[i].support);
$(".metadata .content.genre").append(data[idx].genre); $(".metadata .content.genre").append(data[i].genre);
$(".metadata .content.theme").append(data[idx].theme); $(".metadata .content.theme").append(data[i].theme);
$(".metadata .content.place").append(data[idx].place); $(".metadata .content.place").append(data[i].place);
if (data[idx].photo == "none") photoState = "aucune"; if (data[i].photo == "none") photoState = "aucune";
if (data[idx].photo == "bad") photoState = "mauvais"; if (data[i].photo == "bad") photoState = "mauvais";
if (data[idx].photo == "ok") photoState = "acceptable"; if (data[i].photo == "ok") photoState = "acceptable";
if (data[idx].photo == "good") photoState = "bon"; if (data[i].photo == "good") photoState = "bon";
$(".metadata .content.photo").append(photoState); $(".metadata .content.photo").append(photoState);
if (data[idx].help == "yes") if (data[i].help == "yes")
$(".metadata .content.help").append('<a href="informations.html"><strong>oui (!)</strong></a>'); $(".metadata .content.help").append('<a href="informations.html"><strong>oui (!)</strong></a>');
else else
$(".metadata .content.help").append("non"); $(".metadata .content.help").append("non");
if (data[idx].tags != "—") if (data[i].tags != "—")
$(".metadata .content.tag").append(data[idx].tags); $(".metadata .content.tag").append(data[i].tags);
else else
$(".metadata .content.tag").parent().css("display", "none"); $(".metadata .content.tag").parent().css("display", "none");
if (data[idx].comment != "—") if (data[i].comment != "—")
$(".metadata .content.comment").append(data[idx].comment); $(".metadata .content.comment").append(data[i].comment);
else else
$(".metadata .content.comment").parent().css("display", "none"); $(".metadata .content.comment").parent().css("display", "none");
if (data[idx].photo != "none") if (data[i].photo != "none")
$(".metadata .content.original a").attr("href", "photos/paintings/original/" + data[idx].number + ".jpg"); $(".metadata .content.original a").attr("href", "photos/paintings/original/" + data[i].number + ".jpg");
else else
$(".metadata .content.original").parent().css("display", "none"); $(".metadata .content.original").parent().css("display", "none");
// cartel // cartel
$("#info .title").append(data[idx].title); $("#info .title").append(data[i].title);
if (data[idx].month != "—") if (data[i].month != "—")
$("#info .year").append(data[idx].month + " " + data[idx].year); $("#info .year").append(data[i].month + " " + data[i].year);
else else
$("#info .year").append(data[idx].year); $("#info .year").append(data[i].year);
format = data[idx].paint + " sur " + data[idx].support.toLowerCase(); format = data[i].paint + " sur " + data[i].support.toLowerCase();
if (data[idx].dimension != "—") if (data[i].dimension != "—")
format += " (" + data[idx].dimension + ")"; format += " (" + data[i].dimension + ")";
$("#info .format").append(format); $("#info .format").append(format);
if (data[idx].comment != "—") if (data[i].comment != "—")
$("#info .comment").prepend(data[idx].comment); $("#info .comment").prepend(data[i].comment);
else else
$("#info .comment").css("display", "none"); $("#info .comment").css("display", "none");
}); });

View File

@ -80,10 +80,10 @@ jQuery(document).ready(function($)
var chartDimension = new Chart(canvasDimension, { var chartDimension = new Chart(canvasDimension, {
type: 'bar', type: 'bar',
data: { data: {
labels: ["Histoire", "Nature morte", "Paysage", "Portrait", "Scène"], labels: ["Allégorique", "Animal domestique", "Animalier", "Campagne", "Forêt", "Marine", "Montagne", "Métier", "Personne", "Urbain", "Végétal"],
datasets: [{ datasets: [{
label: 'nombre de tableaux', label: 'nombre de tableaux',
data: [2, 42, 173, 59, 107], data: [2, 11, 67, 126, 3, 10, 5, 10, 46, 39, 39],
backgroundColor: '#2589BD', backgroundColor: '#2589BD',
borderColor: '#187795', borderColor: '#187795',
borderWidth: 1 borderWidth: 1

View File

@ -208,23 +208,6 @@ article.main p.signature {
} }
article.main .bio-img {
float:right;
padding:1rem;
padding-top:0.25rem;
padding-right:0;
max-width:25vw;
}
@media only screen and (max-width:1200px) {
article.main .bio-img {
float:none;
padding:0;
max-width:90vw;
}
}
/* Exposition */ /* Exposition */
article #pagination { article #pagination {
@ -512,51 +495,25 @@ article.explorer form .inline {
margin:0.1rem; margin:0.1rem;
} }
.button-cont {
margin:auto;
margin-top:1.5rem;
display:flex;
justify-content:center;
align-items:flex-end;
width:-moz-fit-content;
width:fit-content;
}
article.explorer input[type = submit] { article.explorer input[type = submit] {
display:block;
margin:auto; margin:auto;
text-align:center; text-align:center;
border:none; border:none;
padding:0.8rem; padding:0.8rem;
margin-top:1.5rem;
border-radius:5%; border-radius:5%;
background:#2589BD; background:#2589BD;
text-decoration:none; text-decoration:none;
font-size:1.1rem; font-size:1.1rem;
cursor:pointer; cursor:pointer;
color:white; color:white;
margin-right:1rem;
}
article.explorer input[type = button] {
margin:auto;
text-align:center;
border:none;
padding:0.4rem;
border-radius:5%;
background:grey;
text-decoration:none;
font-size:1.1rem;
cursor:pointer;
color:white;
} }
input:checked + label { input:checked + label {
font-weight:bold; font-weight:bold;
} }
.item-cont span.filter {
color:gray;
}
@media only screen and (max-width:600px) { @media only screen and (max-width:600px) {
article.explorer form .container { article.explorer form .container {
display:block; display:block;