First front-end prototype

This commit is contained in:
2021-01-09 01:11:40 +01:00
parent c748f35786
commit 6b3f0df78a
24 changed files with 899 additions and 0 deletions

11
scripts/divers.js Normal file
View File

@ -0,0 +1,11 @@
jQuery(document).ready(function($) {
$('[data-fancybox="divers"]').fancybox({
infobar: false,
toolbar: true,
smallBtn: false,
buttons : [ "close" ],
arrows: true,
transitionEffect: "fade",
});
});

27
scripts/exposition.js Normal file
View File

@ -0,0 +1,27 @@
jQuery(document).ready(function($) {
$('[data-fancybox="exposition"]').fancybox({
infobar: false,
toolbar: true,
smallBtn: false,
buttons : [ "arrowLeft", "arrowRight", "close" ],
arrows: false,
transitionEffect: "fade",
baseClass: 'fancybox-custom-layout',
caption : function( instance, item ) {
// index put inside, we can get the number: `item.opts.fancyboxIndex`
// and thus what we what inside the caption!
// TODO read json to input good captions info
return '\
<div id="info">\
<span class="info"><a href="painting.html?number=26">&#8505;&#xFE0E;</span></a></span>\
<span class="title">La Truite</span><span class="year">1960</span>\
<span class="format">Huile sur toile (55x35)</span>\
<span class="comment">Reproduction de Courbet</span>\
</div>\
';
}
});
});

11
scripts/mail.js Normal file
View File

@ -0,0 +1,11 @@
jQuery(document).ready(function($) {
// a n t i s p a m (hopefully)
$('a.mail').on('click', function() {
var href = $(this).attr('href');
var a1 = "adres" ; var a2 = "se em"; var a3 = "ail";
var goodMail = a1 + a2 + a3;
$(this).attr('href', href.replace('badmail', goodMail));
$(this).html(goodMail);
});
});

116
scripts/stats.js Normal file
View File

@ -0,0 +1,116 @@
jQuery(document).ready(function($) {
var canvasMonth = document.getElementById("month").getContext('2d');
var chartMonth = new Chart(canvasMonth, {
type: 'bar',
data: {
labels: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"],
datasets: [{
label: 'nombre de tableaux',
data: [13, 30, 40, 34, 50, 33, 27, 23, 18, 24, 35, 19],
backgroundColor: '#2589BD',
borderColor: '#187795',
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}, gridLines: {
display:false
},
scaleLabel: {
display: true,
labelString: 'Tableaux'
}
}],
xAxes: [{
gridLines: {
display:false
}
}]
},
legend: {
display: false
}
}
});
var canvasMonth2 = document.getElementById("month2").getContext('2d');
var chartMonth2 = new Chart(canvasMonth2, {
type: 'bar',
data: {
labels: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"],
datasets: [{
label: 'nombre de tableaux',
data: [13, 30, 40, 34, 50, 33, 27, 23, 18, 24, 35, 19],
backgroundColor: '#2589BD',
borderColor: '#187795',
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}, gridLines: {
display:false
},
scaleLabel: {
display: true,
labelString: 'Tableaux'
}
}],
xAxes: [{
gridLines: {
display:false
}
}]
},
legend: {
display: false
}
}
});
var canvasMonth3 = document.getElementById("month3").getContext('2d');
var chartMonth3 = new Chart(canvasMonth3, {
type: 'bar',
data: {
labels: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"],
datasets: [{
label: 'nombre de tableaux',
data: [13, 30, 40, 34, 50, 33, 27, 23, 18, 24, 35, 19],
backgroundColor: '#2589BD',
borderColor: '#187795',
borderWidth: 1
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}, gridLines: {
display:false
},
scaleLabel: {
display: true,
labelString: 'Tableaux'
}
}],
xAxes: [{
gridLines: {
display:false
}
}]
},
legend: {
display: false
}
}
});
});