sigs: limit to 250px (configurable by variable)

pull/23/head
justcool393 2022-11-27 12:15:33 -06:00
parent 5a1224ddc7
commit 5381074617
3 changed files with 15 additions and 2 deletions

View File

@ -6399,3 +6399,16 @@ div.markdown {
.modlog-action:not(:first-of-type) {
border-top: 1px solid var(--gray-400) !important;
}
:root {
--signature-max-height: 250px;
}
.user-signature {
max-height: var(--signature-max-height);
overflow: clip;
}
.user-signature video {
height: var(--signature-max-height);
}

View File

@ -292,7 +292,7 @@ class Comment(Base):
body += f'"> - <a href="/votes/comment/option/{o.id}"><span id="score-comment-{o.id}">{o.upvotes}</span> votes</a></label></div>'''
if not self.ghost and self.author.show_sig(v):
body += f"<hr>{self.author.sig_html}"
body += f'<section id="signature-{self.author.id}" class="user-signature"><hr>{self.author.sig_html}</section>'
if v:
body = body.replace("!YOU!", v.username)

View File

@ -322,7 +322,7 @@ class Submission(Base):
if not listing and not self.ghost and self.author.show_sig(v):
body += f"<hr>{self.author.sig_html}"
body += f'<section id="signature-{self.author.id}" class="user-signature"><hr>{self.author.sig_html}</section>'
if v:
body = body.replace("!YOU!", v.username)