mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 08:41:00 +00:00
Add copy to clipboard action to user's handle (#82)
This commit is contained in:
parent
f5809ea4a1
commit
676dda0cb6
2 changed files with 29 additions and 1 deletions
|
@ -1050,3 +1050,19 @@ table.metadata td.name {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Copy to clipboard action */
|
||||||
|
|
||||||
|
.copy {
|
||||||
|
transition: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copy:hover {
|
||||||
|
color: var(--color-text-main);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copied, .copied:hover {
|
||||||
|
color: var(--color-highlight);
|
||||||
|
transition: 0.2s;
|
||||||
|
}
|
||||||
|
|
|
@ -34,7 +34,19 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ identity.name_or_handle }} <small>@{{ identity.handle }}</small>
|
{{ identity.name_or_handle }}
|
||||||
|
<small>
|
||||||
|
@{{ identity.handle }}
|
||||||
|
<a title="Copy handle"
|
||||||
|
class="copy"
|
||||||
|
_="on click
|
||||||
|
writeText('@{{ identity.handle }}') into the navigator's clipboard
|
||||||
|
then add .copied
|
||||||
|
wait 2s
|
||||||
|
then remove .copied">
|
||||||
|
<i class="fa-solid fa-copy"></i>
|
||||||
|
</a>
|
||||||
|
</small>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
{% if identity.summary %}
|
{% if identity.summary %}
|
||||||
|
|
Loading…
Reference in a new issue