test
This commit is contained in:
parent
3d2936965c
commit
770430b9bf
4 changed files with 52 additions and 23 deletions
|
@ -54,8 +54,6 @@ class Comment(Base):
|
|||
child_comments = relationship("Comment", remote_side=[parent_comment_id], viewonly=True)
|
||||
awards = relationship("AwardRelationship", viewonly=True)
|
||||
|
||||
awards = None
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
if "created_utc" not in kwargs:
|
||||
|
|
|
@ -222,6 +222,7 @@ def sanitize(sanitized, noimages=False):
|
|||
for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]:
|
||||
sanitized = sanitized.replace(rd, "https://old.reddit.com/")
|
||||
|
||||
sanitized = sanitized.replace("old.reddit.com/gallery", "new.reddit.com/gallery")
|
||||
sanitized = re.sub(' (https:\/\/[^ <>]*)', r' <a target="_blank" rel="nofollow noopener noreferrer" href="\1">\1</a>', sanitized)
|
||||
sanitized = re.sub('<p>(https:\/\/[^ <>]*)', r'<p><a target="_blank" rel="nofollow noopener noreferrer" href="\1">\1</a></p>', sanitized)
|
||||
|
||||
|
|
|
@ -504,6 +504,8 @@ def submit_post(v):
|
|||
for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]:
|
||||
url = url.replace(rd, "https://old.reddit.com/")
|
||||
|
||||
url = url.replace("old.reddit.com/gallery", "new.reddit.com/gallery")
|
||||
|
||||
url = url.replace("https://mobile.twitter.com", "https://twitter.com")
|
||||
if url.startswith("https://streamable.com/") and not url.startswith("https://streamable.com/e/"): url = url.replace("https://streamable.com/", "https://streamable.com/e/")
|
||||
|
||||
|
|
|
@ -33,45 +33,73 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.train {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
width: 100px;
|
||||
animation: train 5s linear infinite !important;
|
||||
}
|
||||
.trainrev {
|
||||
animation: trainrev 5s linear infinite !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.train {
|
||||
.train1 {
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
width: 35px;
|
||||
animation: train 3s linear infinite !important;
|
||||
}
|
||||
.trainrev {
|
||||
animation: trainrev 3s linear infinite !important;
|
||||
.train2 {
|
||||
display: none !important;
|
||||
}
|
||||
.train3 {
|
||||
display: none !important;
|
||||
}
|
||||
.train4 {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.train1 {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
width: 100px;
|
||||
animation: trainrev 5s linear infinite !important;
|
||||
transform: scaleX(-1);
|
||||
-webkit-transform: scaleX(-1);
|
||||
top: 35%
|
||||
}
|
||||
.train2 {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
width: 100px;
|
||||
animation: train 5s linear infinite !important;
|
||||
top: 10%
|
||||
}
|
||||
.train3 {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
width: 100px;
|
||||
animation: trainrev 5s linear infinite !important;
|
||||
transform: scaleX(-1);
|
||||
-webkit-transform: scaleX(-1);
|
||||
top: 60%
|
||||
}
|
||||
.train4 {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
width: 100px;
|
||||
animation: train 5s linear infinite !important;
|
||||
top: 85%
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<img class="train" style="top:10%" src="/assets/images/emojis/marseytrain.webp">
|
||||
<img class="train1" src="/assets/images/emojis/marseytrain.webp">
|
||||
{% endif %}
|
||||
|
||||
{% if p.award_count("train") > 1 %}
|
||||
<img class="train trainrev mirrored" style="top:35%" src="/assets/images/emojis/marseytrain.webp">
|
||||
<img class="train2" src="/assets/images/emojis/marseytrain.webp">
|
||||
{% endif %}
|
||||
|
||||
{% if p.award_count("train") > 2 %}
|
||||
<img class="train" style="top:60%" src="/assets/images/emojis/marseytrain.webp">
|
||||
<img class="train3" src="/assets/images/emojis/marseytrain.webp">
|
||||
{% endif %}
|
||||
|
||||
{% if p.award_count("train") > 3 %}
|
||||
<img class="train trainrev mirrored" style="top:85%" src="/assets/images/emojis/marseytrain.webp">
|
||||
<img class="train4" src="/assets/images/emojis/marseytrain.webp">
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue