mirror of
https://git.checksum.fail/alec/slon.git
synced 2025-12-08 12:09:55 +02:00
Slon/Static/html: Display images in user statuses
This commit is contained in:
@@ -24,6 +24,9 @@ a {
|
|||||||
color: #800;
|
color: #800;
|
||||||
text-decoration-thickness: 2px;
|
text-decoration-thickness: 2px;
|
||||||
}
|
}
|
||||||
|
.img-media {
|
||||||
|
max-width: 640px;
|
||||||
|
}
|
||||||
.page-container {
|
.page-container {
|
||||||
width: 800px;
|
width: 800px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!doctypehtml>
|
<!doctypehtml>
|
||||||
<title></title>
|
<title></title>
|
||||||
<link href=https://error.checksum.fail/css/12391289038129038.css rel=stylesheet>
|
<link href=https://error.checksum.fail/css/9271390173902173.css rel=stylesheet>
|
||||||
<link href=https://linusg.github.io/serenityos-emoji-font/SerenityOS-Emoji.css rel=stylesheet>
|
<link href=https://linusg.github.io/serenityos-emoji-font/SerenityOS-Emoji.css rel=stylesheet>
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
@@ -26,4 +26,4 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/relativeTime.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/relativeTime.js"></script>
|
||||||
<script>dayjs.extend(window.dayjs_plugin_relativeTime)</script>
|
<script>dayjs.extend(window.dayjs_plugin_relativeTime)</script>
|
||||||
<script src=https://error.checksum.fail/js/header.js></script>
|
<script src=https://error.checksum.fail/js/header.js></script>
|
||||||
<script src=https://error.checksum.fail/js/12389290138092193.js></script>
|
<script src=https://error.checksum.fail/js/29137902173921730271.js></script>
|
||||||
@@ -82,7 +82,13 @@ function updateStatuses(user, statuses) {
|
|||||||
content_html += "<span title=Public>🌎</span> ";
|
content_html += "<span title=Public>🌎</span> ";
|
||||||
}
|
}
|
||||||
content_html += "<span class=status-timestamp>" + smolDate(dayjs(status["created_at"]).fromNow()) + "</span><br></div>";
|
content_html += "<span class=status-timestamp>" + smolDate(dayjs(status["created_at"]).fromNow()) + "</span><br></div>";
|
||||||
content_html += "<div class=status-text>" + status["content"] + "</div>";
|
content_html += "<div class=status-text>" + status["content"];
|
||||||
|
if (!!status["media_attachments"] && status["media_attachments"].length) {
|
||||||
|
for (var x = 0; x < status["media_attachments"].length; x++) {
|
||||||
|
content_html += "<img class=img-media src=\"" + status["media_attachments"][x]["url"] + "\"></div>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
content_html += "</div>";
|
||||||
content_html += "<span class=status-counts>💬 " + status["replies_count"] + " 🔁 " + status["reblogs_count"] + " ⭐ " + status["favourites_count"] + "</span>";
|
content_html += "<span class=status-counts>💬 " + status["replies_count"] + " 🔁 " + status["reblogs_count"] + " ⭐ " + status["favourites_count"] + "</span>";
|
||||||
content_html += "<div class=status-footer>via <a href=" + status["application"]["website"] + ">" + status["application"]["name"] + "</a></div>";
|
content_html += "<div class=status-footer>via <a href=" + status["application"]["website"] + ">" + status["application"]["name"] + "</a></div>";
|
||||||
content.innerHTML = content_html;
|
content.innerHTML = content_html;
|
||||||
@@ -119,7 +125,7 @@ function updateStatuses(user, statuses) {
|
|||||||
}
|
}
|
||||||
pageContent.innerHTML = "";
|
pageContent.innerHTML = "";
|
||||||
pageContent.appendChild(elements);
|
pageContent.appendChild(elements);
|
||||||
updateStatusContainers();
|
window.onload = updateStatusContainers();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getStatuses(user) {
|
function getStatuses(user) {
|
||||||
|
|||||||
Reference in New Issue
Block a user