Highlight Post Authors in Comments
This commit is contained in:
parent
b1071e9579
commit
b1a572072c
@ -133,7 +133,7 @@ async fn parse_post(json: serde_json::Value) -> Result<Post, &'static str> {
|
|||||||
} else {
|
} else {
|
||||||
"white".to_string()
|
"white".to_string()
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(post)
|
Ok(post)
|
||||||
|
@ -33,7 +33,9 @@ pub async fn render(sub_name: String, sort: Option<String>, ends: (Option<String
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let sub_result = if !&sub_name.contains("+") { subreddit(&sub_name).await } else {
|
let sub_result = if !&sub_name.contains("+") {
|
||||||
|
subreddit(&sub_name).await
|
||||||
|
} else {
|
||||||
Ok(Subreddit {
|
Ok(Subreddit {
|
||||||
name: String::new(),
|
name: String::new(),
|
||||||
title: String::new(),
|
title: String::new(),
|
||||||
|
@ -307,6 +307,11 @@ a:not(.post_right):hover {
|
|||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.comment_author.op {
|
||||||
|
color: aqua;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.author_flair {
|
.author_flair {
|
||||||
background: var(--highlighted);
|
background: var(--highlighted);
|
||||||
color: white;
|
color: white;
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
<title>{% block title %}Libreddit{% endblock %}</title>
|
<title>{% block title %}Libreddit{% endblock %}</title>
|
||||||
<meta http-equiv="Referrer-Policy" content="no-referrer">
|
<meta http-equiv="Referrer-Policy" content="no-referrer">
|
||||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'; base-uri 'none'; form-action 'self';">
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'; base-uri 'none'; form-action 'self';">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<meta name="description" content="View on Libreddit, an alternative private front-end to Reddit.">
|
<meta name="description" content="View on Libreddit, an alternative private front-end to Reddit.">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<link rel="stylesheet" href="/style.css">
|
<link rel="stylesheet" href="/style.css">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
</div>
|
</div>
|
||||||
<details class="comment_right" open>
|
<details class="comment_right" open>
|
||||||
<summary class="comment_data"><a class="comment_author" href="/u/{{ item.author }}">u/{{ item.author }}</a>
|
<summary class="comment_data"><a class="comment_author {% if item.author == post.author %}op{% endif %}" href="/u/{{ item.author }}">u/{{ item.author }}</a>
|
||||||
{% if item.flair.0 != "" %}
|
{% if item.flair.0 != "" %}
|
||||||
<small class="author_flair">{{ item.flair.0 }}</small>
|
<small class="author_flair">{{ item.flair.0 }}</small>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user