Add references section

This commit is contained in:
Mahdi Dibaiee 2021-10-18 09:30:35 +01:00
parent aa97aaf12c
commit 743c82b5a5
5 changed files with 55 additions and 0 deletions

View File

@ -74,3 +74,12 @@ svg {
#Alcohol, #connection-rectangle, #brain, #brain-projection, #human { #Alcohol, #connection-rectangle, #brain, #brain-projection, #human {
opacity: 0; opacity: 0;
} }
.references li {
transition: background-color 1s;
padding: 0.5rem 1rem;
}
.highlight {
background-color: rgb(251, 255, 130);
}

View File

@ -176,6 +176,21 @@
</div class='column'> </div class='column'>
</div> </div>
<div class='row'>
<div class='column'>
<h2>References</h2>
</div>
</div>
<div class='references row'>
<div class='column'>
<ol>
<li id='ref-1'>Alcoholic brain damage. (2013). In Crichton, R., & Ward, R. (2013). Metal-based neurodegeneration: from molecular mechanisms to therapeutic strategies. John Wiley & Sons. <a href="https://doi.org/10.1002/9781118553480.ch12">https://doi.org/10.1002/9781118553480.ch12</a></li>
<li id='ref-2'>Global Burden of Disease Collaborative Network. Global Burden of Disease Study 2019 (GBD 2019) Results. Seattle, United States: Institute for Health Metrics and Evaluation (IHME), 2020. Available from <a href="http://ghdx.healthdata.org/gbd-results-tool">http://ghdx.healthdata.org/gbd-results-tool</a></li>
</ol>
</div>
</div>
</div> </div>
</body> </body>

View File

@ -75,3 +75,19 @@ anime({
delay: 3000, delay: 3000,
easing: 'easeInOutExpo' easing: 'easeInOutExpo'
}); });
var HIGHLIGHT_DURATION = 4000;
// Highlight References
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('[href^="#ref-"]').forEach(function(a) {
a.addEventListener('click', function() {
var target = document.getElementById(a.href.slice(a.href.indexOf('#') + 1));
target.classList.add('highlight');
setTimeout(function() {
target.classList.remove('highlight');
}, HIGHLIGHT_DURATION);
});
});
});

View File

@ -37,6 +37,8 @@
{% include './assessment.nj' %} {% include './assessment.nj' %}
{% include './treatment.nj' %} {% include './treatment.nj' %}
{% include './references.nj' %}
</div> </div>
</body> </body>

13
templates/references.nj Normal file
View File

@ -0,0 +1,13 @@
<div class='row'>
<div class='column'>
<h2>References</h2>
</div>
</div>
<div class='references row'>
<div class='column'>
<ol>
<li id='ref-1'>{{ "Alcoholic brain damage. (2013). In Crichton, R., & Ward, R. (2013). Metal-based neurodegeneration: from molecular mechanisms to therapeutic strategies. John Wiley & Sons. https://doi.org/10.1002/9781118553480.ch12" | urlize | safe }}</li>
<li id='ref-2'>{{ "Global Burden of Disease Collaborative Network. Global Burden of Disease Study 2019 (GBD 2019) Results. Seattle, United States: Institute for Health Metrics and Evaluation (IHME), 2020. Available from http://ghdx.healthdata.org/gbd-results-tool." | urlize | safe }}</li>
</ol>
</div>
</div>