Browse Source

support image

master
欧醚 2 years ago
parent
commit
92b66c4382
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      static/index.html

+ 12
- 1
static/index.html View File

@ -57,7 +57,7 @@
background: white;
padding: 5px;
color: black;
margin: 5px 5px 40px;
margin: 5px 5px 20px;
}
.qbox.qbox-grey {
@ -134,6 +134,11 @@
font-size: 80%;
}
.status-media-image {
max-height: 500px;
max-width: 90%;
margin: 10px auto;
}
</style>
</head>
@ -227,6 +232,12 @@
${status.account.acct === "mask_bot" ?
status.content.replace(/^<p>\[([^\]]*)\]:<br \/>/, '<p>') : status.content}
</div>
${status.media_attachments.map((media) => {
if (media.type === 'image') {
return `<image class="status-media-image" src=${media.url}>`;
}
return '';
}).join('\n')}
<div style="text-align:right;margin: 0px 0 -5px">
<time class="timeago" datetime="${status.created_at}"
title="${status.created_at}"></time>

Loading…
Cancel
Save