Files
syscmd/index.html
T

197 lines
9.3 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SysCmd — Command Reference</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.5; }
.mono { font-family: 'JetBrains Mono', monospace; }
.sidebar-link {
display: flex; align-items: center; gap: 6px;
padding: 4px 10px; border-radius: 6px;
font-size: 0.8125rem; font-weight: 500;
cursor: pointer; user-select: none; transition: all 0.12s;
}
.sidebar-link.active { background: #0f172a; color: white; }
.sidebar-link:not(.active) { color: #475569; }
.sidebar-link:not(.active):hover { background: #f1f5f9; color: #0f172a; }
.sidebar-link-3 { padding-left: 48px; font-size: 0.75rem; }
.sidebar-link-4 { padding-left: 64px; font-size: 0.6875rem; font-weight: 400; }
.tree-toggle {
display: inline-flex; align-items: center; justify-content: center;
width: 16px; height: 16px; flex-shrink: 0;
transition: transform 0.15s; color: #94a3b8;
}
.tree-toggle.open { transform: rotate(90deg); }
.tree-children { display: none; }
.tree-children.open { display: block; }
.cmd-row {
display: grid;
grid-template-columns: 190px 1fr;
align-items: start; padding: 4px 12px;
border-radius: 5px; font-size: 0.8125rem;
transition: background 0.1s; gap: 8px;
}
.cmd-row:hover { background: #f1f5f9; }
.cmd-row .cmd-desc { color: #475569; font-weight: 500; line-height: 1.4; }
.cmd-row .cmd-text {
font-family: 'JetBrains Mono', monospace;
font-size: 0.75rem; color: #0f172a;
cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
line-height: 1.4; word-break: break-all;
}
.cmd-row .cmd-text:hover .copy-icon { opacity: 1; }
.copy-icon { opacity: 0; width: 14px; height: 14px; flex-shrink: 0; color: #94a3b8; transition: opacity 0.12s; }
.search-input {
width: 100%; padding: 7px 12px 7px 34px;
border-radius: 8px; font-size: 0.8125rem;
outline: none; border: 1.5px solid #e2e8f0;
background: white; transition: border-color 0.12s;
}
.search-input:focus { border-color: #0f172a; }
.section-tab {
padding: 4px 10px; border-radius: 5px;
font-size: 0.6875rem; font-weight: 500;
cursor: pointer; transition: all 0.12s;
border: 1px solid #e2e8f0; color: #64748b; white-space: nowrap;
}
.section-tab.active { background: #0f172a; color: white; border-color: #0f172a; }
.section-tab:hover:not(.active) { background: #f1f5f9; }
.group-label {
font-size: 0.625rem; font-weight: 700; text-transform: uppercase;
letter-spacing: 0.05em; color: #94a3b8; padding: 8px 12px 4px;
}
.empty-state { padding: 40px 16px; max-width: 360px; margin: 0 auto; text-align: center; }
.empty-state h3 { font-weight: 600; font-size: 0.9375rem; margin-bottom: 4px; color: #0f172a; }
.empty-state p { font-size: 0.8125rem; color: #94a3b8; line-height: 1.5; }
.dot-green { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.dot-gray { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; flex-shrink: 0; }
.dot-orange { width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; flex-shrink: 0; }
.breadcrumb { font-size: 0.75rem; color: #94a3b8; display: flex; gap: 6px; align-items: center; margin-bottom: 2px; }
.breadcrumb .current { color: #0f172a; font-weight: 500; }
.os-card {
border-radius: 10px; border: 1px solid #e2e8f0;
background: white; cursor: pointer;
transition: all 0.15s; padding: 16px;
}
.os-card:hover { border-color: #0f172a; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.os-card .icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.os-card .stat { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.os-card .sublabel { font-size: 0.6875rem; color: #94a3b8; }
.placeholder-card { opacity: 0.6; }
.placeholder-card:hover { opacity: 0.8; }
.home-btn {
padding: 5px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 500;
cursor: pointer; transition: all 0.12s; color: #64748b;
display: flex; align-items: center; gap: 5px;
}
.home-btn:hover { background: #f1f5f9; color: #0f172a; }
</style>
</head>
<body class="bg-[#f8fafc] text-[#0f172a]">
<div class="flex min-h-screen">
<!-- SIDEBAR -->
<aside class="hidden lg:flex flex-col w-56 border-r py-3 bg-white border-[#e2e8f0] overflow-y-auto">
<div class="flex items-center gap-2.5 px-3 pb-3 mb-2 border-b border-[#f1f5f9]">
<div class="w-7 h-7 bg-[#0f172a] rounded-lg flex items-center justify-center">
<svg class="w-3.5 h-3.5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"/>
</svg>
</div>
<span class="font-bold text-sm">SysCmd</span>
</div>
<div id="tree" class="flex-1 overflow-y-auto"></div>
<div class="pt-3 border-t border-[#f1f5f9] mt-auto">
<div class="flex items-center gap-2 px-3 py-2">
<div class="w-7 h-7 bg-[#e2e8f0] rounded-full flex items-center justify-center text-xs font-semibold text-[#64748b]">LK</div>
<div class="text-xs"><div class="font-medium text-[#0f172a]">Laurent</div><div class="text-[#94a3b8]">sysadmin</div></div>
</div>
</div>
</aside>
<!-- MAIN -->
<main class="flex-1 p-6 max-w-5xl" id="main-content">
<!-- HEADER (visible on both views) -->
<div class="flex items-center justify-between mb-6">
<div class="flex items-center gap-3">
<div class="home-btn" id="home-btn" onclick="showHome()" style="display:none">
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/></svg>
Accueil
</div>
<div>
<div class="breadcrumb" id="breadcrumb"></div>
<h1 class="text-xl font-bold" id="os-title"></h1>
<p class="text-xs text-[#64748b] mt-0.5" id="os-sub"></p>
</div>
</div>
<div class="relative">
<svg class="absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-[#94a3b8]" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>
<input class="search-input" id="search" placeholder="Chercher une commande..." oninput="if(currentSection)filterCommands(this.value);else globalSearch(this.value)">
</div>
</div>
<!-- SECTION TABS (hidden on home) -->
<div class="flex gap-1 flex-wrap mb-3" id="tabs" style="display:none"></div>
<!-- STATS BAR (hidden on home) -->
<div class="flex gap-3 items-center mb-3 text-xs text-[#64748b]" id="stats-bar" style="display:none">
<span id="shown">0</span>
<span>commandes</span>
<span>·</span>
<span id="filter-info">Aucun filtre</span>
</div>
<!-- COMMANDS LIST (hidden on home) -->
<div class="bg-white border border-[#e2e8f0] rounded-xl overflow-hidden" id="cmds-container" style="display:none">
<div id="cmds"></div>
</div>
<!-- HOME CONTENT -->
<div id="home-content">
<!-- Hero -->
<div class="mb-8 text-center">
<h2 class="text-2xl font-bold mb-2">SysCmd</h2>
<p class="text-sm text-[#64748b] max-w-xl mx-auto">
Référence de commandes multi-plateforme. Cliquez sur un OS pour voir ses commandes.
</p>
<div class="mt-3 flex justify-center gap-2 text-xs text-[#94a3b8]">
<span class="flex items-center gap-1"><span class="dot-green inline-block"></span> Données disponibles</span>
<span class="flex items-center gap-1"><span class="dot-orange inline-block"></span> Catégorie</span>
<span class="flex items-center gap-1"><span class="dot-gray inline-block"></span> À venir</span>
</div>
</div>
<!-- Global search results -->
<div id="global-search-results" class="mb-6" style="display:none">
<div class="bg-white border border-[#e2e8f0] rounded-xl overflow-hidden">
<div id="global-cmds"></div>
</div>
</div>
<!-- STATS ROW -->
<div class="grid grid-cols-4 gap-3 mb-6 text-center" id="stats-row"></div>
<!-- CARD GRID -->
<div id="card-grid" class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"></div>
</div>
<div class="mt-4 text-center text-[0.6875rem] text-[#94a3b8]" id="footer-hint">
Cliquez sur une commande pour la copier
</div>
</main>
</div>
<script src="script.js"></script>
</body>
</html>