Init
This commit is contained in:
135
old_scripts/index_base.html
Normal file
135
old_scripts/index_base.html
Normal file
@@ -0,0 +1,135 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 36 36%22><text y=%2232%22 font-size=%2232%22>🚀</text></svg>">
|
||||
<title>Rocky Man Page - 8.10</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/fuse.js/dist/fuse.min.js"></script>
|
||||
<style>
|
||||
/* General Styles */
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #0D0A09;
|
||||
color: white;
|
||||
}
|
||||
|
||||
li {
|
||||
font-size: large;
|
||||
list-style-type: none;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
/* Header Styles */
|
||||
.header {
|
||||
background-color: #0FB981;
|
||||
color: white;
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Main Content Styles */
|
||||
.main-content {
|
||||
margin: 2rem auto;
|
||||
padding: 1rem;
|
||||
background-color: #282828;
|
||||
color: white;
|
||||
max-width: 800px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.main-content a {
|
||||
color: #0FB981;
|
||||
}
|
||||
|
||||
.head-vol {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Responsive Adjustments */
|
||||
@media (max-width: 600px) {
|
||||
.main-content {
|
||||
margin: 1rem;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
input#searchInput {
|
||||
width: 98%;
|
||||
height: 2rem;
|
||||
padding: 0.5rem;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ccc;
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1rem;
|
||||
outline: none;
|
||||
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
input#searchInput:focus {
|
||||
border-color: #0FB981;
|
||||
box-shadow: 0 0 8px 0 #0FB981;
|
||||
}
|
||||
|
||||
#searchInputLabel {
|
||||
display: block;
|
||||
font-size: larger;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="header">
|
||||
<h1>Rocky Linux 8.10 - Man Page Listing</h1>
|
||||
</header>
|
||||
<main class="main-content">
|
||||
<label id="searchInputLabel" for="searchInput">Search:</label>
|
||||
<input id="searchInput" placeholder="Loading..." oninput="searchItems()" role="search" disabled />
|
||||
<br />
|
||||
<ul id="results"></ul>
|
||||
</main>
|
||||
<script>
|
||||
let fuse;
|
||||
let index;
|
||||
|
||||
fetch('list.json.gz')
|
||||
.then(response => response.body.pipeThrough(new DecompressionStream('gzip')))
|
||||
.then(stream => new Response(stream))
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const flattenedData = [];
|
||||
Object.values(data).forEach(category => {
|
||||
Object.values(category).forEach(item => {
|
||||
flattenedData.push(item);
|
||||
});
|
||||
});
|
||||
fuse = new Fuse(flattenedData, {
|
||||
keys: ['fullname'],
|
||||
threshold: 0.2
|
||||
});
|
||||
index = fuse.index; // Create the index
|
||||
document.getElementById("searchInput").placeholder = "";
|
||||
document.getElementById("searchInput").disabled = false;
|
||||
});
|
||||
function searchItems() {
|
||||
const query = document.getElementById("searchInput").value;
|
||||
const results = fuse.search(query, { limit: 50 }); // Limit results for performance
|
||||
const list = document.getElementById("results");
|
||||
list.innerHTML = "";
|
||||
results.forEach(item => {
|
||||
const li = document.createElement("li");
|
||||
const a = document.createElement("a");
|
||||
a.href = item.item.url;
|
||||
a.textContent = item.item.fullname;
|
||||
li.appendChild(a);
|
||||
list.appendChild(li);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user