2024-06-17 21:17:27 +01:00
|
|
|
<script>
|
2024-07-03 22:00:32 +01:00
|
|
|
import { shorthand as short_time } from '$lib/time.js';
|
2025-07-13 18:49:49 +01:00
|
|
|
import Lang from '$lib/lang';
|
2025-07-13 18:35:26 +01:00
|
|
|
|
|
|
|
const lang = Lang('en_GB');
|
2024-06-17 21:17:27 +01:00
|
|
|
|
|
|
|
export let post;
|
|
|
|
|
2024-07-03 22:00:32 +01:00
|
|
|
const time_string = post.created_at.toLocaleString();
|
2024-06-17 21:17:27 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="post-context">
|
|
|
|
<span class="post-context-icon">🔁</span>
|
|
|
|
<span class="post-context-action">
|
2025-07-13 18:35:26 +01:00
|
|
|
{ @html
|
2025-07-13 20:44:54 +01:00
|
|
|
lang.string('post.boosted',
|
2025-07-13 18:35:26 +01:00
|
|
|
`<a href={${post.account.url}} target="_blank"><span class="name">${post.account.rich_name}</span></a>`)
|
|
|
|
}
|
2024-06-17 21:17:27 +01:00
|
|
|
</span>
|
|
|
|
<span class="post-context-time">
|
|
|
|
<time title="{time_string}">{short_time(post.created_at)}</time>
|
2024-06-21 07:36:45 +01:00
|
|
|
{#if post.visibility !== "public"}
|
2024-06-29 14:48:34 +01:00
|
|
|
<span class="post-visibility">- {post.visibility}</span>
|
2024-06-21 07:36:45 +01:00
|
|
|
{/if}
|
2024-06-17 21:17:27 +01:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.post-context {
|
2024-06-29 14:48:34 +01:00
|
|
|
padding: 12px 16px 0 74px;
|
2024-06-17 21:17:27 +01:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
2024-06-29 14:48:34 +01:00
|
|
|
font-size: .8em;
|
2024-06-28 06:19:00 +01:00
|
|
|
font-weight: 600;
|
|
|
|
color: var(--text);
|
2024-06-17 21:17:27 +01:00
|
|
|
opacity: .8;
|
2024-06-29 14:48:34 +01:00
|
|
|
transition: opacity .1s, background-color .1s;
|
|
|
|
border-radius: 8px;
|
|
|
|
z-index: 1;
|
2024-06-17 21:17:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.post-context-icon {
|
|
|
|
margin-right: 4px;
|
|
|
|
}
|
|
|
|
|
2025-07-13 18:35:26 +01:00
|
|
|
:global(.post-context a),
|
|
|
|
:global(.post-context a:visited) {
|
2024-06-17 21:17:27 +01:00
|
|
|
color: inherit;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
.post-context a:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
|
2024-07-01 03:46:26 +01:00
|
|
|
.post-context .name :global(.emoji) {
|
|
|
|
position: relative;
|
|
|
|
top: .2em;
|
|
|
|
height: 1.2em;
|
|
|
|
}
|
|
|
|
|
2024-06-17 21:17:27 +01:00
|
|
|
.post-context-time {
|
|
|
|
margin-left: auto;
|
|
|
|
}
|
2024-06-29 14:48:34 +01:00
|
|
|
|
|
|
|
.post-visibility {
|
|
|
|
opacity: .7;
|
|
|
|
}
|
2024-06-17 21:17:27 +01:00
|
|
|
</style>
|