mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-08-25 05:31:51 +02:00
Proposition of a new references page (#5)
* Fix broken link * Fix bug in indexDB * Proposition of a new references page Co-authored-by: Mickaël Véril <mveril@irsamc.ups-tlse.fr>
This commit is contained in:
parent
c0cc26d1f5
commit
563726c954
@ -25,24 +25,38 @@ draft: false
|
||||
const setsSec = $('#publis_sets')
|
||||
var myDB = await indexDB.loadAsync()
|
||||
const sets = myDB.sets
|
||||
for (const [setName,publis] of sets) {
|
||||
const uopublis = await PubliData.loadManyAsync(publis)
|
||||
if (uopublis.length !== 0) {
|
||||
var odois=[]
|
||||
for (const [setName,dois] of sets) {
|
||||
if (dois.length !== 0) {
|
||||
odois = odois.concat(dois.slice(1))
|
||||
const mySetSec = $('<section>').addClass('publiSet').attr("data-setName", setName).attr("id",setName).appendTo(setsSec)
|
||||
$("<h1>").text(setName).appendTo(mySetSec)
|
||||
const spublis = uopublis.sort((puba, pubb) => pubUtils.getIssuedDate(puba) - pubUtils.getIssuedDate(pubb))
|
||||
for (const publi of spublis) {
|
||||
const doi = dois[0]
|
||||
if (doi!==null) {
|
||||
publi = await PubliData.loadAsync(doi)
|
||||
const art = await createPubliUI(publi, true, true)
|
||||
$(art).appendTo(mySetSec)
|
||||
}
|
||||
}
|
||||
}
|
||||
const odois = myDB.others
|
||||
odois = odois.concat(myDB.others)
|
||||
var sodois = new Set(odois)
|
||||
if (sodois.has(null)) {
|
||||
sodois.delete(null)
|
||||
}
|
||||
odois=Array.from(sodois)
|
||||
const uoopublis = await PubliData.loadManyAsync(odois)
|
||||
const opublis = uoopublis.sort((puba, pubb) => pubUtils.getIssuedDate(puba) - pubUtils.getIssuedDate(pubb))
|
||||
for (const publi of opublis) {
|
||||
const art = await createPubliUI(publi, true, false)
|
||||
$(art).appendTo("#publis_other")
|
||||
}
|
||||
const rdois = myDB.reviews
|
||||
const uorpublis = await PubliData.loadManyAsync(rdois)
|
||||
const rpublis = uorpublis.sort((puba, pubb) => pubUtils.getIssuedDate(puba) - pubUtils.getIssuedDate(pubb))
|
||||
for (const publi of rpublis) {
|
||||
art = await createPubliUI(publi, true, true)
|
||||
$(art).appendTo("#publis_others")
|
||||
$(art).appendTo("#publis_review")
|
||||
}
|
||||
processingIndicator.isActive = false
|
||||
const hash=window.location.hash
|
||||
@ -63,7 +77,12 @@ draft: false
|
||||
<h1>The QUEST subsets</h2>
|
||||
</header>
|
||||
</section>
|
||||
<section class="publis" id="publis_others">
|
||||
<section class="publis-list" id="publis_other">
|
||||
<header>
|
||||
<h1>Other publications using QUEST</h2>
|
||||
</header>
|
||||
</section>
|
||||
<section class="publis" id="publis_review">
|
||||
<header>
|
||||
<h1>Review articles about QUEST</h2>
|
||||
</header>
|
||||
|
@ -14,5 +14,5 @@ sets:
|
||||
- null
|
||||
QUEST#5:
|
||||
- null
|
||||
others:
|
||||
reviews:
|
||||
- 10.1021/acs.jpclett.0c00014
|
||||
|
@ -10,6 +10,7 @@ class indexDB {
|
||||
const myYaml = jsyaml.load(text);
|
||||
db.sets = ((myYaml.sets === undefined) ? new Map() : new Map(Object.entries(myYaml.sets)));
|
||||
db.others = ((myYaml.others === undefined) ? [] : Array.from(myYaml.others));
|
||||
db.reviews = ((myYaml.reviews === undefined) ? [] : Array.from(myYaml.reviews));
|
||||
window.indexDB=db
|
||||
return db
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user