mirror of
https://codeberg.org/Toasterson/ips.git
synced 2026-04-10 13:20:42 +00:00
Design overhaul: - Dark "Solaris Engineering" theme with amber accent colors - JetBrains Mono + Source Sans 3 typography via Google Fonts - Publisher cards with accent borders and stats layout - Styled package tables with hover states - Breadcrumb navigation and active nav indicators - Colored dependency type badges (require/optional/incorporate) - Terminal-style install command display - Floating pill-shaped P5I cart with enter animation - Custom scrollbars for manifest viewer Bug fixes: - P5I cart now hidden by default (was visible with 0 items) - "Updated" timestamp now formatted via format_packaging_date - Package count falls back to list_packages when get_info reports 0
62 lines
2.3 KiB
HTML
62 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" data-theme="dark">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% block title %}Package Repository{% endblock %}</title>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
|
|
<link rel="stylesheet" href="/ui/static/css/style.css">
|
|
<script src="/ui/static/js/htmx.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<nav class="depot-nav">
|
|
<div class="nav-inner">
|
|
<a href="/ui/" class="brand">pkg depot</a>
|
|
<div class="nav-links">
|
|
<a href="/ui/"{% block nav_publishers %}{% endblock %}>Publishers</a>
|
|
<a href="/ui/search"{% block nav_search %}{% endblock %}>Search</a>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<main class="container">
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
<div id="p5i-cart" class="p5i-cart" style="display:none">
|
|
<span class="cart-count" id="p5i-count">0</span>
|
|
<span class="cart-label">selected</span>
|
|
<a href="#" class="cart-action" id="p5i-download" onclick="downloadP5i(); return false;">Download P5I</a>
|
|
</div>
|
|
<script>
|
|
const p5iSelection = new Set();
|
|
function toggleP5i(checkbox, publisher, fmri) {
|
|
const key = publisher + '|' + fmri;
|
|
if (checkbox.checked) {
|
|
p5iSelection.add(key);
|
|
} else {
|
|
p5iSelection.delete(key);
|
|
}
|
|
const cart = document.getElementById('p5i-cart');
|
|
const count = document.getElementById('p5i-count');
|
|
count.textContent = p5iSelection.size;
|
|
cart.style.display = p5iSelection.size > 0 ? 'flex' : 'none';
|
|
}
|
|
function downloadP5i() {
|
|
const byPub = {};
|
|
for (const key of p5iSelection) {
|
|
const [pub_, fmri] = key.split('|', 2);
|
|
if (!byPub[pub_]) byPub[pub_] = [];
|
|
byPub[pub_].push(fmri);
|
|
}
|
|
const publishers = Object.keys(byPub);
|
|
if (publishers.length === 0) return;
|
|
const pub_ = publishers[0];
|
|
const params = new URLSearchParams();
|
|
params.set('publisher', pub_);
|
|
for (const fmri of byPub[pub_]) {
|
|
params.append('pkg', fmri);
|
|
}
|
|
window.location.href = '/ui/p5i?' + params.toString();
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|