-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathutils.js
More file actions
28 lines (26 loc) · 880 Bytes
/
Copy pathutils.js
File metadata and controls
28 lines (26 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function createProjectElement(id, project){
/* Create an element in Project
tag: some tags
title: title of the project or publications
paper_url: link to the paper
authors: authors
conference: publication venue
image (optional): directory to project image
others (optional): anything else
*/
if (project.tag == null)
project.tag = id;
if (project.others == null)
project.others = "";
html_img = `<img src='${project.image}' style="max-width: 160px"></div></div>`
html_txt = `<p>
<a href="${project.paper_url}"><papertitle>${project.title}</papertitle></a>
<br>
${project.authors}
<br>
<em>${project.conference}</em>
<br>
${project.others}`
document.getElementById(id + "-img").innerHTML = html_img;
document.getElementById(id + "-txt").innerHTML = html_txt;
}