fix: videos in posts

This commit is contained in:
trisua 2025-04-26 22:34:58 -04:00
parent 9bee739a45
commit 67492cf73f
3 changed files with 14 additions and 0 deletions

View file

@ -148,6 +148,11 @@ article {
}
}
video {
max-width: 100%;
border-radius: var(--radius);
}
/* typo */
p {
margin-bottom: 1rem;

View file

@ -35,6 +35,10 @@ config.connections.spotify_client_id %}
document.getElementById("status").innerHTML =
`<b>${message}.</b> You can now close this tab.`;
setTimeout(() => {
window.location.href = "/settings#/connections";
}, 500);
}, 150);
</script>
{% elif connection_type == "LastFm" and user and user.connections.LastFm and
@ -60,6 +64,10 @@ config.connections.last_fm_key %}
document.getElementById("status").innerHTML =
`<b>${message}.</b> You can now close this tab.`;
setTimeout(() => {
window.location.href = "/settings#/connections";
}, 500);
}, 1000);
</script>
{% endif %} {% endblock %}

View file

@ -40,6 +40,7 @@ pub fn render_markdown(input: &str) -> String {
.clean(&html)
.to_string()
.replace("src=\"", "loading=\"lazy\" src=\"/api/v1/util/proxy?url=")
.replace("<video loading=", "<video controls loading=")
.replace("--&gt;", "<align class=\"right\">")
.replace("-&gt;", "<align class=\"center\">")
.replace("&lt;-", "</align>")