mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-26 06:14:38 +01:00
48 lines
1.6 KiB
HTML
48 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Welcome</title>
|
|
<meta name="saveas" content="index.html"></meta>
|
|
<meta name="url" content=""> </meta>
|
|
<meta name="date" content="2019-08-29 09:00"></meta>
|
|
</head>
|
|
<body>
|
|
<script src="{static}/scripts/data.js" type="text/javascript"></script>
|
|
<script src="{static}/scripts/getFullDataPath.js" type="text/javascript"></script>
|
|
<script src="https://cdn.rawgit.com/larsgw/citation.js/archive/citation.js/citation-0.4.0-9.js" type="text/javascript"></script>
|
|
<script>
|
|
function update_file(filename) {
|
|
file=filename+'.dat'
|
|
lnk_file.setAttribute('href',getFullDataPath(file));
|
|
lnk_file=document.getElementById('lnk_file');
|
|
data.load(file,onApplyData);
|
|
}
|
|
function onApplyData(dat) {
|
|
lnk_doi=document.getElementById('lnk_doi');
|
|
doiurl=dat.doi.url;
|
|
lnk_doi.setAttribute('href',doiurl);
|
|
const Cite = require('citation-js');
|
|
let publi = new Cite(dat.doi.string)
|
|
lnk_doi.innerHTML=publi.format('citation');
|
|
}
|
|
</script>
|
|
<script>
|
|
window.onload=function() {
|
|
var inp = document.getElementById("inp_filename");
|
|
inp.addEventListener("keydown", function (e) {
|
|
if (e.keyCode === 13) { //checks whether the pressed key is "Enter"
|
|
update_file(inp.value);
|
|
}
|
|
}
|
|
);
|
|
}
|
|
</script>
|
|
|
|
<label>Write a data file name without extension<br/>
|
|
<input type="text" id='inp_filename'></input>
|
|
</label><br/>
|
|
<a target="_blank" id='lnk_doi'>Go to paper</a>
|
|
<a target="_blank" id='lnk_file'>Go to file</a>
|
|
</body>
|
|
</html>
|