mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2025-01-13 14:29:08 +01:00
deploy: 2b6099dff9f6890e3c6b7f534b85be0ffbfaa107
This commit is contained in:
parent
1bea6f1ee3
commit
a11ed8cc4b
6198
data/database.json
6198
data/database.json
File diff suppressed because one or more lines are too long
@ -28,7 +28,8 @@ class PubliData{
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GetPathForDOI(DOI){
|
static GetPathForDOI(DOI){
|
||||||
return `/data/publis/${DOI.replaceAll(".","/")}`
|
var site_url = window.location.origin;
|
||||||
|
return site_url + `/data/publis/${DOI.replaceAll(".","/")}`
|
||||||
}
|
}
|
||||||
static GetAbstractURLForDOI(DOI){
|
static GetAbstractURLForDOI(DOI){
|
||||||
return `${PubliData.GetPathForDOI(DOI)}/abstract.html`
|
return `${PubliData.GetPathForDOI(DOI)}/abstract.html`
|
||||||
|
@ -232,8 +232,9 @@ class dataFileBase {
|
|||||||
return /^#\s*([A-Za-z_]+)\s*:\s*(.*)$/;
|
return /^#\s*([A-Za-z_]+)\s*:\s*(.*)$/;
|
||||||
}
|
}
|
||||||
async getGeometryAsync(state = null) {
|
async getGeometryAsync(state = null) {
|
||||||
|
var site_url = "/"+window.location.pathname.split('/')[1];
|
||||||
// var text = await getTextFromFileUrlAsync(`/data/structures/${this.set.name.replace("#", "")}/${this.molecule.toLowerCase()}.xyz`)
|
// var text = await getTextFromFileUrlAsync(`/data/structures/${this.set.name.replace("#", "")}/${this.molecule.toLowerCase()}.xyz`)
|
||||||
var text = getTextFromFileUrl(`/data/structures/${this.set.name.replace("#", "")}/${this.molecule.toLowerCase()}.xyz`)
|
var text = getTextFromFileUrl(site_url+`/data/structures/${this.set.name.replace("#", "")}/${this.molecule.toLowerCase()}.xyz`)
|
||||||
var lines = text.split("\n")
|
var lines = text.split("\n")
|
||||||
var indexes = lines.findAllIndexes((line) => {
|
var indexes = lines.findAllIndexes((line) => {
|
||||||
return line.match(/^\d+$/)
|
return line.match(/^\d+$/)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
function getFullDataPath(path) {
|
function getFullDataPath(path) {
|
||||||
return '/data/' + path;
|
var site_url = "/"+window.location.pathname.split('/')[1];
|
||||||
|
return site_url+'/data/' + path;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
var fileCache = function () {
|
var fileCache = function () {
|
||||||
var json_url = "/data/database.json";
|
var site_url = "/"+window.location.pathname.split('/')[1];
|
||||||
|
var json_url = site_url+"/data/database.json";
|
||||||
var req = new XMLHttpRequest();
|
var req = new XMLHttpRequest();
|
||||||
req.open("GET",json_url, false);
|
req.open("GET",json_url, false);
|
||||||
req.send();
|
req.send();
|
||||||
|
@ -5,7 +5,8 @@ class indexDB {
|
|||||||
}
|
}
|
||||||
var db = new indexDB
|
var db = new indexDB
|
||||||
const maxAge= (DebugMode.Enabled,0,600)
|
const maxAge= (DebugMode.Enabled,0,600)
|
||||||
const text = await getTextFromFileUrlAsync("/data/index.yaml",{"Cache-Control":`max-age=${maxAge}`})
|
var site_url = "/"+window.location.pathname.split('/')[1];
|
||||||
|
const text = await getTextFromFileUrlAsync(site_url+"/data/index.yaml",{"Cache-Control":`max-age=${maxAge}`})
|
||||||
const myYaml = jsyaml.load(text);
|
const myYaml = jsyaml.load(text);
|
||||||
db.sets = ((myYaml.sets === null) ? new Map() : new Map(Object.entries(myYaml.sets)));
|
db.sets = ((myYaml.sets === null) ? new Map() : new Map(Object.entries(myYaml.sets)));
|
||||||
db.others = ((myYaml.others === null) ? [] : Array.from(myYaml.others));
|
db.others = ((myYaml.others === null) ? [] : Array.from(myYaml.others));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user