Skip to content

Commit

Permalink
Fix css
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 13, 2019
1 parent 10f572b commit 68cc7f0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions htdocs/theme/eldy/badges.inc.php
Expand Up @@ -25,22 +25,24 @@
.badge-pill, .tabs .badge {
padding-right: .6em;
padding-left: .6em;
border-radius: 10rem;
border-radius: 0.25rem;
}

.badge-dot {
padding: 0;
border-radius: 50%;
padding: 0.6em;
padding: 0.25rem;
vertical-align: middle;
}

a.badge:focus, a.badge:hover {
text-decoration: none;
}



.liste_titre .badge {
background-color: <?php print $badgeSecondary; ?>;
color: #fff;
}


/* PRIMARY */
Expand Down Expand Up @@ -155,7 +157,7 @@
background-color: <?php print colorDarker($badgeDark, 10); ?>;
}

/*
/*
* STATUS BADGES
*/

Expand All @@ -164,32 +166,32 @@
<?php for ($i = 0; $i <= 9; $i++){

print "\n/* STATUS".$i." */\n";

$thisBadgeBackgroundColor = $thisBadgeBorderColor = ${'badgeStatus'.$i};


$TBadgeBorderOnly = array(0,3,5,7);
$thisBadgeTextColor = colorIsLight(${'badgeStatus'.$i})?'#212529':'#ffffff';
if(in_array($i, $TBadgeBorderOnly)){
$thisBadgeTextColor = '#212529';
$thisBadgeBackgroundColor = "#fff";
}

print ".badge-status".$i." {\n";
print " color: ".$thisBadgeTextColor." !important;\n";

if(in_array($i, $TBadgeBorderOnly)){
print " border-color: ".$thisBadgeBorderColor.";\n";
}

print " background-color: ".$thisBadgeBackgroundColor.";\n";
print "}\n";

print ".badge-status".$i.".focus, .badge-status".$i.":focus {\n";
print " outline: 0;\n";
print " box-shadow: 0 0 0 0.2rem ".colorHexToRgb($thisBadgeBackgroundColor, 0.5).";\n";
print "}\n";

print ".badge-status".$i.":focus, .badge-status".$i.":hover {\n";
print " color: ".$thisBadgeTextColor." !important;\n";
print " background-color: ".colorDarker($thisBadgeBackgroundColor, 10).";\n";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/theme/eldy/theme_vars.inc.php
Expand Up @@ -62,7 +62,7 @@

// Badges colors
$badgePrimary ='#007bff';
$badgeSecondary ='#6c757d';
$badgeSecondary ='#999999';
$badgeSuccess ='#28a745';
$badgeDanger ='#dc3545';
$badgeWarning ='#ffc107';
Expand Down

0 comments on commit 68cc7f0

Please sign in to comment.