show username link if there is no link on title in last comments widget

This commit is contained in:
igoradamenko
2019-01-06 21:54:28 +02:00
parent 566d5820ad
commit 709f75d90d
3 changed files with 10 additions and 3 deletions
@@ -6,7 +6,7 @@
padding-bottom: 0;
.comment__username {
color: inherit;
color: #0aa;
}
.comment__title {
@@ -28,6 +28,7 @@
.comment__info {
display: inline;
padding-right: 0;
font-weight: 700;
&::after {
content: ' ';
+7 -1
View File
@@ -446,7 +446,13 @@ export default class Comment extends Component {
</div>
)}
<div className="comment__info">
<span className="comment__username">{o.user.name}</span>
{!!o.title && o.user.name}
{!o.title && (
<a href={`${o.locator.url}#${COMMENT_NODE_CLASSNAME_PREFIX}${o.id}`} className="comment__username">
{o.user.name}
</a>
)}
</div>{' '}
<div
className={b('comment__text', { mix: b('raw-content', {}, { theme: mods.theme }) })}
+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>remark42</title>
<title>remark42 demo page</title>
<style>
body {