Skip to content

Commit 87a2490

Browse files
authored
Merge pull request #46 from andriumon/development
Updated indicators.html and dimensions.html
2 parents 2f525cc + d38035a commit 87a2490

2 files changed

Lines changed: 23 additions & 32 deletions

File tree

website/dimensions.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
}
2727
th, td {
2828
border: 1px solid #ddd;
29-
padding: 12px 18px; /* Aumento del padding para más espacio */
29+
padding: 12px 18px;
3030
text-align: left;
3131
vertical-align: top;
32-
font-size: 16px;
32+
font-size: 14px;
3333
word-break: break-word;
3434
}
3535
th {
@@ -73,10 +73,9 @@
7373
background-color: #bbb;
7474
}
7575

76-
/* Reducir espaciado vertical pero con un ligero aumento de padding */
7776
#fh5co-about {
78-
padding-top: 20px; /* Aumento del padding */
79-
padding-bottom: 20px; /* Aumento del padding */
77+
padding-top: 20px;
78+
padding-bottom: 20px;
8079
}
8180

8281
#fh5co-about .container {
@@ -240,7 +239,7 @@ <h2>Research Software Quality Dimensions</h2>
240239
if (href) {
241240
const link = document.createElement("a");
242241
link.href = href;
243-
link.textContent = href;
242+
link.textContent = data.source.name || href;
244243
link.target = "_blank";
245244
link.style.color = "#1E90FF";
246245
link.style.display = "block";

website/indicators.html

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727
th, td {
2828
border: 1px solid #ddd;
29-
padding: 12px 18px; /* Aumento del padding para más espacio */
29+
padding: 12px 18px;
3030
text-align: left;
3131
vertical-align: top;
3232
font-size: 14px;
@@ -73,10 +73,9 @@
7373
background-color: #bbb;
7474
}
7575

76-
/* Reducir espaciado vertical pero con un ligero aumento de padding */
7776
#fh5co-about {
78-
padding-top: 20px; /* Aumento del padding */
79-
padding-bottom: 20px; /* Aumento del padding */
77+
padding-top: 20px;
78+
padding-bottom: 20px;
8079
}
8180

8281
#fh5co-about .container {
@@ -143,9 +142,9 @@ <h2>Research Software Quality Indicators</h2>
143142

144143
<table id="json-table">
145144
<colgroup>
146-
<col style="width: 15%;">
147-
<col style="width: 9%;">
148-
<col style="width: 15%;">
145+
<col style="width: 16%;">
146+
<col style="width: 12%;">
147+
<col style="width: 12%;">
149148
<col style="width: 28%;">
150149
<col style="width: 18%;">
151150
</colgroup>
@@ -226,7 +225,9 @@ <h2>Research Software Quality Indicators</h2>
226225
if (data.qualityDimension && data.qualityDimension['@id']) {
227226
const link = document.createElement("a");
228227
link.href = data.qualityDimension['@id'];
229-
link.textContent = data.qualityDimension['@id'];
228+
const parts = data.qualityDimension['@id'].split('/');
229+
const label = parts[parts.length - 1];
230+
link.textContent = label;
230231
link.target = "_blank";
231232
link.style.color = "#1E90FF";
232233
dimensionCell.appendChild(link);
@@ -235,6 +236,7 @@ <h2>Research Software Quality Indicators</h2>
235236
}
236237
row.appendChild(dimensionCell);
237238

239+
238240
const descriptionCell = document.createElement("td");
239241
descriptionCell.textContent = data.description || "";
240242
row.appendChild(descriptionCell);
@@ -244,42 +246,32 @@ <h2>Research Software Quality Indicators</h2>
244246

245247
if (Array.isArray(data.source) && data.source.length > 0) {
246248
data.source.forEach((src, index) => {
247-
let href = null;
248-
249-
if (src.url) {
250-
href = src.url;
251-
} else if (src['@id']) {
252-
href = src['@id'];
253-
} else if (src.identifier) {
254-
href = src.identifier;
255-
}
249+
let href = src.url || src['@id'] || src.identifier;
250+
let label = src.name || href;
256251

257252
if (href) {
258253
const link = document.createElement("a");
259254
link.href = href;
260-
link.textContent = href;
255+
link.textContent = label;
261256
link.target = "_blank";
262257
link.style.color = "#1E90FF";
263258
link.style.display = "block";
264259
link.style.marginBottom = "6px";
265260
sourceCell.appendChild(link);
266261
}
267262

268-
// Añadir separador si no es el último enlace
269263
if (index < data.source.length - 1) {
270264
const separator = document.createElement("hr");
271265
separator.style.borderTop = "1px dashed #ccc";
272266
separator.style.margin = "6px 0";
273267
sourceCell.appendChild(separator);
274268
}
275269
});
276-
} else if (data.identifier && data.identifier['@id']) {
277-
const link = document.createElement("a");
278-
link.href = data.identifier['@id'];
279-
link.textContent = data.identifier['@id'];
280-
link.target = "_blank";
281-
link.style.color = "#1E90FF";
282-
sourceCell.appendChild(link);
270+
} else {
271+
const noSource = document.createElement("span");
272+
noSource.textContent = "no source available";
273+
noSource.style.color = "#999";
274+
sourceCell.appendChild(noSource);
283275
}
284276

285277
row.appendChild(sourceCell);

0 commit comments

Comments
 (0)