diff options
Diffstat (limited to 'www')
| -rw-r--r-- | www/index.html.in | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/www/index.html.in b/www/index.html.in index 08d4041..d9dea48 100644 --- a/www/index.html.in +++ b/www/index.html.in @@ -58,10 +58,39 @@ pre { distribution, for recent upstream versions and for the amd64 and i386 architectures.</p> - <p>You can check the available versions for - the <a href="dists/bookworm/main/binary-amd64/Packages">amd64</a> and - the <a href="dists/bookworm/main/binary-i386/Packages">i386</a> - architectures.</p> + <p>Available versions:</p> + + <table> + <tr> + <td>amd64:</td><td><span id="amd64"></span></td> + </tr> + <tr> + <td>i386:</td><td><span id="i386"></span></td> + </tr> + </table> + + <script> + function get_version(arch) { + return fetch('dists/bookworm/main/binary-' + arch + '/Packages') + .then(response => { + return response.text(); + }) + .then(content => { + const lines = content.split('\n'); + for (const line of lines) { + const fields = line.split(':'); + if (fields[0] == 'Version') { + console.log(fields[1]); + document.getElementById(arch).textContent =fields[1]; + } + } + }); + } + + get_version('amd64'); + get_version('i386'); + + </script> <p>For installing the package, run the following command:</p> |
