pinafore/src/routes/_components/status/StatusMentions.html
Nolan Lawson 547ee14f88
refactor: use ids instead of attrs for delegate/shortcut/focus (#1035)
* refactor: use ids instead of attrs for delegate/shortcut/focus

fixes #1034

* console log on error

* fix test
2019-02-23 12:32:00 -08:00

44 lines
953 B
HTML

{#if mentions.length}
<div class="status-mentions {isStatusInOwnThread ? 'status-in-own-thread' : ''}">
<p>
{#each mentions as mention, i}
{#if i > 0}
<!-- empty space -->
&nbsp;
<!-- empty space -->
{/if}
<a id="status-mention-link-{uuid}-{mention.id}"
href="/accounts/{mention.id}"
rel="prefetch"
title="@{mention.acct}"
>
@{mention.username}
</a>
{/each}
</p>
</div>
{/if}
<style>
.status-mentions {
grid-area: mentions;
margin: 10px 0 10px 5px;
font-size: 0.9em;
}
.status-mentions.status-in-own-thread {
font-size: 1.3em;
margin: 20px 10px 20px 5px;
}
:global(.underline-links .status-mentions a) {
text-decoration: underline;
}
</style>
<script>
export default {
computed: {
mentions: ({ originalStatus }) => originalStatus.mentions || []
}
}
</script>