Add copy to clipboard action to user's handle (#82)

pull/68/head^2
Humberto Rocha 2022-11-30 17:12:00 -05:00 zatwierdzone przez GitHub
rodzic f5809ea4a1
commit 676dda0cb6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 29 dodań i 1 usunięć

Wyświetl plik

@ -1050,3 +1050,19 @@ table.metadata td.name {
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;
}

Wyświetl plik

@ -34,7 +34,19 @@
{% 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>
{% if identity.summary %}