IE compatibility message and W3C standardization

This commit is contained in:
2021-02-12 20:53:40 +01:00
parent e9dcc57fd4
commit 0b096aad6e
9 changed files with 80 additions and 55 deletions

View File

@ -442,11 +442,11 @@ jQuery(document).ready(function($)
result += '<td class="photo">&#x2606;</td>';
if (i.help == "yes")
result += '<td class="help"><img width="5rem" src="styles/icons/exclamation-mark.svg"></td>'
result += '<td class="help"><img width="5rem" src="styles/icons/exclamation-mark.svg" alt="Oui"></td>'
else
result += '<td>&nbsp;</td>'
result += '<td><a href="painting.html?number=' + i.number + '"><img src="styles/icons/eye.svg"></a></td>';
result += '<td><a href="painting.html?number=' + i.number + '"><img src="styles/icons/eye.svg" alt="Voir"></a></td>';
result += "</tr>";
$("table").append(result);
@ -455,20 +455,20 @@ jQuery(document).ready(function($)
if (i.photo == "none")
{
paintingHtml = '<a data-fancybox="exposition" href="images/unknown.jpg" data-fancybox-index="' + i.number + '">'
paintingHtml += '<img src="images/unknown.jpg"></a>'
paintingHtml += '<img src="images/unknown.jpg" alt="Tableau ' + i.number + '"></a>'
}
else
{
paintingHtml = '<a data-fancybox="exposition" href="photos/paintings/normal/' + i.number + '.jpg" data-fancybox-index="' + i.number + '">'
paintingHtml += '<img src="photos/paintings/mini/' + i.number + '.jpg"></a>'
paintingHtml += '<img src="photos/paintings/mini/' + i.number + '.jpg" alt="Tableau ' + i.number + '"></a>'
}
$("#gallery").append(paintingHtml);
$(".gallery").append(paintingHtml);
}
$(".explorer .result").append("La recherche donne un résultat de <strong>" + numberOfItem + " élément" + (numberOfItem > 1 ? "s" : "") + "</strong>.");
return hasResult;
}
$("#gallery").hide();
$(".gallery").hide();
$(".style-select").hide();
generateMenu();
@ -503,11 +503,11 @@ jQuery(document).ready(function($)
$(".style-select.frame").click(function()
{
$("table").hide();
$("#gallery").show();
$(".gallery").show();
})
$(".style-select.list").click(function()
{
$("#gallery").hide();
$(".gallery").hide();
$("table").show();
})

View File

@ -7,8 +7,8 @@ jQuery(document).ready(function($)
if (i.photo == "ok" || i.photo == "good")
{
paintingHtml = '<a data-fancybox="exposition" href="photos/paintings/normal/' + i.number + '.jpg" data-fancybox-index="' + i.number + '">'
paintingHtml += '<img src="photos/paintings/mini/' + i.number + '.jpg"></a>';
$("#gallery").append(paintingHtml);
paintingHtml += '<img src="photos/paintings/mini/' + i.number + '.jpg" alt="Tableau ' + i.number + '"></a>';
$(".gallery").append(paintingHtml);
}
}

View File

@ -5,4 +5,23 @@ function mobilemenu()
navmenu[0].classList.remove("active");
else
navmenu[0].classList.add("active");
}
}
document.addEventListener("DOMContentLoaded", function(event)
{
function isIE()
{
user_agent = navigator.userAgent;
return (user_agent.indexOf("MSIE ") > -1 || user_agent.indexOf("Trident/") > -1);
}
if (isIE())
{
var IEheader = document.createElement("div");
IEheader.className = "IE-header"
var textnode = document.createTextNode("Votre navigateur est obsolète. Veuillez utiliser Edge (inclus avec Microsoft Windows), Safari (inclus avec macOS), Firefox ou Chrome.");
IEheader.appendChild(textnode);
document.getElementsByTagName("header")[0].insertBefore(IEheader, document.getElementsByTagName("nav")[0]);
};
});

View File

@ -30,7 +30,8 @@ jQuery(document).ready(function($)
if (data[i].photo != "none")
$(".photo img").attr("src", "photos/paintings/normal/" + data[i].number + ".jpg");
else
$(".photo img").attr("src", "images/unknown.jpg");
$(".photo img").attr("src", "images/unknown.jpg");
$(".photo img").attr("alt", "Tableau " + data[i].number);
// metadata
$(".metadata .content.number").append(GetNumber());