Skip to content

Commit a4600b5

Browse files
committed
add copy button
1 parent fa92013 commit a4600b5

File tree

1 file changed

+37
-5
lines changed

1 file changed

+37
-5
lines changed

index.html

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,44 @@ <h2 class="title is-4">D-DITR Quantiative Results</h2>
309309
<section class="section" id="BibTeX">
310310
<div class="container is-max-desktop content">
311311
<h2 class="title">BibTeX</h2>
312-
<pre><code>@article{abouzeid2025ditr,
313-
title = {DINO in the Room: Leveraging 2D Foundation Models for 3D Segmentation},
314-
author = {Abou Zeid, Karim and Yilmaz, Kadir and de Geus, Daan and Hermans, Alexander and Adrian, David and Linder, Timm and Leibe, Bastian},
315-
journal = {arXiv preprint arXiv:????},
316-
year = {2025}
312+
<div style="position: relative;"></div>
313+
<pre><code id="bibtex">@article{abouzeid2025ditr,
314+
title = {DINO in the Room: Leveraging 2D Foundation Models for 3D Segmentation},
315+
author = {Abou Zeid, Karim and Yilmaz, Kadir and de Geus, Daan and Hermans, Alexander and Adrian, David and Linder, Timm and Leibe, Bastian},
316+
journal = {arXiv preprint arXiv:????},
317+
year = {2025}
317318
}</code></pre>
319+
<button
320+
onclick="copyToClipboard()"
321+
style="
322+
position: absolute;
323+
top: 10px;
324+
right: 10px;
325+
background-color: #f3f4f6;
326+
border: 1px solid #d1d5db;
327+
border-radius: 5px;
328+
padding: 5px 10px;
329+
cursor: pointer;
330+
"
331+
>
332+
<span style="display: flex; align-items: center; gap: 5px;">
333+
<i class="far fa-copy has-text-grey" id="bibtex-copy-icon"></i> Copy
334+
</span>
335+
</button>
336+
</div>
337+
<script>
338+
function copyToClipboard() {
339+
const codeBlock = document.getElementById("bibtex").innerText;
340+
navigator.clipboard.writeText(codeBlock).then(
341+
() => {
342+
const icon = document.getElementById("bibtex-copy-icon");
343+
icon.classList.remove("far", "fa-copy", "has-text-grey");
344+
icon.classList.add("fas", "fa-check", "has-text-success");
345+
},
346+
(err) => alert("Failed to copy: " + err)
347+
);
348+
}
349+
</script>
318350
</div>
319351
</section>
320352

0 commit comments

Comments
 (0)