Add permalink to comment on timestamp
This commit is contained in:
parent
2550552b28
commit
ea0705a98d
@ -98,10 +98,11 @@
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment time{
|
.comment .permalink{
|
||||||
grid-column: 3;
|
grid-column: 3;
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
color: black;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,9 @@ $avatar
|
|||||||
<address>
|
<address>
|
||||||
<a class="author" href="$author_url" title="$author">$author</a>
|
<a class="author" href="$author_url" title="$author">$author</a>
|
||||||
</address>
|
</address>
|
||||||
|
<a class="permalink" href="$permalink" title="permalink">
|
||||||
<time datetime="$datetime">$published</time>
|
<time datetime="$datetime">$published</time>
|
||||||
|
</a>
|
||||||
<span class="text">$text</span>
|
<span class="text">$text</span>
|
||||||
|
|
||||||
<span class="likes">$likes</span>
|
<span class="likes">$likes</span>
|
||||||
@ -277,6 +279,8 @@ def get_comments_html(comments):
|
|||||||
action_buttons = '''<a href="''' + delete_url + '''" target="_blank">Delete</a>'''
|
action_buttons = '''<a href="''' + delete_url + '''" target="_blank">Delete</a>'''
|
||||||
else:
|
else:
|
||||||
action_buttons = ''
|
action_buttons = ''
|
||||||
|
|
||||||
|
permalink = URL_ORIGIN + '/watch?v=' + comment['video_id'] + '&lc=' + comment['comment_id']
|
||||||
html_result += comment_template.substitute(
|
html_result += comment_template.substitute(
|
||||||
author=comment['author'],
|
author=comment['author'],
|
||||||
author_url = URL_ORIGIN + comment['author_url'],
|
author_url = URL_ORIGIN + comment['author_url'],
|
||||||
@ -287,6 +291,7 @@ def get_comments_html(comments):
|
|||||||
datetime = '', #TODO
|
datetime = '', #TODO
|
||||||
replies = replies,
|
replies = replies,
|
||||||
action_buttons = action_buttons,
|
action_buttons = action_buttons,
|
||||||
|
permalink = permalink,
|
||||||
)
|
)
|
||||||
return html_result
|
return html_result
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user