mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-11-29 19:03:34 +00:00
set color of text of category tag by calculating brightness of bgcolor
This commit is contained in:
parent
45b3e55e66
commit
4b0db80304
|
|
@ -3089,8 +3089,9 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
|
||||
if($categories = $document->getCategories()) {
|
||||
$content .= "<br />";
|
||||
foreach($categories as $category)
|
||||
$content .= "<span class=\"badge bg-secondary\"".($category->getColor() ? ' style="background-color: '.$category->getColor().' !important;"' : '').">".$category->getName()."</span> ";
|
||||
foreach($categories as $category) {
|
||||
$content .= "<span class=\"badge bg-secondary\"".($category->getColor() ? ' style="background-color: '.$category->getColor().' !important; color: '.(getColorBrightness($category->getColor()) < 0.8 ? 'white' : 'black').';"' : '').">".$category->getName()."</span> ";
|
||||
}
|
||||
}
|
||||
if(!empty($extracontent['bottom_title']))
|
||||
$content .= $extracontent['bottom_title'];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user