forked from rDrama/rDrama
test
parent
967be3deea
commit
c573808ab5
|
@ -53,8 +53,6 @@ class Comment(Base):
|
||||||
parent_comment = relationship("Comment", remote_side=[id], viewonly=True)
|
parent_comment = relationship("Comment", remote_side=[id], viewonly=True)
|
||||||
child_comments = relationship("Comment", remote_side=[parent_comment_id], viewonly=True)
|
child_comments = relationship("Comment", remote_side=[parent_comment_id], viewonly=True)
|
||||||
awards = relationship("AwardRelationship", viewonly=True)
|
awards = relationship("AwardRelationship", viewonly=True)
|
||||||
|
|
||||||
awards = None
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
||||||
|
|
|
@ -221,7 +221,8 @@ def sanitize(sanitized, noimages=False):
|
||||||
|
|
||||||
for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]:
|
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(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(' (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)
|
sanitized = re.sub('<p>(https:\/\/[^ <>]*)', r'<p><a target="_blank" rel="nofollow noopener noreferrer" href="\1">\1</a></p>', sanitized)
|
||||||
|
|
||||||
|
|
|
@ -503,7 +503,9 @@ def submit_post(v):
|
||||||
|
|
||||||
for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]:
|
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(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")
|
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/")
|
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) {
|
@media (max-width: 768px) {
|
||||||
.train {
|
.train1 {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
width: 35px;
|
width: 35px;
|
||||||
animation: train 3s linear infinite !important;
|
animation: train 3s linear infinite !important;
|
||||||
}
|
}
|
||||||
.trainrev {
|
.train2 {
|
||||||
animation: trainrev 3s linear infinite !important;
|
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>
|
</style>
|
||||||
|
|
||||||
<img class="train" style="top:10%" src="/assets/images/emojis/marseytrain.webp">
|
<img class="train1" src="/assets/images/emojis/marseytrain.webp">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.award_count("train") > 1 %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.award_count("train") > 2 %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
{% if p.award_count("train") > 3 %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue