NEW FontAwesome - Add possibility to select another version

This commit is contained in:
Alexandre SPANGARO
2023-09-26 21:49:15 +02:00
parent 266dea3b7e
commit 0fd8123606
9 changed files with 17 additions and 17 deletions

View File

@@ -4293,7 +4293,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$fakey = $pictowithouttext;
$facolor = '';
$fasize = '';
$fa = 'fas';
$fa = getDolGlobalString('MAIN_FONTAWESOME_ICON_STYLE', 'fas');
if (in_array($pictowithouttext, array('card', 'bell', 'clock', 'establishment', 'generic', 'minus-square', 'object_generic', 'pdf', 'plus-square', 'timespent', 'note', 'off', 'on', 'object_bookmark', 'bookmark', 'vcard'))) {
$fa = 'far';
}

View File

@@ -1802,8 +1802,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
if (!defined('DISABLE_FONT_AWSOME')) {
print '<!-- Includes CSS for font awesome -->'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/fontawesome-5/css/all.min.css'.($ext ? '?'.$ext : '').'">'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/fontawesome-5/css/v4-shims.min.css'.($ext ? '?'.$ext : '').'">'."\n";
$fontawesome_directory = getDolGlobalString('MAIN_FONTAWESOME_DIRECTORY', '/theme/common/fontawesome-5');
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.$fontawesome_directory.'/css/all.min.css'.($ext ? '?'.$ext : '').'">'."\n";
}
print '<!-- Includes CSS for Dolibarr theme -->'."\n";

View File

@@ -219,7 +219,7 @@ button.item_value.selected {
div[aria-describedby="dialog-info"] button:before {
content: "\f788";
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
font-weight: 900;
padding-right: 5px;
}

View File

@@ -132,7 +132,7 @@ div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::af
.dropdown-toggle::after {
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
font-size: 0.7em;
font-weight: 900;
font-style: normal;
@@ -375,7 +375,7 @@ a.dropdown-item {
.dropdown-item::before {
/* font part */
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
font-weight: 900;
font-style: normal;
font-variant: normal;

View File

@@ -1198,7 +1198,7 @@ div.divsearchfield {
content: "\f080";
}
.a-filter:before, .a-mesure:before {
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
font-weight: 600;
padding-right: 5px;
padding-left: 5px;
@@ -3470,7 +3470,7 @@ div.tabsElem {
/*
div.tabsElem a.tabactive::before, div.tabsElem a.tabunactive::before {
content: "\f0da";
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
padding-right: 2px;
font-weight: 900;
}
@@ -7526,7 +7526,7 @@ a.phpdebugbar-tab.phpdebugbar-active {
font-weight: 600 !important;
}
.phpdebugbar-fa-tags, .phpdebugbar-fa-tasks, .phpdebugbar-indicator .fa {
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
font-weight: 600;
}
div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-warning:before,
@@ -7544,7 +7544,7 @@ div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before,
div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before,
div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before
{
font-family: "Font Awesome 5 Free" !important;
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>" !important;
}
/* ============================================================================== */

View File

@@ -5,7 +5,7 @@
.mainmenu::before{
/* font part */
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
font-weight: 900;
font-style: normal;
font-variant: normal;

View File

@@ -145,7 +145,7 @@ div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::af
.dropdown-toggle::after {
/* font part */
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
font-size: 0.7em;
font-weight: 900;
font-style: normal;
@@ -386,7 +386,7 @@ a.dropdown-item {
.dropdown-item::before {
/* font part */
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
font-weight: 900;
font-style: normal;
font-variant: normal;

View File

@@ -5,7 +5,7 @@
.mainmenu::before{
/* font part */
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
font-weight: 900;
font-style: normal;
font-variant: normal;

View File

@@ -1450,7 +1450,7 @@ if ($conf->browser->layout == 'phone') {
content: "\f080";
}
.a-filter:before, .a-mesure:before {
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
font-weight: 600;
padding-right: 5px;
padding-left: 5px;
@@ -7452,7 +7452,7 @@ a.phpdebugbar-tab.phpdebugbar-active {
background-image: unset !important;
}
.phpdebugbar-indicator .fa {
font-family: "Font Awesome 5 Free";
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>";
font-weight: 600;
}
div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-warning:before,
@@ -7470,7 +7470,7 @@ div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before,
div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before,
div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before
{
font-family: "Font Awesome 5 Free" !important;
font-family: "<?php echo getDolGlobalString('MAIN_FONTAWESOME_FAMILY', 'Font Awesome 5 Free'); ?>" !important;
}