Skip to content

Commit f3db95d

Browse files
authored
Merge pull request #53 from bkhelifi/refactor_fixes
Refactor fix
2 parents 7e2c082 + e2a0f17 commit f3db95d

File tree

4 files changed

+46
-45
lines changed

4 files changed

+46
-45
lines changed

acknowledging.html

+41-40
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,19 @@
2626
<div id="navbar-placeholder"></div>
2727

2828
<script>
29-
function copyToClipboard(element) {
30-
var $temp = $("<textarea>");
31-
$("body").append($temp);
32-
var x = $(element).text().trim().replace(/<br>/g, '\n').replace(/<\/?[^>]+>/g, '');
33-
$temp.val(x).select();
34-
document.execCommand("copy");
35-
$temp.remove();
36-
}
29+
function copyToClipboard(elementId) {
30+
// Selection of the input element l'élément input
31+
let text = document.getElementById(elementId).innerText;
32+
33+
// Copy le text in clipboard
34+
navigator.clipboard.writeText(text)
35+
.then(() => {
36+
let message = document.getElementById("confirmationMessage");
37+
message.style.display = "block"; // Print message
38+
setTimeout(() => message.style.display = "none", 2000); // Caching after 2 sec
39+
})
40+
.catch(err => console.error("Copy error :", err));
41+
}
3742
</script>
3843

3944
<p id="bibtex-proc" style="display:none;">
@@ -65,27 +70,27 @@
6570
</p>
6671

6772
<p id="bibtex-paper" style="display:none;">
68-
@article{gammapy:2023,
69-
author = {{Donath}, Axel and {Terrier}, R\'egis and {Remy}, Quentin and {Sinha}, Atreyee and {Nigro}, Cosimo and
70-
{Pintore}, Fabio and {Kh\'elifi}, Bruno and {Olivera-Nieto}, Laura and {Ruiz}, Jose Enrique and
71-
{Br\"ugge}, Kai and {Linhoff}, Maximilian and {Contreras}, Jose Luis and {Acero}, Fabio and
72-
{Aguasca-Cabot}, Arnau and {Berge}, David and {Bhattacharjee}, Pooja and {Buchner}, Johannes and
73-
{Boisson}, Catherine and {Carreto Fidalgo}, David and {Chen}, Andrew and {de Bony de Lavergne}, Mathieu and
74-
{de Miranda Cardoso}, Jos\'e Vinicius and {Deil}, Christoph and {F\"u\ss{}ling}, Matthias and
75-
{Funk}, Stefan and {Giunti}, Luca and {Hinton}, Jim and {Jouvin}, L\'ea and {King}, Johannes and
76-
{Lefaucheur}, Julien and {Lemoine-Goumard}, Marianne and {Lenain}, Jean-Philippe and {L\'opez-Coto}, Rub\'en
77-
and {Mohrmann}, Lars and {Morcuende}, Daniel and {Panny}, Sebastian and {Regeard}, Maxime and {Saha}, Lab
78-
and {Siejkowski}, Hubert and {Siemiginowska}, Aneta and {Sip"ocz}, Brigitta M. and {Unbehaun}, Tim
79-
and {van Eldik}, Christopher and {Vuillaume}, Thomas and {Zanin}, Roberta},
80-
title = {Gammapy: A Python package for gamma-ray astronomy},
81-
DOI= "10.1051/0004-6361/202346488",
82-
url= "https://doi.org/10.1051/0004-6361/202346488",
83-
journal = {A&A},
84-
year = 2023,
85-
volume = 678,
86-
pages = "A157",
87-
}
88-
</p>
73+
@article{gammapy:2023,
74+
author = {{Donath}, Axel and {Terrier}, R\'egis and {Remy}, Quentin and {Sinha}, Atreyee and {Nigro}, Cosimo and
75+
{Pintore}, Fabio and {Kh\'elifi}, Bruno and {Olivera-Nieto}, Laura and {Ruiz}, Jose Enrique and
76+
{Br\"ugge}, Kai and {Linhoff}, Maximilian and {Contreras}, Jose Luis and {Acero}, Fabio and
77+
{Aguasca-Cabot}, Arnau and {Berge}, David and {Bhattacharjee}, Pooja and {Buchner}, Johannes and
78+
{Boisson}, Catherine and {Carreto Fidalgo}, David and {Chen}, Andrew and {de Bony de Lavergne}, Mathieu and
79+
{de Miranda Cardoso}, Jos\'e Vinicius and {Deil}, Christoph and {F\"u\ss{}ling}, Matthias and
80+
{Funk}, Stefan and {Giunti}, Luca and {Hinton}, Jim and {Jouvin}, L\'ea and {King}, Johannes and
81+
{Lefaucheur}, Julien and {Lemoine-Goumard}, Marianne and {Lenain}, Jean-Philippe and {L\'opez-Coto}, Rub\'en
82+
and {Mohrmann}, Lars and {Morcuende}, Daniel and {Panny}, Sebastian and {Regeard}, Maxime and {Saha}, Lab
83+
and {Siejkowski}, Hubert and {Siemiginowska}, Aneta and {Sip"ocz}, Brigitta M. and {Unbehaun}, Tim
84+
and {van Eldik}, Christopher and {Vuillaume}, Thomas and {Zanin}, Roberta},
85+
title = {Gammapy: A Python package for gamma-ray astronomy},
86+
DOI= "10.1051/0004-6361/202346488",
87+
url= "https://doi.org/10.1051/0004-6361/202346488",
88+
journal = {A&A},
89+
year = 2023,
90+
volume = 678,
91+
pages = "A157",
92+
}
93+
</p>
8994

9095
<p id="bibtex-zenodo-11" style="display:none;">
9196
@software{gammapy:zenodo-1.1,
@@ -202,7 +207,7 @@
202207
}
203208
</p>
204209

205-
<main role="main">
210+
<main>
206211
<div class="container">
207212

208213
<h1>Acknowledging or Citing gammapy</h1>
@@ -214,23 +219,19 @@ <h1>Acknowledging or Citing gammapy</h1>
214219

215220
<br><br>
216221
<h2 id="publication"><a href="#pub">In publications</a></h2>
217-
<p class="lead">
222+
<p>
218223
If you use Gammapy for work or research presented in a publication (whether directly, or as a dependency to
219224
another package), we ask you to add two citations to Gammapy:
220225
</p>
221226
<ul>
222227
<li><a href="https://www.aanda.org/component/article?access=doi&doi=10.1051/0004-6361/202346488">Gammapy paper in A&amp;A</a>
223228
(as a general citation) &nbsp; &nbsp;
224-
<button class="button-fancy"
225-
onclick="copyToClipboard('#bibtex-paper'); alert('A&amp;A BibTeX copied!');">
226-
<small>Copy BibTeX to clipboard</small>
227-
</button>
229+
<button class="button-fancy" onclick="copyToClipboard('bibtex-paper'); alert('A&amp;A BibTeX copied!');">
230+
<small>Copy BibTeX to clipboard</small></button>
228231
</li>
229-
<!-- <li><a href="https://arxiv.org/abs/1709.01751">Gammapy paper</a>
230-
(<a href="https://ui.adsabs.harvard.edu/abs/2017ICRC...35..766D/abstract">ADS</a>) (as a general citation)</li> -->
231232
<li><a href="https://doi.org/10.5281/zenodo.4701488">Gammapy on Zenodo</a> (with the specific version used) &nbsp; &nbsp; &nbsp;
232233
- &nbsp; &nbsp;e.g. for the v1.3: &nbsp; <button class="button-fancy"
233-
onclick="copyToClipboard('#bibtex-zenodo-13'); alert('Zenodo v1.3 BibTeX copied!');">
234+
onclick="copyToClipboard('bibtex-zenodo-13'); alert('Zenodo v1.3 BibTeX copied!');">
234235
<small>Copy BibTeX to clipboard</small>
235236
</button>
236237
</li>
@@ -250,7 +251,7 @@ <h2 id="publication"><a href="#pub">In publications</a></h2>
250251
<br>
251252
<hr>
252253
<h2 id="presentation"><a href="#pres">In presentations</a></h2>
253-
<p class="lead">
254+
<p>
254255
If you are giving a presentation or talk featuring work/research that makes use of Gammapy, we suggest
255256
using this logo on your title slide:
256257
</p>
@@ -260,7 +261,7 @@ <h2 id="presentation"><a href="#pres">In presentations</a></h2>
260261
<br><br><br>
261262
<hr>
262263
<h2 id="projects"><a href="#projects">In projects</a></h2>
263-
<p class="lead">
264+
<p>
264265
If you are using Gammapy as part of a code project (e.g., affiliated packages), a useful way to acknowledge
265266
your use of Gammapy is with a badge in your README. We suggest this badge:
266267
</p>

footer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<!-- Right part -->
1414
<span class="alignRight"><a href="DataPrivacy.html">Data Privacy</a>.</span>
15-
1615
</div>
1716
<br>
17+
<br>
1818
</footer>

navbar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<li class="nav-item"><a class="nav-link" href="contact.html">Contact</a></li>
3434
<li class="nav-item"><a class="nav-link" href="team.html">Team</a></li>
3535
<li class="nav-item"><a class="nav-link" href="contribute.html">Contribute</a></li>
36-
<li class="nav-item"><a class="nav-link" href="https://docs.gammapy.org/">Documentation</a></li>
36+
<li class="nav-item"><a class="nav-link" href="https://docs.gammapy.org/" target="_blank">Documentation</a></li>
3737
<li class="nav-item"><a class="nav-link" href="CoC.html">Code of Conduct</a></li>
3838
<li class="nav-item"><a class="nav-link" href="acknowledging.html">Acknowledging</a></li>
3939
</ul>

style.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ body {
4747
}
4848

4949
main {
50-
padding-top: 7rem;
50+
padding-top: 2rem;
5151
margin-bottom: 0;
5252
}
5353

@@ -62,7 +62,7 @@ footer {
6262

6363
.opener {
6464
/*padding-top: 7rem;*/
65-
padding-bottom: 3rem;
65+
padding-bottom: 1rem;
6666
}
6767

6868
#gp-banner {
@@ -104,7 +104,7 @@ footer {
104104
padding: 0px;
105105
text-align: center;
106106
text-decoration: none;
107-
font-size: 1em;
107+
font-size: 1rem;
108108
display: inline-block;
109109
border-radius: 5px;
110110
box-shadow: 3px 3px 8px 0 #000; /* h-offset v-offset blur spread color */

0 commit comments

Comments
 (0)