Skip to content

Commit

Permalink
add copy button for bibtext
Browse files Browse the repository at this point in the history
  • Loading branch information
HilaManor committed Jan 19, 2024
1 parent 3487d99 commit a9bb21f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 64 deletions.
7 changes: 6 additions & 1 deletion docs/functionality.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,9 @@ function change_ev(folder_name, newEV) {
}

window.addEventListener('load', () => {
});
});

function copyBib() {
let copyText = $("#citation")[0];
navigator.clipboard.writeText(copyText.getInnerHTML());
}
29 changes: 9 additions & 20 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -428,26 +428,15 @@ <h1 style="margin-top: 10px;">Abstract</h1>
<p class="section" id="bibtex"><b>Bibtex</b></p>
<table border="0">
<tbody>
<pre class="command-copy"
style=" display: block;
background: #eee;
white-space: pre;
-webkit-overflow-scrolling: touch;
max-width: 100%;
min-width: 100px;
border-radius: 20px;
padding: 0;;">

@inproceedings{
manor2024posterior,
title={On the Posterior Distribution in Denoising: Application to Uncertainty Quantification},
author={Hila Manor and Tomer Michaeli},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=adSGeugiuj}
}

</pre>
<pre class="command-copy"><div class="container"><div class="row"><div class="col" id="citation">@inproceedings{
manor2024posterior,
title={On the Posterior Distribution in Denoising: Application to Uncertainty Quantification},
author={Hila Manor and Tomer Michaeli},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=adSGeugiuj}
}</div><div class="col text-end"><button type="button" class="btn btn-light" onclick="copyBib()" onmouseover="console.log('hover');"><i class="fa-regular fa-copy"></i></button></div></div></div></pre>

</tbody>
</table>
<!-- end bibtex citation -->
Expand Down
54 changes: 11 additions & 43 deletions docs/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,14 @@ hr {

pre {
position: relative;
}

pre {
display: block;
padding: 20px;
background: #f2f2f2;
color: #555755;
}

span.command-copy {
position: absolute;
top: 10px;
right: 10px;
opacity: .6;
font-size: 20px;
color: #555755;
}

span.command-copy:hover {
cursor: pointer;
}
padding: 1rem 1rem 1rem 5rem;
border-radius: 20px !important;
min-width: 100px;
}


/* buttons */
Expand Down Expand Up @@ -150,31 +137,6 @@ td {
box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg);
}

/* carousel */
.carousel-indicators li {
width: 12px;
height: 12px;
margin: 0 3px;
border-radius: 100%;
background-color: #62daff7c;
}

.carousel-indicators .active {
background-color: #62dbff;
}

.left-arrow, .right-arrow {
color: #62dbff !important;
}

.audio-carousel-indicators{
bottom: -30 !important;
}

.audio-carousel-caption{
top: 100% !important;
}

/* slider */
.custom-range::-webkit-slider-thumb {
background-color: #62dbff !important;
Expand Down Expand Up @@ -268,4 +230,10 @@ td {
align-items: center;
flex-wrap: wrap;
/* min-width: 400px !important; */
}
}

.btn-light:hover {
background: #eee !important;
border-color: #ccc !important;
}

0 comments on commit a9bb21f

Please sign in to comment.