10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-04 13:13:55 +01:00

Add Papers page

This commit is contained in:
Mickaël Véril 2019-09-30 13:29:44 +02:00
parent fe9114355e
commit cf1452fc12
2 changed files with 41 additions and 4 deletions

View File

@ -37,10 +37,10 @@ theme = "beautifulhugo"
url = "multipledataset" url = "multipledataset"
weight = 3 weight = 3
#[[menu.main]] [[menu.main]]
# name = "Papers" name = "Papers"
# url = "papers" url = "papers"
# weight = 4 weight = 4
[[menu.main]] [[menu.main]]
name = "About" name = "About"

37
content/papers.html Normal file
View File

@ -0,0 +1,37 @@
---
title: "Papers"
date: 2019-09-30 11:30
draft: false
---
<script src="/scripts/data.js" type="text/javascript"></script>
<script src="/scripts/loadAllData.js" type="text/javascript"></script>
<script src="/scripts/getFullDataPath.js" type="text/javascript"></script>
<script src="/scripts/getTextFromFile.js" type="text/javascript"></script>
<script src="/scripts/trueTypeOf.js" type="text/javascript"></script>
<script src="/scripts/uniq.js"></script>
<script src="/scripts/websiteFile.js"></script>
<script src="https://cdn.rawgit.com/larsgw/citation.js/archive/citation.js/citation-0.4.0-9.js" type="text/javascript"></script>
{{< getDataFilesName >}}
<script>
window.onload = async function () {
var div=document.getElementById("papers_div")
var Cite = require("citation-js")
var dois =uniq(Object.values(await loadAllData()).flat().map(d => d.DOI))
for (doi of dois) {
var publi = await Cite.async(doi.string)
var output = publi.format('bibliography', {
format: 'html',
template: 'apa',
lang: 'en-US'
})
lnk = document.createElement("a")
lnk.innerHTML = output
lnk.target = '_blank'
lnk.href = doi.url
div.appendChild(lnk)
}
}
</script>
<div id="papers_div">
</div>