From ab992af2b4a887d421714c6c5c5d8ea786f12a60 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 22 Oct 2015 12:07:41 +0200 Subject: [PATCH] =?UTF-8?q?D=C3=A9connection=20par=20clic=20sur=20"usernam?= =?UTF-8?q?e"=20ou=20sur=20bouton=20sp=C3=A9cial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/header.css | 5 ++-- css/layout.css | 2 +- css/menu.css | 38 ++++++++++++++++++----- index.php | 8 ++--- js/actionScript.js | 20 +++++++------ src/close.svg | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 124 insertions(+), 24 deletions(-) create mode 100644 src/close.svg diff --git a/css/header.css b/css/header.css index feb0059..4a52993 100755 --- a/css/header.css +++ b/css/header.css @@ -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 */ diff --git a/css/layout.css b/css/layout.css index e49cdfa..5c0cac6 100755 --- a/css/layout.css +++ b/css/layout.css @@ -288,4 +288,4 @@ body{ #AUTH input[type=button]:hover{ background-color: #3dcc70; color: #fff; -} \ No newline at end of file +} diff --git a/css/menu.css b/css/menu.css index fe34fe9..0213311 100755 --- a/css/menu.css +++ b/css/menu.css @@ -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); } + + + diff --git a/index.php b/index.php index 9432e12..e2cec47 100755 --- a/index.php +++ b/index.php @@ -84,16 +84,16 @@ $notifNotifNum = 5; 0 ) echo "
"; - else echo "
"; + if( $memberNotifNum > 0 ) echo "
"; + else echo "
"; /* messages */ if( $messageNotifNum > 0 ) echo "
"; else echo "
"; /* notifications */ - if( $notifNotifNum > 0 ) echo "
"; - else echo "
"; + if( $notifNotifNum > 0 ) echo "
"; + else echo "
"; ?> diff --git a/js/actionScript.js b/js/actionScript.js index bb445c6..c5ecaaa 100755 --- a/js/actionScript.js +++ b/js/actionScript.js @@ -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){ diff --git a/src/close.svg b/src/close.svg new file mode 100644 index 0000000..fe54b84 --- /dev/null +++ b/src/close.svg @@ -0,0 +1,75 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + +