Déconnection par clic sur "username" ou sur bouton spécial

This commit is contained in:
xdrm-brackets 2015-10-22 12:07:41 +02:00
parent 01cd088834
commit ab992af2b4
6 changed files with 124 additions and 24 deletions

View File

@ -105,7 +105,7 @@
background-size: 1em auto;
/* foreground */
color: #aaa;
color: #395873;
line-height: 2.5em;
/* animation */
@ -119,7 +119,7 @@
#HEADER .searchbar:focus{
background-image: url(../src/header/search@hover.svg);
color: #223343;
color: #17232f;
}
@ -181,6 +181,7 @@
}
/* BOUTON POUR LA DÉCONNECTION */
#SUBHEADER #LOGOUT{
/* position */

View File

@ -288,4 +288,4 @@ body{
#AUTH input[type=button]:hover{
background-color: #3dcc70;
color: #fff;
}
}

View File

@ -43,19 +43,38 @@
#MENU .userdata:hover{ background-color: #2dcc70; }
/* 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); }
/* quand on est connecté, afficher le bouton de déconnection */
#MENU .userdata.M:hover,
#MENU .userdata.F:hover{ background-image: url(../src/menu/userdata/visitor.svg); }
@ -132,3 +151,6 @@
#MENU span:nth-child(6).active{ background-image: url(../src/menu/menu_icon/marks@hover.svg); }
#MENU span:nth-child(7):hover,
#MENU span:nth-child(7).active{ background-image: url(../src/menu/menu_icon/settings@hover.svg); }

View File

@ -84,16 +84,16 @@ $notifNotifNum = 5;
<?php
/* membres */
if( $memberNotifNum > 0 ) echo "<div class='member' data-num='".$memberNotifNum."'></div>";
else echo "<div class='member'></div>";
if( $memberNotifNum > 0 ) echo "<div class='member' data-num='".$memberNotifNum."'></div>";
else echo "<div class='member'></div>";
/* messages */
if( $messageNotifNum > 0 ) echo "<div class='message' data-num='".$messageNotifNum."'></div>";
else echo "<div class='message'></div>";
/* notifications */
if( $notifNotifNum > 0 ) echo "<div class='notification' data-num='".$notifNotifNum."'></div>";
else echo "<div class='notification'></div>";
if( $notifNotifNum > 0 ) echo "<div class='notification' data-num='".$notifNotifNum."'></div>";
else echo "<div class='notification'></div>";
?>
</div>

View File

@ -181,15 +181,17 @@ var connected = !( DOM.AUTH.children[0].innerHTML == 'Connection' );
/* [3] GESTION DE L'AUTHENTIFICATION
==============================================================*/
// ouvre l'interface d'authentification quand click
if( !connected ) // zone verte si pas connecté
DOM.MENU.children[0].addEventListener('click', function(e){
DOM.AUTHFILTER.className = 'active';
}, false);
else // sinon bouton de déconnection
DOM.LOGOUT.addEventListener('click', function(e){
DOM.AUTHFILTER.className = 'active';
}, false);
// ouvre l'interface d'authentification quand click sur zone verte
DOM.MENU.children[0].addEventListener('click', function(e){
DOM.AUTHFILTER.className = 'active';
}, false);
if( connected ) // bouton spécial si connecté
DOM.LOGOUT.addEventListener('click', function(e){
DOM.AUTHFILTER.className = 'active';
}, false);
// ferme l'interface d'authentification quand clic sur filtre
DOM.AUTHFILTER.addEventListener('click', function(e){

75
src/close.svg Normal file
View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="22px"
version="1.1"
viewBox="0 0 22 22"
width="22px"
id="svg2"
inkscape:version="0.48.4 r9939"
sodipodi:docname="1445525197_circle_close_delete.svg">
<metadata
id="metadata17">
<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>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview15"
showgrid="false"
inkscape:zoom="10.727273"
inkscape:cx="11"
inkscape:cy="11"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<defs
id="defs6">
<path
d="M11,22 C17.0751325,22 22,17.0751325 22,11 C22,4.92486745 17.0751325,0 11,0 C4.92486745,0 0,4.92486745 0,11 C0,17.0751325 4.92486745,22 11,22 L11,22 Z M11,21 C16.5228478,21 21,16.5228478 21,11 C21,5.47715223 16.5228478,1 11,1 C5.47715223,1 1,5.47715223 1,11 C1,16.5228478 5.47715223,21 11,21 Z M6.75735931,15.9497475 L6.05025253,15.2426407 L10.2928932,11 L6.05025253,6.75735931 L6.75735931,6.05025253 L11,10.2928932 L15.2426407,6.05025253 L15.9497475,6.75735931 L11.7071068,11 L15.9497475,15.2426407 L15.2426407,15.9497475 L11,11.7071068 L6.75735931,15.9497475 Z"
id="path-1" />
</defs>
<g
fill="none"
fill-rule="evenodd"
id="miu"
stroke="none"
stroke-width="1">
<g
id="circle_close_delete_outline_stroke">
<use
fill="#000000"
fill-rule="evenodd"
xlink:href="#path-1"
id="use11" />
<use
fill="none"
xlink:href="#path-1"
id="use13" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB