diff options
Diffstat (limited to 'static')
-rw-r--r-- | static/commits.js | 21 | ||||
-rw-r--r-- | static/img/repology-tui-1.png | bin | 0 -> 767141 bytes | |||
-rw-r--r-- | static/img/repology-tui-2.png | bin | 0 -> 806692 bytes |
3 files changed, 21 insertions, 0 deletions
diff --git a/static/commits.js b/static/commits.js new file mode 100644 index 0000000..6a919ca --- /dev/null +++ b/static/commits.js @@ -0,0 +1,21 @@ +function createListItem(commit) { + const li = document.createElement('li'); + const a = document.createElement('a'); + a.setAttribute('href', `https://git.carbslinux.org/repository/commit/?id=${commit.id}`); + a.textContent = `${commit.log}` + li.appendChild(a); + return li; +} + +fetch('https://git.carbslinux.org/exports/repository.json') + .then(response => response.json()) + .then(data => { + const commits = data["latest-commits"]; + const list = document.createElement('ul'); + for (let i = 0; i < commits.length; i++) { + const commit = commits[i]; + const item = createListItem(commit); + list.appendChild(item); + } + document.getElementById("commits").appendChild(list); + }); diff --git a/static/img/repology-tui-1.png b/static/img/repology-tui-1.png Binary files differnew file mode 100644 index 0000000..c29b1f0 --- /dev/null +++ b/static/img/repology-tui-1.png diff --git a/static/img/repology-tui-2.png b/static/img/repology-tui-2.png Binary files differnew file mode 100644 index 0000000..aa31bb2 --- /dev/null +++ b/static/img/repology-tui-2.png |