Skip to content

Commit 530a114

Browse files
committed
Added json source link to dimensions
1 parent 15c1b59 commit 530a114

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

website/dimensions.html

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,26 @@ <h2>Research Software Quality Dimensions</h2>
212212
row.id = rowId;
213213

214214
const nameCell = document.createElement("td");
215-
if (data.identifier && data.identifier.startsWith("http")) {
216-
const link = document.createElement("a");
217-
link.href = data.identifier;
218-
link.textContent = data.name || "";
219-
link.target = "_blank";
220-
link.style.color = "#1E90FF";
221-
nameCell.appendChild(link);
215+
if (data.name && rowId !== "no_id") {
216+
const nameLink = document.createElement("a");
217+
nameLink.href = data.identifier['@id'];
218+
nameLink.textContent = data.name;
219+
nameLink.style.color = "#1E90FF";
220+
nameLink.style.marginRight = "8px";
221+
nameCell.appendChild(nameLink);
222+
223+
const iconLink = document.createElement("a");
224+
iconLink.href = `https://github.com/EVERSE-ResearchSoftware/indicators/blob/main/dimensions/${data._filename}`;
225+
iconLink.target = "_blank";
226+
227+
const iconImg = document.createElement("img");
228+
iconImg.src = "images/json-ld-logo.png";
229+
iconImg.style.width = "16px";
230+
iconImg.style.height = "16px";
231+
iconImg.style.verticalAlign = "middle";
232+
233+
iconLink.appendChild(iconImg);
234+
nameCell.appendChild(iconLink);
222235
} else {
223236
nameCell.textContent = data.name || "";
224237
}

0 commit comments

Comments
 (0)