Modification de l'icône de "home", définition des "lien" des sous-parties dynamiquement (actionScript) en fonction du corps du fichier page/fichier.php

This commit is contained in:
xdrm-brackets 2015-10-22 08:55:12 +02:00
parent 941a3798e3
commit 2dfa43173f
7 changed files with 104 additions and 217 deletions

View File

@ -148,6 +148,13 @@
font-size: .9em;
font-weight: bold;
text-transform: uppercase;
/* extra */
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
-o-user-select: none;
}
#SUBHEADER nav > span{

View File

@ -243,7 +243,11 @@ body{
border-radius: 5px;
border: 1px solid #b3b3b3;
/* background */
background-color: #fff;
/* foreground */
font: inherit;
color: #777;
}

View File

@ -43,8 +43,19 @@
#MENU .userdata:hover{ background-color: #2dcc70; }
#MENU .userdata.M{ background-image: url(../src/menu/userdata/male.svg); cursor: default; }
#MENU .userdata.F{ background-image: url(../src/menu/userdata/female.svg); cursor: default; }
/* quand l'utilisateur est connecté */
#MENU .userdata.M,
#MENU .userdata.F{
background-color: #2dcc70;
cursor: default;
}
/* quand c'est un homme */
#MENU .userdata.M{ background-image: url(../src/menu/userdata/male.svg); }
/* quand c'est une femme */
#MENU .userdata.F{ background-image: url(../src/menu/userdata/female.svg); }

View File

@ -89,9 +89,26 @@ var DOM = {
pageM.setPage( section.dataset.link );
/* on active les sous-parties */
pageM.xhr[pageM.xhr.length-1].onload = function(){
pageM.xhr[pageM.xhr.length-1].addEventListener('load', function(){
// on récupère les sections du document
var sections = document.querySelectorAll('#CONTAINER section[name]');
if( sections != null ){ // si on en trouve
DOM.SUBSECTIONS.innerHTML = ""; // on efface le #SUBHEADER > nav <=> les liens des sous-parties
for( var i = 0 ; i < sections.length ; i++ ) // pour chaque section, on créé un lien correspondant
if( i == 0 ) // on active le premier
DOM.SUBSECTIONS.innerHTML += "<span data-sectname='" +sections[i].getAttribute('name')+ "' class='active'>" +sections[i].title+ "</span>";
else // pas les autres
DOM.SUBSECTIONS.innerHTML += "<span data-sectname='" +sections[i].getAttribute('name')+ "'>" +sections[i].title+ "</span>";
}
selectSubSection( document.querySelector('#SUBHEADER > nav > span.active') );
};
}, false);
// on récupère la section déja selectionnée si elle existe
var last = document.querySelector('#MENU span.active');
@ -144,7 +161,6 @@ var DOM = {
lastSection.className = ''; // on la désactive
// on active la page associée
console.log( document.querySelector('#CONTAINER section[name=home]') );
var target = document.querySelector('#CONTAINER section[name='+subSection.dataset.sectname+']');
if( target != null )
target.className = 'active';

View File

@ -14,5 +14,27 @@
*****************************************/
?>
<section name='home'>Contenu de la section #HOME</section>
<section name='groups'>Contenu de la section #GROUPES</section>
<section name='home' title='Accueil'>
Accueil
</section>
<section name='groups' title='Groupes'>
Groupes
</section>
<section name='case' title='Suivi'>
Suivi
</section>
<section name='modules' title='Modules'>
Modules
</section>
<section name='marks' title='Notes'>
Notes
</section>
<section name='settings' title='Paramètres'>
Paramètres
</section>

View File

@ -9,18 +9,14 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="20.5585mm"
height="23.953442mm"
viewBox="0 0 72.845081 84.874394"
id="svg4286"
width="766.6875"
height="766.6875"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="home.svg"
inkscape:export-filename="/home/xdrm/Bureau/GRAPHISM/logo/flask100.png"
inkscape:export-xdpi="123.54987"
inkscape:export-ydpi="123.54987">
sodipodi:docname="home.svg">
<defs
id="defs4288" />
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
@ -28,11 +24,11 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="15.839192"
inkscape:cx="30.546706"
inkscape:cy="35.04825"
inkscape:zoom="0.98994949"
inkscape:cx="577.15093"
inkscape:cy="270.09406"
inkscape:document-units="px"
inkscape:current-layer="g4521-8"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
@ -42,110 +38,28 @@
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:snap-bbox="false"
inkscape:bbox-nodes="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox-edge-midpoints="false"
inkscape:object-paths="true"
inkscape:object-nodes="true"
inkscape:snap-grids="true"
inkscape:snap-page="true"
inkscape:snap-nodes="true" />
inkscape:window-maximized="1" />
<metadata
id="metadata4291">
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(15.022256,-191.80268)">
<g
id="g4517"
transform="translate(-609.72838,51.305182)">
<g
id="g4519"
transform="matrix(4.0416382,0,0,4.0416382,422.29019,-4060.1699)">
<g
id="g4191"
inkscape:export-xdpi="73.431374"
inkscape:export-ydpi="73.431374"
style="fill:#ababab;fill-opacity:1" />
<g
inkscape:export-ydpi="73.431374"
inkscape:export-xdpi="73.431374"
id="g4195"
transform="translate(0.18745231,-35.076806)">
<circle
style="fill:#bdbdbd;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.442;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="circle4197"
cx="12.003395"
cy="1040.9"
r="15.162507"
inkscape:export-xdpi="73.431374"
inkscape:export-ydpi="73.431374"
d="m 27.165902,1040.9 c 0,8.374 -6.788486,15.1625 -15.162507,15.1625 -8.3740213,0 -15.162507,-6.7885 -15.162507,-15.1625 0,-8.374 6.7884857,-15.1625 15.162507,-15.1625 8.374021,0 15.162507,6.7885 15.162507,15.1625 z" />
<path
style="fill:#ababab;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.442;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 66.068359,4.7871094 A 61.281367,61.281367 0 0 0 4.7871094,66.068359 61.281367,61.281367 0 0 0 66.068359,127.34961 l 0,-122.5625006 z"
transform="matrix(0.24742442,0,0,0.24742442,-4.3437287,1024.5529)"
id="path4199"
inkscape:connector-curvature="0"
inkscape:export-xdpi="73.431374"
inkscape:export-ydpi="73.431374" />
</g>
<g
id="g4517-8"
transform="matrix(0.24742442,0,0,0.24742442,-64.81656,1013.5329)">
<g
id="g4519-2"
transform="matrix(4.0416382,0,0,4.0416382,422.29019,-4060.1699)">
<g
id="g4521-8">
<path
id="path4523-1"
style="color:#000000;text-indent:0;text-transform:none;block-progression:tb;fill:#a4b2be;fill-opacity:1"
d="m 8.9868,1030.4 0,7.8 c -1.8639,2.9 -3.8033,5.8 -5.625,8.8 -0.9343,1.5 -0.0087,3.8 1.7506,4.2 1.2656,0.3 2.5733,0.1 3.8564,0.2 3.1672,0 6.3372,0 9.5032,-0.1 2.044,-0.2 3.264,-2.8 2.077,-4.5 -1.813,-2.9 -3.721,-5.7 -5.562,-8.6 l 0,-7.8 -6.0002,0 z"
inkscape:connector-curvature="0" />
<path
id="path4525-4"
d="m 15.469805,1042.9 c 0,0.5358 -0.433988,0.9698 -0.969805,0.9698 -0.535817,0 -0.969805,-0.434 -0.969805,-0.9698 0,-0.5358 0.433988,-0.9698 0.969805,-0.9698 0.535817,0 0.969805,0.434 0.969805,0.9698 z"
inkscape:connector-curvature="0"
style="fill:#5c7182;fill-opacity:1" />
<path
id="path4529-2"
d="m 12.580262,1042.5105 c 0,0.8731 -0.707167,1.5803 -1.580262,1.5803 -0.873095,0 -1.5802621,-0.7072 -1.5802621,-1.5803 0,-0.8731 0.7071671,-1.5803 1.5802621,-1.5803 0.873095,0 1.580262,0.7072 1.580262,1.5803 z"
inkscape:connector-curvature="0"
style="fill:#5c7182;fill-opacity:1" />
<path
id="path4531-5"
d="m 7.4729,1042.4 c -1.098,1.7 -2.2018,3.4 -3.2812,5.1 -0.6853,1.2 0.3032,2.8 1.6875,2.9 l 12.313,0 c 1.396,-0.1 2.274,-1.9 1.5,-3 -1.071,-1.7 -2.149,-3.4 -3.219,-5 l -9.0001,0 z"
inkscape:connector-curvature="0"
style="fill:#5c7182;fill-opacity:1" />
<path
id="path4527"
style="text-indent:0;text-transform:none;block-progression:tb;color:#000000;fill:#000000;fill-opacity:0.17258881"
d="m 9,1030.4 0,7.8 c -1.8639,2.9 -3.8033,5.8 -5.625,8.8 -0.9343,1.5 -0.0092,3.8 1.75,4.2 1.2656,0.3 2.5607,0.1 3.8438,0.2 l 3.0002,0 0,-21 -2.969,0 z"
inkscape:connector-curvature="0" />
</g>
</g>
<g
id="g4537-0"
transform="translate(-60,0)" />
</g>
</g>
<g
id="g4537"
transform="translate(-60,0)" />
</g>
transform="translate(69.0625,-46.15625)">
<path
style="fill:#889bab;fill-opacity:1;stroke:none;stroke-width:1.06142259000000005;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
d="M 53.330003,150.40298 C -100.82666,294.52575 -108.95987,536.303 35.162892,690.45967 179.28566,844.61634 421.08425,852.77237 575.24092,708.64961 729.39759,564.52684 737.53228,322.70542 593.40952,168.54875 449.28675,14.392087 207.48667,6.2802195 53.330003,150.40298 z M 85.70534,185.03231 C 218.25648,61.108783 424.80739,65.721454 551.74986,193.67886 l -100.87474,94.3089 C 376.05427,215.64859 256.82984,213.96297 179.95022,285.83857 103.07061,357.71416 96.740238,476.78235 163.88773,556.29543 L 63.01299,650.60434 C -56.124294,515.34979 -46.845805,308.95583 85.70534,185.03231 z m 123.80312,132.42235 c 61.88489,-57.85687 158.96968,-54.59101 216.82655,7.29389 57.85687,61.88489 54.59101,158.96968 -7.29389,216.82655 -61.88489,57.85687 -158.96968,54.59101 -216.82655,-7.29388 -57.85687,-61.8849 -54.591,-158.96969 7.29389,-216.82656 z m 36.66501,39.21766 c -40.23528,37.61641 -42.35766,100.7086 -4.74125,140.94388 37.61641,40.23528 100.72995,42.38049 140.96523,4.76408 40.23528,-37.61641 42.35915,-100.75277 4.74273,-140.98806 -37.61641,-40.23528 -100.73142,-42.33632 -140.96671,-4.7199 z M 76.799719,665.35091 177.67446,571.042 c 74.82085,72.33918 194.04529,74.02479 270.9249,2.1492 76.87962,-71.8756 83.20998,-190.94379 16.06249,-270.45687 L 565.53659,208.42542 C 684.67388,343.67997 675.39539,550.07393 542.84424,673.99746 410.2931,797.92098 203.74219,793.30831 76.799719,665.35091 z"
id="path2985"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -9,18 +9,14 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="20.5585mm"
height="23.953442mm"
viewBox="0 0 72.845081 84.874394"
id="svg4286"
width="766.6875"
height="766.6875"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="home@hover.svg"
inkscape:export-filename="/home/xdrm/Bureau/GRAPHISM/logo/flask100.png"
inkscape:export-xdpi="123.54987"
inkscape:export-ydpi="123.54987">
sodipodi:docname="home@hover.svg">
<defs
id="defs4288" />
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
@ -28,11 +24,11 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6"
inkscape:cx="13.541924"
inkscape:cy="27.605616"
inkscape:zoom="0.98994949"
inkscape:cx="577.15093"
inkscape:cy="270.09406"
inkscape:document-units="px"
inkscape:current-layer="g4521-8"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
@ -42,110 +38,27 @@
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:snap-bbox="false"
inkscape:bbox-nodes="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox-edge-midpoints="false"
inkscape:object-paths="true"
inkscape:object-nodes="true"
inkscape:snap-grids="true"
inkscape:snap-page="true"
inkscape:snap-nodes="true" />
inkscape:window-maximized="1" />
<metadata
id="metadata4291">
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(15.022256,-191.80268)">
<g
id="g4517"
transform="translate(-609.72838,51.305182)">
<g
id="g4519"
transform="matrix(4.0416382,0,0,4.0416382,422.29019,-4060.1699)">
<g
id="g4191"
inkscape:export-xdpi="73.431374"
inkscape:export-ydpi="73.431374"
style="fill:#ababab;fill-opacity:1" />
<g
inkscape:export-ydpi="73.431374"
inkscape:export-xdpi="73.431374"
id="g4195"
transform="translate(0.18745231,-35.076806)">
<circle
style="fill:#bdbdbd;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.442;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="circle4197"
cx="12.003395"
cy="1040.9"
r="15.162507"
inkscape:export-xdpi="73.431374"
inkscape:export-ydpi="73.431374"
d="m 27.165902,1040.9 c 0,8.374 -6.788486,15.1625 -15.162507,15.1625 -8.3740213,0 -15.162507,-6.7885 -15.162507,-15.1625 0,-8.374 6.7884857,-15.1625 15.162507,-15.1625 8.374021,0 15.162507,6.7885 15.162507,15.1625 z" />
<path
style="fill:#ababab;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.442;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 66.068359,4.7871094 A 61.281367,61.281367 0 0 0 4.7871094,66.068359 61.281367,61.281367 0 0 0 66.068359,127.34961 l 0,-122.5625006 z"
transform="matrix(0.24742442,0,0,0.24742442,-4.3437287,1024.5529)"
id="path4199"
inkscape:connector-curvature="0"
inkscape:export-xdpi="73.431374"
inkscape:export-ydpi="73.431374" />
</g>
<g
id="g4517-8"
transform="matrix(0.24742442,0,0,0.24742442,-64.81656,1013.5329)">
<g
id="g4519-2"
transform="matrix(4.0416382,0,0,4.0416382,422.29019,-4060.1699)">
<g
id="g4521-8">
<path
id="path4523-1"
style="color:#000000;text-indent:0;text-transform:none;block-progression:tb;fill:#c3c7c7;fill-opacity:1"
d="m 8.9868,1030.4 0,7.8 c -1.8639,2.9 -3.8033,5.8 -5.625,8.8 -0.9343,1.5 -0.0087,3.8 1.7506,4.2 1.2656,0.3 2.5733,0.1 3.8564,0.2 3.1672,0 6.3372,0 9.5032,-0.1 2.044,-0.2 3.264,-2.8 2.077,-4.5 -1.813,-2.9 -3.721,-5.7 -5.562,-8.6 l 0,-7.8 -6.0002,0 z"
inkscape:connector-curvature="0" />
<path
id="path4525-4"
d="m 15.469805,1042.9 c 0,0.5358 -0.433988,0.9698 -0.969805,0.9698 -0.535817,0 -0.969805,-0.434 -0.969805,-0.9698 0,-0.5358 0.433988,-0.9698 0.969805,-0.9698 0.535817,0 0.969805,0.434 0.969805,0.9698 z"
inkscape:connector-curvature="0"
style="fill:#2ecc6d;fill-opacity:1" />
<path
id="path4529-2"
d="m 12.580262,1042.5105 c 0,0.8731 -0.707167,1.5803 -1.580262,1.5803 -0.873095,0 -1.5802621,-0.7072 -1.5802621,-1.5803 0,-0.8731 0.7071671,-1.5803 1.5802621,-1.5803 0.873095,0 1.580262,0.7072 1.580262,1.5803 z"
inkscape:connector-curvature="0"
style="fill:#2ecc6d;fill-opacity:1" />
<path
id="path4531-5"
d="m 7.4729,1042.4 c -1.098,1.7 -2.2018,3.4 -3.2812,5.1 -0.6853,1.2 0.3032,2.8 1.6875,2.9 l 12.313,0 c 1.396,-0.1 2.274,-1.9 1.5,-3 -1.071,-1.7 -2.149,-3.4 -3.219,-5 l -9.0001,0 z"
inkscape:connector-curvature="0"
style="fill:#2ecc6d;fill-opacity:1" />
<path
id="path4527"
style="text-indent:0;text-transform:none;block-progression:tb;color:#000000;fill:#000000;fill-opacity:0.17258881"
d="m 9,1030.4 0,7.8 c -1.8639,2.9 -3.8033,5.8 -5.625,8.8 -0.9343,1.5 -0.0092,3.8 1.75,4.2 1.2656,0.3 2.5607,0.1 3.8438,0.2 l 3.0002,0 0,-21 -2.969,0 z"
inkscape:connector-curvature="0" />
</g>
</g>
<g
id="g4537-0"
transform="translate(-60,0)" />
</g>
</g>
<g
id="g4537"
transform="translate(-60,0)" />
</g>
transform="translate(69.0625,-46.15625)">
<path
style="fill:#2dcc70;fill-opacity:1;stroke:none;stroke-width:1.06142259000000005;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
d="M 53.330003,150.40298 C -100.82666,294.52575 -108.95987,536.303 35.162892,690.45967 179.28566,844.61634 421.08425,852.77237 575.24092,708.64961 729.39759,564.52684 737.53228,322.70542 593.40952,168.54875 449.28675,14.392087 207.48667,6.2802195 53.330003,150.40298 z M 85.70534,185.03231 C 218.25648,61.108783 424.80739,65.721454 551.74986,193.67886 l -100.87474,94.3089 C 376.05427,215.64859 256.82984,213.96297 179.95022,285.83857 103.07061,357.71416 96.740238,476.78235 163.88773,556.29543 L 63.01299,650.60434 C -56.124294,515.34979 -46.845805,308.95583 85.70534,185.03231 z m 123.80312,132.42235 c 61.88489,-57.85687 158.96968,-54.59101 216.82655,7.29389 57.85687,61.88489 54.59101,158.96968 -7.29389,216.82655 -61.88489,57.85687 -158.96968,54.59101 -216.82655,-7.29388 -57.85687,-61.8849 -54.591,-158.96969 7.29389,-216.82656 z m 36.66501,39.21766 c -40.23528,37.61641 -42.35766,100.7086 -4.74125,140.94388 37.61641,40.23528 100.72995,42.38049 140.96523,4.76408 40.23528,-37.61641 42.35915,-100.75277 4.74273,-140.98806 -37.61641,-40.23528 -100.73142,-42.33632 -140.96671,-4.7199 z M 76.799719,665.35091 177.67446,571.042 c 74.82085,72.33918 194.04529,74.02479 270.9249,2.1492 76.87962,-71.8756 83.20998,-190.94379 16.06249,-270.45687 L 565.53659,208.42542 C 684.67388,343.67997 675.39539,550.07393 542.84424,673.99746 410.2931,797.92098 203.74219,793.30831 76.799719,665.35091 z"
id="path2985"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB