Skip to content

Commit

Permalink
Language Selector color (#2498)
Browse files Browse the repository at this point in the history
### What's done:
 * Made language badge `text-light`
  • Loading branch information
sanyavertolet authored Aug 28, 2023
1 parent 0a206d6 commit cd5258d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ val languageSelector: VFC = FC {
div {
className = ClassName("dropdown")
a {
className = ClassName("dropdown-toggle")
className = ClassName("dropdown-toggle text-light")
id = LANG_DROPDOWN_ID
asDynamic()["data-toggle"] = "dropdown"
ariaHasPopup = true.unsafeCast<AriaHasPopup>()
ariaExpanded = false
style = jso { cursor = "pointer".unsafeCast<Cursor>() }
span { +language.label }
style = jso { cursor = "pointer".unsafeCast<Cursor>() }
}

div {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,8 @@ data class TopBarLink(
private fun textColor(
hrefAnchor: String,
location: Location,
) =
if (location.pathname.endsWith(hrefAnchor) && location.pathname.count { it == '/' } < TOP_BAR_PATH_SEGMENTS_HIGHLIGHT) {
"text-warning"
} else {
"text-light"
}
) = if (location.pathname.endsWith(hrefAnchor) && location.pathname.count { it == '/' } < TOP_BAR_PATH_SEGMENTS_HIGHLIGHT) {
"text-warning"
} else {
"text-light"
}

0 comments on commit cd5258d

Please sign in to comment.