Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
piRGoif committed Sep 6, 2024
2 parents 67034d4 + a43b0b9 commit 8d40792
Show file tree
Hide file tree
Showing 46 changed files with 4,414 additions and 4,481 deletions.
942 changes: 472 additions & 470 deletions communs/gepapir.css

Large diffs are not rendered by default.

Binary file modified communs/gepapir.csz
Binary file not shown.
38 changes: 12 additions & 26 deletions communs/header1.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,38 +28,24 @@

<?
/****
Générateur http://realfavicongenerator.net/
Fichier .ico laissé à la racine du site sans déclaration (prb avec Chrome)
Cf http://www.jonathantneal.com/blog/understand-the-favicon/#highlighter_705436
Idem pour apple-touch-icon.png
iOS : support v7+ uniquement
Idem pour browserconfig.xml (IE11)
****/
* Favicon
* Générateur http://realfavicongenerator.net/
***/
?>
<link rel="apple-touch-icon" sizes="57x57" href="<?=$RelBasePath?>images/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="<?=$RelBasePath?>images/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="120x120" href="<?=$RelBasePath?>images/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="76x76" href="<?=$RelBasePath?>images/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="152x152" href="<?=$RelBasePath?>images/favicons/apple-touch-icon-152x152.png">
<link rel="icon" type="image/png" href="<?=$RelBasePath?>images/favicons/favicon-196x196.png" sizes="196x196">
<link rel="icon" type="image/png" href="<?=$RelBasePath?>images/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="<?=$RelBasePath?>images/favicons/favicon-32x32.png" sizes="32x32">
<link rel="apple-touch-icon" sizes="180x180" href="<?=$RelBasePath?>images/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="<?=$RelBasePath?>images/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="<?=$RelBasePath?>images/favicons/favicon-16x16.png">
<link rel="manifest" href="<?=$RelBasePath?>site.webmanifest">
<link rel="mask-icon" href="<?=$RelBasePath?>images/favicons/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="<?=$RelBasePath?>images/favicons/mstile-144x144.png">
<meta name="msapplication-square70x70logo" content="<?=$RelBasePath?>images/favicons/mstile-70x70.png">
<meta name="msapplication-square150x150logo" content="<?=$RelBasePath?>images/favicons/mstile-150x150.png">
<meta name="msapplication-square310x310logo" content="<?=$RelBasePath?>images/favicons/mstile-310x310.png">
<meta name="msapplication-wide310x150logo" content="<?=$RelBasePath?>images/favicons/mstile-310x150.png">
<meta name="theme-color" content="#ffffff">





<link href="<?=$RelBasePath?>communs/gepapir" rel="stylesheet" type="text/css">



<script src="<?=$RelBasePath?>communs/ondomready/ondomready.jz"></script>
<script src="<?=$RelBasePath?>communs/tools.jz"></script>
<script>
<? // Utilisation onDomReady https://github.com/tubalmartin/ondomready ?>
onDomReady(writeCSSRespImg);
</script>
<script src="<?= $RelBasePath ?>communs/ondomready/ondomready"></script>
17 changes: 16 additions & 1 deletion communs/header2.inc.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
<?php
/*******************************************************************************
Entête commun pages
Version 20050507
*******************************************************************************/
?>



<script src="<?= $RelBasePath ?>communs/tools"></script>
<script>
<? // Utilisation onDomReady https://github.com/tubalmartin/ondomready ?>
onDomReady(writeCSSRespImg);
onDomReady(addPermalinkToHeadings);
</script>

</head>

<body>



<?
require_once($RelBasePath . 'communs/menu.inc.php');
?>
4 changes: 1 addition & 3 deletions communs/toc/toc-html.inc.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<details id="toc" class="toolbox">
<details id="toc" class="toolbox" open>
<summary>Table des matières</summary>
<a id="toc-open" onClick="toggleToc()">+</a>
<a id="toc-close" onClick="toggleToc()">X</a>
</details>
26 changes: 1 addition & 25 deletions communs/toc/toc-js.inc.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,8 @@
?>
<script src="<?=$RelBasePath?>communs/toc/toc.js"></script>
<script>
var HIDE_CLASS = "hide";

function getTocElement() {
return document.getElementById("toc").getElementsByTagName("ul")[0];
}

// Affiche ou masque la TOC à chaque appel
function toggleToc() {
var ul = getTocElement();
var newDispValue = (ul.className == HIDE_CLASS) ? "" : HIDE_CLASS;

if (newDispValue == HIDE_CLASS) {
// on ferme la TOC
document.getElementById("toc-open").style.display = "";
document.getElementById("toc-close").style.display = "none";
} else {
// on ouvre la TOC
document.getElementById("toc-open").style.display = "none";
document.getElementById("toc-close").style.display = "";
}
ul.className = newDispValue;
}

onDomReady(function() {
generateTOC(document.getElementById("toc"));
getTocElement().className = HIDE_CLASS;
document.getElementById("toc-close").style.display="none";
addPermalinkToHeadings();
});
</script>
157 changes: 87 additions & 70 deletions communs/tools.js
Original file line number Diff line number Diff line change
@@ -1,70 +1,87 @@
/*-------------------------------------------------------------------------------------------
Fonctions utilitaires CSS
/!\ à insérer en tête de page /!\
Version 20140813
-------------------------------------------------------------------------------------------*/




/******************************
Modifie les images avec l'attribut "data-responsive-img" :
- ajoute le dimensionnement en css
- supprime les attributs width / height du tag img
- ajoute du css pour basculer en width: 98% si le max-device-width est > width + 5
******************************/
function writeCSSRespImg()
{
var elements = document.getElementsByTagName("img"),
image,
width,
height,
cssClassName,
cssClasses,
cssCode,
style,
maxWidth;
for (i = 0; i <= elements.length - 1; i++) {
image = elements[i];
if (image.hasAttribute("data-responsive-img")) {
// Récup width / height
width = parseInt(image.getAttribute("width"));
height = parseInt(image.getAttribute("height"));

// Ajoute classe
cssClassName = "responsive-img-" + i;
cssClasses = image.className;
if (cssClasses != "") {
cssClasses += " ";
} else {
cssClasses = "";
}
cssClasses += cssClassName;
image.className = cssClasses;

// Ecriture du CSS
cssCode = "";
style = document.createElement("style");
maxWidth = width + 5;
cssCode = "\nimg." + cssClassName + "\n\
{\n\
width: " + width + "px;\n\
height: " + height + "px;\n\
}\n\
@media screen and (max-device-width: " + maxWidth + "px)\n\
{\n\
img." + cssClassName + "\n\
{\n\
width: 98%;\n\
height: auto;\n\
}\n\
}\n";
style.appendChild(document.createTextNode(cssCode));
document.head.appendChild(style);

// Suppression des attributs du tag img
image.removeAttribute("width");
image.removeAttribute("height");
}
}
}
/*-------------------------------------------------------------------------------------------
Fonctions utilitaires CSS
/!\ à insérer en tête de page /!\
-------------------------------------------------------------------------------------------*/




/******************************
Modifie les images avec l'attribut "data-responsive-img" :
- ajoute le dimensionnement en css
- supprime les attributs width / height du tag img
- ajoute du css pour basculer en width: 98% si le max-device-width est > width + 5
******************************/
function writeCSSRespImg() {
var elements = document.getElementsByTagName("img"),
image,
width,
height,
cssClassName,
cssClasses,
cssCode,
style,
maxWidth;
for (i = 0; i <= elements.length - 1; i++) {
image = elements[i];
if (image.hasAttribute("data-responsive-img")) {
// Récup width / height
width = parseInt(image.getAttribute("width"));
height = parseInt(image.getAttribute("height"));

// Ajoute classe
cssClassName = "responsive-img-" + i;
cssClasses = image.className;
if (cssClasses != "") {
cssClasses += " ";
} else {
cssClasses = "";
}
cssClasses += cssClassName;
image.className = cssClasses;

// Ecriture du CSS
cssCode = "";
style = document.createElement("style");
maxWidth = width + 5;
cssCode = "\nimg." + cssClassName + "\n\
{\n\
width: " + width + "px;\n\
height: " + height + "px;\n\
}\n\
@media screen and (max-device-width: " + maxWidth + "px)\n\
{\n\
img." + cssClassName + "\n\
{\n\
width: 98%;\n\
height: auto;\n\
}\n\
}\n";
style.appendChild(document.createTextNode(cssCode));
document.head.appendChild(style);

// Suppression des attributs du tag img
image.removeAttribute("width");
image.removeAttribute("height");
}
}
}




function addPermalinkToHeadings() {
if (document.querySelector(".permalink")) {
return;
}

const HEADINGS_SELECTOR = "h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]";
let headingNodes = document.querySelectorAll(HEADINGS_SELECTOR);

for (let i = 0; i < headingNodes.length; i++) {
let headingNodeCurrent = headingNodes[i];
let nodeId = headingNodeCurrent.getAttribute("id");
headingNodeCurrent.insertAdjacentHTML("beforeend", `<span class="permalink">&nbsp;<a href="#${nodeId}">#</a></span>`);
}
}

Binary file modified communs/tools.jz
Binary file not shown.
Binary file modified favicon.ico
Binary file not shown.
Binary file added images/favicons/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/favicons/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/favicons/apple-touch-icon-120x120.png
Binary file not shown.
Binary file removed images/favicons/apple-touch-icon-152x152.png
Binary file not shown.
Binary file removed images/favicons/apple-touch-icon-57x57.png
Binary file not shown.
Binary file removed images/favicons/apple-touch-icon-60x60.png
Binary file not shown.
Binary file removed images/favicons/apple-touch-icon-76x76.png
Binary file not shown.
Binary file added images/favicons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/favicons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/favicons/favicon-196x196.png
Binary file not shown.
Binary file modified images/favicons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/favicons/mstile-144x144.png
Binary file not shown.
Binary file modified images/favicons/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/favicons/mstile-310x150.png
Binary file not shown.
Binary file removed images/favicons/mstile-310x310.png
Binary file not shown.
Binary file removed images/favicons/mstile-70x70.png
Binary file not shown.
38 changes: 38 additions & 0 deletions images/favicons/safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 13 additions & 8 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php ob_start('ob_gzhandler');
$pageVersion = "v8.2.5";
$pageVersion = "v8.2.6";

// NAVIGATION
$RelBasePath = "";
Expand Down Expand Up @@ -140,7 +140,18 @@
****/
?>

<dt>20/08/2024, <?=$pageVersion?></dt>
<dt>06/09/2024, <?=$pageVersion?></dt>
<dd>
- ToC : suppression icone ouverture/fermeture, amélioration responsive, petites modifications esthétiques<br>
- Ajout permalink sur headings<br>
- Balise nav déplacé en haut de page (lecteurs d'écran)<br>
- Mise à jour des favicons<br>
- Informatique / <a href="info/GEPApiR/responsive.php">Responsive</a> : actualisation sur l'attribut srcset<br>
- <a href="zicmue/">Musiques</a> : lien Valdingues 2024
</dd>


<dt>20/08/2024, 8.2.5</dt>
<dd>
- Moi : modification de l'emoji pro<br>
- Musiques : maj des liens des vidéos de l'Harmonie de Grenoble<br>
Expand Down Expand Up @@ -205,12 +216,6 @@



<?
require_once($RelBasePath . 'communs/menu.inc.php');
?>



</body>
</html>
<?php ob_end_flush(); ?>
Loading

0 comments on commit 8d40792

Please sign in to comment.