From 3256ac2f2a113fb0a83ca74920704499e7c2b164 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 May 2022 19:47:51 +0200 Subject: [PATCH] css --- htdocs/main.inc.php | 1 + htdocs/theme/eldy/dropdown.inc.php | 12 ++++- htdocs/theme/eldy/global.inc.php | 56 ++++++++++++++++---- htdocs/theme/eldy/main_menu_fa_icons.inc.php | 4 +- htdocs/theme/md/dropdown.inc.php | 11 +++- 5 files changed, 70 insertions(+), 14 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 7e2cb072913..6718db5e298 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2083,6 +2083,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead print "\n"; // end div class="login_block" print ''; + //print '
 
'; print '
'; print "\n\n"; diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 6ca9ad67b1f..338b4cf2759 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -121,8 +121,17 @@ button.dropdown-item.global-search-item { text-decoration: none !important; } + +/* CSS to hide the arrow to show open/close */ +div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown { + padding-right: 5px; +} +div#topmenu-quickadd-dropdown a::after, div#topmenu-bookmark-dropdown a::after { + display: none; +} + + .dropdown-toggle::after { - /* font part */ font-family: "Font Awesome 5 Free"; font-size: 0.7em; font-weight: 900; @@ -141,6 +150,7 @@ button.dropdown-item.global-search-item { transition: transform .2s ease-in-out; } + .open>.dropdown-toggle::after { transform: rotate(180deg); } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 6a782e5f526..db827600b33 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2605,27 +2605,45 @@ a.tmenuimage:hover{ /* To show text of top menu on hover only (THEME_TOPMENU_DISABLE_IMAGE == 2) */ -.tmenulabel:not(.menuhider), .tmenulabel:not(.menuhider):before { - display: none; +.tmenulabel:not(.menuhider), .tmenulabel:not(.menuhider)::before { + display: none; + /* opacity: 0; To show text after transition */ } -a.tmenuimage:not(.menuhider), a.tmenuimage:not(.menuhider):before, -div.tmenuimage:not(.menuhider), div.tmenuimage:not(.menuhider):before, -span.tmenuimage:not(.menuhider), span.tmenuimage:not(.menuhider):before { +a.tmenuimage:not(.menuhider), a.tmenuimage:not(.menuhider)::before, +div.tmenuimage:not(.menuhider), div.tmenuimage:not(.menuhider)::before, +span.tmenuimage:not(.menuhider), span.tmenuimage:not(.menuhider)::before { font-size: 1.3em; - margin-top: 10px !important; + margin-top: 8px !important; } + -.tmenudiv:hover .tmenulabel:not(.menuhider), .tmenudiv:hover .tmenulabel:not(.menuhider):before { +.tmenudiv:hover .tmenulabel:not(.menuhider), .tmenudiv:hover .tmenulabel:not(.menuhider)::before { + display: block; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + /* For transition transition-delay: 1000ms; + transition-property: all; */ + opacity: 1; display: initial !important; + line-height: 0.6em !important; + height: 1em !important; + overflow: hidden; + text-overflow: ellipsis; + color: var(--colortextbackhmenu); + top: 0px; } -.tmenudiv:hover .tmenuimage:not(.menuhider), .tmenudiv:hover .tmenuimage:not(.menuhider):before { - font-size: 1.1em !important; + +.tmenudiv:hover .tmenuimage:not(.menuhider), .tmenudiv:hover .tmenuimage:not(.menuhider)::before { + /* For transition transition-delay: 1000ms; + transition-property: all; */ margin-top: 0px !important; } + -li.tmenu:hover .tmenulabel:not(.menuhider), li.tmenu:hover .tmenulabel:not(.menuhider):before { +li.tmenu:hover .tmenulabel:not(.menuhider), li.tmenu:hover .tmenulabel:not(.menuhider)::before { display: initial !important; } li.tmenu:hover .tmenuimage:not(.menuhider), li.tmenu:hover .tmenuimage:not(.menuhider):before { @@ -2694,12 +2712,14 @@ li.tmenu:hover .tmenuimage:not(.menuhider), li.tmenu:hover .tmenuimage:not(.menu $url = dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.(min($generic, 4))."_over.png", 1); print "div.mainmenu.".$val." {\n"; print " background-image: url(".$url.");\n"; + print " background-position-y: 3px;\n"; print "}\n"; } $generic++; } else { print "div.mainmenu.".$val." {\n"; print " background-image: url(".$url.");\n"; + print " background-position-y: 3px;\n"; print "}\n"; } } @@ -7321,11 +7341,18 @@ div.clipboardCPValue.hidewithsize { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + color: var(--colortextbackhmenu); + /* color: var(--colorbackhmenu1); */ } + .tmenuimage { + color: var(--colortextbackhmenu); + } + .mainmenuaspan { font-size: 0.9em; padding-right: 0; + padding-left: 0; } .topmenuimage { background-size: 22px auto; @@ -7380,6 +7407,15 @@ div.clipboardCPValue.hidewithsize { /* rule to reduce top menu - 3rd reduction: The menu for user is on left */ @media only screen and (max-width: global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px) /* reduction 3 */ { + + .tmenudiv .tmenulabel span.mainmenuaspan { + display: none !important; + } + .tmenudiv:hover .tmenuimage:not(.menuhider), .tmenudiv:hover .tmenuimage:not(.menuhider):before { + margin-top: 8px !important; + } + + .side-nav { z-index: 200; background: var(--colorbackvmenu1); diff --git a/htdocs/theme/eldy/main_menu_fa_icons.inc.php b/htdocs/theme/eldy/main_menu_fa_icons.inc.php index 60c3746fe66..ada1ae23a12 100644 --- a/htdocs/theme/eldy/main_menu_fa_icons.inc.php +++ b/htdocs/theme/eldy/main_menu_fa_icons.inc.php @@ -10,12 +10,12 @@ font-style: normal; font-variant: normal; text-rendering: auto; - line-height: 23px; - font-size: ; + line-height: 28px; -webkit-font-smoothing: antialiased; text-align:center; text-decoration:none; color: var(--colortextbackhmenu); + /* font-size: ; */ } .fa-15x { diff --git a/htdocs/theme/md/dropdown.inc.php b/htdocs/theme/md/dropdown.inc.php index c56590d7bfa..615951bbbd9 100644 --- a/htdocs/theme/md/dropdown.inc.php +++ b/htdocs/theme/md/dropdown.inc.php @@ -26,7 +26,7 @@ button.dropdown-item.global-search-item { } div#topmenu-quickadd-dropdown { position: fixed; - : 65px; + : 55px; top: 0px; } div#topmenu-bookmark-dropdown { @@ -124,6 +124,15 @@ button.dropdown-item.global-search-item { } +/* CSS to hide the arrow to show open/close */ +div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown { + padding-right: 2px; +} +div#topmenu-quickadd-dropdown a::after, div#topmenu-bookmark-dropdown a::after { + display: none; +} + + .dropdown-toggle{ text-decoration: none !important; }