Skip to content

Commit

Permalink
Merge pull request #39 from IQSS/7-add-year-to-table
Browse files Browse the repository at this point in the history
add launch year to table #7
  • Loading branch information
shlake authored Dec 9, 2019
2 parents 632139d + 162f703 commit c93a06e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
13 changes: 12 additions & 1 deletion css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ th.installation-country-header {
width: 10%;
}

th.installation-year-header {
width: 10%;
}

th.installation-description-header {
width: 70%;
width: 60%;
}

.installation-name-suggest-add {
Expand All @@ -36,6 +40,10 @@ th.installation-description-header {
font-style: italic;
}

.installation-year-suggest-add {
font-style: italic;
}

.installation-description-suggest-add {
font-style: italic;
}
Expand All @@ -46,5 +54,8 @@ th.installation-description-header {
.installation-country-row {
}

.installation-year-row {
}

.installation-description-row {
}
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@
<tr>
<th class="installation-name-header">Name</th>
<th class="installation-country-header">Country</th>
<th class="installation-year-header">Year</th>
<th class="installation-description-header">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="installation-name-suggest-add">[Your installation! 🎉🎉🎉]</td>
<td class="installation-country-suggest-add">[Country]</td>
<td class="installation-year-suggest-add">[Launched]</td>
<td class="installation-description-suggest-add">
[A description of your installation of Dataverse.] To add your installation to the map,
please follow the
Expand All @@ -48,6 +50,7 @@
<tr>
<td class="installation-name-row"></td>
<td class="installation-country-row"></td>
<td class="installation-year-row"></td>
<td class="installation-description-row"></td>
</tr>
</template>
Expand Down
4 changes: 3 additions & 1 deletion js/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if ('content' in document.createElement('template')) {
name = installations[i].name;
hostname = installations[i].hostname;
country = installations[i].country;
year = installations[i].launch_year;
description = installations[i].description;
// Clone the new row and insert it into the table
var clone = document.importNode(template.content, true);
Expand All @@ -24,7 +25,8 @@ if ('content' in document.createElement('template')) {
name +
'</a>';
td[1].textContent = country;
td[2].textContent = description;
td[2].textContent = year;
td[3].textContent = description;
tbody.appendChild(clone);
}
});
Expand Down

0 comments on commit c93a06e

Please sign in to comment.