1
0
Fork 1

Make tag display less intrusive

remotes/1715175271555336803/main
gravel 2 years ago
parent c0a4b9c09a
commit e851576ae9
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -127,6 +127,10 @@ html:not(.js) .js-only {
color: black; color: black;
} }
#tbl_communities .room-label {
opacity: 0.75;
}
.room-label-user { .room-label-user {
background-color: greenyellow; background-color: greenyellow;
} }
@ -139,6 +143,11 @@ html:not(.js) .js-only {
background-color: pink; background-color: pink;
} }
#tbl_communities .room-label:not(.room-label-highlighted) {
background-color: transparent;
color: var(--primary-color);
}
gap { gap {
flex-grow: 1000; flex-grow: 1000;
} }

@ -136,6 +136,9 @@
if (CommunityTag::is_showcased_tag($this->text)) { if (CommunityTag::is_showcased_tag($this->text)) {
$classname .= " room-label-showcased"; $classname .= " room-label-showcased";
} }
if (CommunityTag::is_highlighted_tag($this->text)) {
$classname .= " room-label-highlighted";
}
return $classname; return $classname;
} }
@ -161,7 +164,9 @@
"we're here" "we're here"
]; ];
private const SHOWCASED_TAGS = ["official", "new", "we're here"]; private const SHOWCASED_TAGS = ["official", "new", "we're here", "nsfw", "read-only"];
private const HIGHLIGHTED_TAGS = ["new", "we're here"];
private const REDUNDANT_TAGS = ["session"]; private const REDUNDANT_TAGS = ["session"];
@ -181,5 +186,9 @@
public static function is_showcased_tag(string $tag): bool { public static function is_showcased_tag(string $tag): bool {
return in_array(strtolower($tag), CommunityTag::SHOWCASED_TAGS); return in_array(strtolower($tag), CommunityTag::SHOWCASED_TAGS);
} }
public static function is_highlighted_tag(string $tag): bool {
return in_array(strtolower($tag), CommunityTag::HIGHLIGHTED_TAGS);
}
} }
?> ?>