foliage/templates/allPackages.mustache
2022-10-27 12:19:37 +08:00

85 lines
3.3 KiB
Plaintext

<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<!-- DataTables -->
<link rel="stylesheet" href="https://cdn.datatables.net/v/bs5/dt-1.12.1/datatables.min.css" integrity="sha384-4+3RMUungd+Oh0juS2Jl3yQ7mPlVfsgr10NLSsqltLXIECi9ExY4d1cTtmf9aN8E" crossorigin="anonymous">
<script src="https://cdn.datatables.net/v/bs5/jq-3.6.0/dt-1.12.1/datatables.min.js" integrity="sha384-eU1uLDC5C4YCIouMauJZjbrnSmIiICWWAPdnZjRkNnuDxG+eJFN/EhW5GlKPAIVl" crossorigin="anonymous"></script>
<title>
All packages
</title>
</head>
<body>
<div class="container px-4 py-5">
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="../index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">All packages</a>
</li>
<li class="nav-item">
<a class="nav-link" href="../all-package-versions/index.html">All package versions</a>
</li>
</ul>
<h1 class="py-5">
All packages
</h1>
<p>
This page lists the latest version and revision of all packages in the index.
</p>
<table class="table table-hover">
<thead>
<tr>
<th>Package</th>
<th>Added on</th>
<th>Source</th>
<th>Revision</th>
</th>
</thead>
<tbody>
{{#packages}}
<tr>
<td class="col-sm-2"><a href="../package/{{allPackagesPageEntryPkgId}}">{{allPackagesPageEntryPkgId}}</a></td>
<td class="col-sm-3" data-order="{{allPackagesPageEntryTimestampPosix}}">{{allPackagesPageEntryTimestamp}}</td>
<td class="col-sm-6">
<dl class="row">
{{#allPackagesPageEntrySource}}
{{> packageVersionSource}}
{{/allPackagesPageEntrySource}}
</dl>
</td>
<td class="col-sm-3">
{{#allPackagesPageEntryRevision}}
Last revision at {{revisionTimestamp}}
{{/allPackagesPageEntryRevision}}
{{^allPackagesPageEntryRevision}}
No revision
{{/allPackagesPageEntryRevision}}
</td>
</tr>
{{/packages}}
</tbody>
</table>
</div>
<script>
$(document).ready(function () {
const table = $('table').DataTable({
order: [[0, 'asc']],
lengthMenu: [ [50, 100, 500, -1], [50, 100, 500, "All"] ]
})
const urlParams = new URLSearchParams(location.search)
if (urlParams.has('q')) {
table.search(urlParams.get('q')).draw()
}
});
</script>
</body>
</html>