Skip to content

Commit d122d39

Browse files
committed
feat: Use copy icon for bibtex.
1 parent 543e710 commit d122d39

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/lib/bibtex.svelte

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@
5454
</script>
5555

5656
<div class="group relative bg-slate-100 p-2">
57-
<button class="absolute invisible group-hover:visible top-2 right-2 text-xs bg-gray-50 p-1 border rounded-md hover:bg-white active:bg-slate-600 active:text-white" on:click={copyBibtex}>Copy</button>
57+
<button
58+
class="absolute top-0.5 right-0.5 p-1 rounded-md text-gray-400 hover:text-gray-600 active:bg-slate-600 active:text-white"
59+
title="Copy BibTeX citation"
60+
on:click={copyBibtex}
61+
>
62+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 6C2 5.44772 2.44772 5 3 5H10C10.5523 5 11 5.44772 11 6V13C11 13.5523 10.5523 14 10 14H3C2.44772 14 2 13.5523 2 13V6Z M4 2.00004L12 2.00001C13.1046 2 14 2.89544 14 4.00001V12"></path></svg>
63+
</button>
5864
<pre class="font-mono text-xs whitespace-pre-wrap">{bibtex}</pre>
5965
</div>

tailwind.config.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,5 @@ export default {
77
sans: ['Avenir', 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif']
88
}
99
},
10-
variants: {
11-
extend: {
12-
visibility: ['group-hover']
13-
}
14-
},
1510
plugins: []
1611
};

0 commit comments

Comments
 (0)