Make comment border colors semi-transparent

This commit is contained in:
abias 2023-06-14 20:52:31 -04:00
parent 8ce6e5bc32
commit ab0805432d
3 changed files with 6 additions and 9 deletions

View file

@ -156,7 +156,7 @@ server.get("/*", async (req, res) => {
site = try_site.data;
initializeSite(site);
if (path != "/setup" && !site.site_view.local_site.site_setup) {
if (path !== "/setup" && !site.site_view.local_site.site_setup) {
return res.redirect("/setup");
}

View file

@ -270,10 +270,6 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
this.props.moderators
);
const borderColor = this.props.node.depth
? colorList[(this.props.node.depth - 1) % colorList.length]
: colorList[0];
const moreRepliesBorderColor = this.props.node.depth
? colorList[this.props.node.depth % colorList.length]
: colorList[0];
@ -951,9 +947,9 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
</div>
{showMoreChildren && (
<div
className={`details ml-1 comment-node py-2 ${
!this.props.noBorder ? "border-top border-light" : ""
}`}
className={classNames("details ml-1 comment-node py-2", {
"border-top border-light": !this.props.noBorder,
})}
style={`border-left: 2px ${moreRepliesBorderColor} solid !important`}
>
<button
@ -1205,6 +1201,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
linkBtn(small = false) {
const cv = this.commentView;
const classnames = classNames("btn btn-link btn-animate text-muted", {
"btn-sm": small,
});

View file

@ -1127,7 +1127,7 @@ export const colorList: string[] = [
];
function hsl(num: number) {
return `hsla(${num}, 35%, 50%, 1)`;
return `hsla(${num}, 35%, 50%, 0.5)`;
}
export function hostname(url: string): string {