231 lines
6.4 KiB
HTML
231 lines
6.4 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>Packets – Custom Package Manager</title>
|
||
<style>
|
||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||
body {
|
||
font-family: Arial, sans-serif;
|
||
line-height: 1.6;
|
||
background: #fefefe;
|
||
color: #222;
|
||
padding: 20px;
|
||
}
|
||
header {
|
||
text-align: center;
|
||
margin-bottom: 20px;
|
||
}
|
||
header h1 {
|
||
font-size: 2.2em;
|
||
color: #333;
|
||
}
|
||
header p {
|
||
font-size: 1.1em;
|
||
color: #555;
|
||
}
|
||
nav {
|
||
text-align: center;
|
||
margin: 15px 0;
|
||
}
|
||
nav a {
|
||
margin: 0 10px;
|
||
text-decoration: none;
|
||
color: #0066cc;
|
||
font-weight: bold;
|
||
}
|
||
main {
|
||
max-width: 1000px;
|
||
margin: auto;
|
||
}
|
||
section {
|
||
margin-bottom: 30px;
|
||
padding-bottom: 10px;
|
||
border-bottom: 1px solid #ddd;
|
||
}
|
||
h2 {
|
||
color: #222;
|
||
margin-bottom: 10px;
|
||
}
|
||
/* table control */
|
||
.table-controls {
|
||
margin-bottom: 10px;
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 12px;
|
||
align-items: center;
|
||
}
|
||
.table-controls label {
|
||
font-weight: bold;
|
||
margin-right: 6px;
|
||
}
|
||
.table-controls input[type="search"],
|
||
.table-controls select {
|
||
padding: 6px 10px;
|
||
font-size: 1rem;
|
||
border: 1px solid #ccc;
|
||
border-radius: 4px;
|
||
min-width: 100px;
|
||
}
|
||
/* table */
|
||
.table-container {
|
||
overflow-x: auto;
|
||
}
|
||
table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
margin-top: 5px;
|
||
background: white;
|
||
}
|
||
th, td {
|
||
padding: 10px;
|
||
border: 1px solid #ddd;
|
||
text-align: left;
|
||
}
|
||
th {
|
||
background: #f4f4f4;
|
||
font-weight: bold;
|
||
}
|
||
tr:nth-child(even) {
|
||
background: #fafafa;
|
||
}
|
||
|
||
table a {
|
||
text-decoration: none;
|
||
color: #0066cc;
|
||
}
|
||
/* pagination */
|
||
.pagination {
|
||
margin-top: 15px;
|
||
display: flex;
|
||
justify-content: center;
|
||
gap: 10px;
|
||
}
|
||
.pagination button {
|
||
padding: 6px 12px;
|
||
font-size: 1.2rem;
|
||
cursor: pointer;
|
||
border: 1px solid #ccc;
|
||
border-radius: 4px;
|
||
background: #f0f0f0;
|
||
color: #333;
|
||
user-select: none;
|
||
transition: background-color 0.2s;
|
||
}
|
||
.pagination button:hover:not(:disabled) {
|
||
background-color: #ddd;
|
||
}
|
||
.pagination button:disabled {
|
||
cursor: default;
|
||
opacity: 0.5;
|
||
}
|
||
hr {
|
||
border: none;
|
||
height: 1px;
|
||
background: linear-gradient(to right, transparent, #ccc, transparent);
|
||
margin: 20px 0;
|
||
}
|
||
|
||
|
||
@media (max-width: 600px) {
|
||
header h1 {
|
||
font-size: 1.8em;
|
||
}
|
||
nav a {
|
||
display: block;
|
||
margin: 5px 0;
|
||
}
|
||
.table-controls {
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
}
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<header>
|
||
<h1>📦 Packets</h1>
|
||
<p>Fast, lightweight and compatible</p>
|
||
</header>
|
||
|
||
<nav>
|
||
<a href="#download">Download</a>
|
||
<a href="/package">Packages</a>
|
||
<a href="/upload">Upload</a>
|
||
<a href="/account">Account</a>
|
||
</nav>
|
||
<hr>
|
||
|
||
<main>
|
||
<section id="packages">
|
||
|
||
<div class="table-controls">
|
||
<label for="searchInput">Search:</label>
|
||
<input type="search" id="searchInput" v-model="search" placeholder="Search packages...">
|
||
|
||
<label for="operatingSelect">Operating:</label>
|
||
<select id="operatingSelect" v-model="operating">
|
||
<option value="">All</option>
|
||
<option value="Linux">Linux</option>
|
||
<option value="Windows">Windows</option>
|
||
<option value="MacOS">MacOS</option>
|
||
</select>
|
||
|
||
<label for="archSelect">Arch:</label>
|
||
<select id="archSelect" v-model="arch">
|
||
<option value="">All</option>
|
||
<option value="x86_64">x86_64</option>
|
||
<option value="arm64">arm64</option>
|
||
<option value="i386">i386</option>
|
||
</select>
|
||
|
||
<label for="rowsSelect">Show:</label>
|
||
<select id="rowsSelect" v-model="rows">
|
||
<option value="10">10 rows</option>
|
||
<option value="25">25 rows</option>
|
||
<option value="50">50 rows</option>
|
||
<option value="100">100 rows</option>
|
||
<option value="500" selected>500 rows</option>
|
||
</select>
|
||
</div>
|
||
<hr>
|
||
|
||
<h2>Package List</h2>
|
||
<div class="table-container">
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Query name</th>
|
||
<th>Name</th>
|
||
<th>Arch</th>
|
||
<th>Operating</th>
|
||
<th>Version</th>
|
||
<th>Author</th>
|
||
<th>Reports</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="app">
|
||
<tr v-for="package in packages" :key="package.realname">
|
||
<td>[[ package.name ]]</td>
|
||
<td><a :href="'/package/'+ package.realname">[[ package.realname ]]</a></td>
|
||
<td>[[ package.arch ]]</td>
|
||
<td>[[ package.operating ]]</td>
|
||
<td>[[ package.version ]]</td>
|
||
<td>[[ package.author ]]</td>
|
||
<td>[[ package.reports ]]</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="pagination">
|
||
<button id="prevPage" @click="prevPage" aria-label="Previous page" title="Previous"><</button>
|
||
<button id="nextPage" @click="nextPage" aria-label="Next page" title="Next">></button>
|
||
</div>
|
||
</section>
|
||
</main>
|
||
<script src="/static/js/vue.global.js"></script>
|
||
<script src="/static/js/table.js"></script>
|
||
</body>
|
||
</html>
|