mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 15:05:50 +01:00
Fix label text color
This commit is contained in:
@@ -29,9 +29,9 @@ case class Label(
|
|||||||
val b = color.substring(4, 6)
|
val b = color.substring(4, 6)
|
||||||
|
|
||||||
if(Integer.parseInt(r, 16) + Integer.parseInt(g, 16) + Integer.parseInt(b, 16) > 408){
|
if(Integer.parseInt(r, 16) + Integer.parseInt(g, 16) + Integer.parseInt(b, 16) > 408){
|
||||||
"black"
|
"000000"
|
||||||
} else {
|
} else {
|
||||||
"white"
|
"ffffff"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
<div class="span8">
|
<div class="span8">
|
||||||
<div style="margin-top: 6px">
|
<div style="margin-top: 6px">
|
||||||
<a href="@url(repository)/issues?labels=@urlEncode(label.labelName)" id="label-row-content-@label.labelId">
|
<a href="@url(repository)/issues?labels=@urlEncode(label.labelName)" id="label-row-content-@label.labelId">
|
||||||
<span style="background-color: #@label.color; color: @label.fontColor; padding: 8px; font-size: 120%; border-radius: 4px;">
|
<span style="background-color: #@label.color; color: #@label.fontColor; padding: 8px; font-size: 120%; border-radius: 4px;">
|
||||||
<img src="@assets/common/images/label_@(label.fontColor).png" style="width: 12px;"/>
|
<img src="@assets/common/images/label_@(if(label.fontColor == "ffffff") "white" else "black").png" style="width: 12px;"/>
|
||||||
@label.labelName
|
@label.labelName
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user