Browse Source

[Site & boutique] Header top : affichage du nom de l'utilisateur en entier + position sous-menus

feature/rotating_product
Guillaume Bourgeois 6 months ago
parent
commit
4511a1b5b8
3 changed files with 62 additions and 32 deletions
  1. +2
    -2
      common/views/nav_user_top.php
  2. +42
    -26
      common/web/css/screen.css
  3. +18
    -4
      common/web/sass/_common.scss

+ 2
- 2
common/views/nav_user_top.php View File

@@ -107,9 +107,9 @@ if ($isUserCurrentGrantedAsProducer && $userCurrent->id_producer) {

$itemUser = [
'label' => '<i class="bi bi-person"></i> <span class="link-text">' .
((!Yii::$app->user->isGuest) ? Html::encode(Yii::$app->user->identity->name . ' ' . strtoupper(substr(Yii::$app->user->identity->lastname, 0, 1)) . '.') : '') .
((!Yii::$app->user->isGuest) ? Html::encode(Yii::$app->user->identity->name . ' ' . Yii::$app->user->identity->lastname) : '') .
'</span>',
'options' => ['id' => 'label1'],
'options' => ['id' => 'label1', 'class' => 'nav-item-user'],
'url' => '#',
'linkOptions' => ['class' => ''],
'items' => $itemsUserArray,

+ 42
- 26
common/web/css/screen.css View File

@@ -432,48 +432,64 @@ termes.
position: relative;
top: 1px;
}
/* line 281, ../sass/_common.scss */
/* line 280, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li.nav-item-producers .dropdown-menu {
right: -75px;
left: -75px;
}
/* line 285, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li.nav-item-user .dropdown-menu {
right: -22px;
left: 9px;
}
/* line 291, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li .dropdown-menu a {
padding: 2px 20px;
}
/* line 284, ../sass/_common.scss */
/* line 294, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li .dropdown-menu a:hover, .container-nav-user-top .nav-user-top .navbar ul li .dropdown-menu a:focus {
background-color: #ece4d8;
}
/* line 293, ../sass/_common.scss */
/* line 303, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .dropdown-menu {
z-index: 9999;
}
/* line 295, ../sass/_common.scss */
/* line 305, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .dropdown-menu .divider.dropdown-header {
padding: 0px;
}

@media screen and (max-width: 991px) {
/* line 306, ../sass/_common.scss */
/* line 316, ../sass/_common.scss */
.container-nav-user-top .nav-user-top {
position: relative;
}
/* line 310, ../sass/_common.scss */
/* line 320, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul {
width: 100%;
display: block;
margin-right: 0px;
text-align: center;
}
/* line 316, ../sass/_common.scss */
/* line 326, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li {
display: inline-block;
}
/* line 320, ../sass/_common.scss */
/* line 329, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li.nav-item-producers .dropdown-menu {
right: -95px;
left: -115px;
width: 300px;
}
/* line 327, ../sass/_common.scss */
/* line 334, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar ul li.nav-item-user .dropdown-menu {
left: -40px;
width: 150px;
}
/* line 341, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar .link-text {
display: none;
}
/* line 331, ../sass/_common.scss */
/* line 345, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar .dropdown-menu {
position: absolute;
right: 5%;
@@ -484,32 +500,32 @@ termes.
-webkit-box-shadow: 0px 0px 4px gray;
box-shadow: 0px 0px 4px gray;
}
/* line 340, ../sass/_common.scss */
/* line 354, ../sass/_common.scss */
.container-nav-user-top .nav-user-top .navbar .dropdown-menu li a {
padding-left: 15px;
}
}
/* Block de date */
/* line 353, ../sass/_common.scss */
/* line 367, ../sass/_common.scss */
.block-date {
margin: 0px auto;
padding-top: 0px;
text-align: center;
}
/* line 358, ../sass/_common.scss */
/* line 372, ../sass/_common.scss */
.block-date .day {
text-transform: capitalize;
line-height: 15px;
font-size: 15px;
text-transform: uppercase;
}
/* line 365, ../sass/_common.scss */
/* line 379, ../sass/_common.scss */
.block-date .num {
font-size: 30px;
line-height: 35px;
font-weight: bold;
}
/* line 371, ../sass/_common.scss */
/* line 385, ../sass/_common.scss */
.block-date .month {
text-transform: uppercase;
line-height: 15px;
@@ -518,52 +534,52 @@ termes.
}

/* Page d'erreur */
/* line 381, ../sass/_common.scss */
/* line 395, ../sass/_common.scss */
#main #content .site-error .col-lg-6 {
margin: 0px auto;
float: none;
}
/* line 391, ../sass/_common.scss */
/* line 405, ../sass/_common.scss */
#main #content .site-error .panel h2 {
text-transform: none;
font-size: 25px;
margin-top: 0px;
margin-bottom: 20px;
}
/* line 398, ../sass/_common.scss */
/* line 412, ../sass/_common.scss */
#main #content .site-error .panel p:last-child {
margin-bottom: 0px;
padding-bottom: 0px;
}
/* line 404, ../sass/_common.scss */
/* line 418, ../sass/_common.scss */
#main #content .site-error .alert {
padding-bottom: 5px;
}
/* line 407, ../sass/_common.scss */
/* line 421, ../sass/_common.scss */
#main #content .site-error .alert h3 {
margin-top: 5px;
margin-bottom: 18px;
}
/* line 412, ../sass/_common.scss */
/* line 426, ../sass/_common.scss */
#main #content .site-error .alert p {
margin-bottom: 15px;
}
/* line 416, ../sass/_common.scss */
/* line 430, ../sass/_common.scss */
#main #content .site-error .alert .btn {
text-decoration: none;
}
/* line 421, ../sass/_common.scss */
/* line 435, ../sass/_common.scss */
#main #content .site-error p.error-message {
font-weight: bold;
}

/* Paiement */
/* line 427, ../sass/_common.scss */
/* line 441, ../sass/_common.scss */
.payment-detail-remaining-surplus {
font-size: 13px;
color: gray;
}
/* line 431, ../sass/_common.scss */
/* line 445, ../sass/_common.scss */
.payment-detail-remaining-surplus strong {
font-weight: bold;
}

+ 18
- 4
common/web/sass/_common.scss View File

@@ -277,6 +277,16 @@
}
}

&.nav-item-producers .dropdown-menu {
right: -75px;
left: -75px;
}

&.nav-item-user .dropdown-menu {
right: -22px;
left: 9px;
}

.dropdown-menu {
a {
padding: 2px 20px;
@@ -316,10 +326,14 @@
li {
display: inline-block;

&.nav-item-producers {
.dropdown-menu {
right: -95px;
}
&.nav-item-producers .dropdown-menu {
left: -115px;
width: 300px;
}

&.nav-item-user .dropdown-menu {
left: -40px;
width: 150px;
}
}
}

Loading…
Cancel
Save