Skip to content

Commit 558f708

Browse files
improve citing section
1 parent 837d9ae commit 558f708

2 files changed

Lines changed: 135 additions & 20 deletions

File tree

docs/source/_static/style.css

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,4 +421,111 @@ html[data-theme="dark"] .festim-ribbon-track img:hover {
421421
max-width: 100%;
422422
flex: 1 1 100%;
423423
}
424+
}
425+
426+
/* =============================================================
427+
CITING FESTIM
428+
============================================================= */
429+
.festim-cite {
430+
max-width: 700px;
431+
margin: 0 auto 2rem;
432+
text-align: center;
433+
padding: 0 1rem;
434+
}
435+
436+
.festim-cite > p {
437+
color: var(--pst-color-text-muted);
438+
margin-bottom: 1.25rem;
439+
}
440+
441+
/* ---- DOI badge ---- */
442+
.festim-doi-badge {
443+
display: inline-flex;
444+
border-radius: 0.375rem;
445+
overflow: hidden;
446+
font-size: 0.85rem;
447+
font-weight: 600;
448+
text-decoration: none;
449+
margin-bottom: 1.5rem;
450+
border: 1px solid var(--pst-color-border);
451+
transition: box-shadow 0.2s ease;
452+
}
453+
454+
.festim-doi-badge:hover {
455+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
456+
text-decoration: none;
457+
}
458+
459+
.festim-doi-label {
460+
background-color: var(--festim-primary);
461+
color: #fff;
462+
padding: 0.4rem 0.65rem;
463+
}
464+
465+
.festim-doi-value {
466+
padding: 0.4rem 0.75rem;
467+
color: var(--pst-color-text-base);
468+
background-color: var(--pst-color-surface);
469+
}
470+
471+
/* ---- BibTeX dropdown ---- */
472+
.festim-bibtex {
473+
text-align: left;
474+
border: 1px solid var(--pst-color-border);
475+
border-radius: 0.5rem;
476+
overflow: hidden;
477+
transition: border-color 0.2s ease;
478+
}
479+
480+
.festim-bibtex:hover {
481+
border-color: var(--festim-primary);
482+
}
483+
484+
.festim-bibtex summary {
485+
display: flex;
486+
align-items: center;
487+
gap: 0.5rem;
488+
padding: 0.75rem 1rem;
489+
cursor: pointer;
490+
font-weight: 600;
491+
font-size: 0.95rem;
492+
color: var(--pst-color-text-base);
493+
list-style: none;
494+
user-select: none;
495+
}
496+
497+
.festim-bibtex summary::-webkit-details-marker {
498+
display: none;
499+
}
500+
501+
.festim-bibtex summary i:first-child {
502+
color: var(--festim-primary);
503+
}
504+
505+
.festim-bibtex-chevron {
506+
margin-left: auto;
507+
font-size: 0.75rem;
508+
transition: transform 0.2s ease;
509+
color: var(--pst-color-text-muted);
510+
}
511+
512+
.festim-bibtex[open] .festim-bibtex-chevron {
513+
transform: rotate(180deg);
514+
}
515+
516+
.festim-bibtex pre {
517+
margin: 0;
518+
padding: 1rem;
519+
background-color: var(--pst-color-surface);
520+
border-top: 1px solid var(--pst-color-border);
521+
border-radius: 0;
522+
font-size: 0.8rem;
523+
line-height: 1.6;
524+
overflow-x: auto;
525+
}
526+
527+
.festim-bibtex code {
528+
color: var(--pst-color-text-base);
529+
background: none;
530+
padding: 0;
424531
}

docs/source/index.rst

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -236,26 +236,34 @@
236236
============================================================ -->
237237
<h2 class="festim-section-heading">Citing FESTIM</h2>
238238

239-
If you use FESTIM in your research, please cite the following publication:
240-
241-
.. image:: https://img.shields.io/badge/DOI-10.1016%2Fj.ijhydene.2024.03.184-blue
242-
:target: https://doi.org/10.1016/j.ijhydene.2024.03.184
243-
:alt: DOI badge
244-
245-
.. dropdown:: BibTeX
246-
247-
.. code-block:: bibtex
248-
249-
@article{delaporte2024festim,
250-
title = {{FESTIM}: An open-source code for hydrogen transport simulations},
251-
author = {Delaporte-Mathurin, R{\'e}mi and Dark, James and Ferrero, Gabriele
252-
and Hodille, Etienne A. and Kulagin, Vladimir and Meschini, Samuele},
253-
journal = {International Journal of Hydrogen Energy},
254-
volume = {63},
255-
pages = {786--802},
256-
year = {2024},
257-
doi = {10.1016/j.ijhydene.2024.03.184}
258-
}
239+
<div class="festim-cite">
240+
<p>If you use FESTIM in your research, please cite the following publication:</p>
241+
242+
<a href="https://doi.org/10.1016/j.ijhydene.2024.03.184" target="_blank" class="festim-doi-badge">
243+
<span class="festim-doi-label">DOI</span>
244+
<span class="festim-doi-value">10.1016/j.ijhydene.2024.03.184</span>
245+
</a>
246+
247+
<details class="festim-bibtex">
248+
<summary>
249+
<i class="fa-solid fa-code"></i>
250+
BibTeX
251+
<i class="fa-solid fa-chevron-down festim-bibtex-chevron"></i>
252+
</summary>
253+
<pre><code>
254+
@article{delaporte2024festim,
255+
title = {{FESTIM}: An open-source code for hydrogen transport simulations},
256+
author = {Delaporte-Mathurin, R{\'e}mi and Dark, James and Ferrero, Gabriele
257+
and Hodille, Etienne A. and Kulagin, Vladimir and Meschini, Samuele},
258+
journal = {International Journal of Hydrogen Energy},
259+
volume = {63},
260+
pages = {786--802},
261+
year = {2024},
262+
doi = {10.1016/j.ijhydene.2024.03.184}
263+
}
264+
</code></pre>
265+
</details>
266+
</div>
259267

260268

261269
.. raw:: html

0 commit comments

Comments
 (0)