mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-10-27 07:52:03 +00:00
Add landing page branch toggle for install commands
This commit is contained in:
1 parent
88c1974ac6
commit
4cb411c1f3
3 files changed
+68
-2
No files matched your search
+6
-2
@@ -67,11 +67,15 @@
|
||||
</div>
|
||||
|
||||
<div class="install-section">
|
||||
<span class="comment"># Install SeedPass (stable) - Includes checksum verification</span>
|
||||
<span class="comment"># Install SeedPass - Includes checksum verification</span>
|
||||
<div class="branch-toggle" role="group" aria-label="Install branch selector">
|
||||
<button class="branch-btn active" id="branch-main" data-branch="main" type="button">main</button>
|
||||
<button class="branch-btn" id="branch-beta" data-branch="beta" type="button">beta</button>
|
||||
</div>
|
||||
<div class="cmd-prompt">
|
||||
<span class="prompt-symbol">❯</span>
|
||||
<code class="install-cmd"
|
||||
id="install-cmd">curl -sSL http://seedpass.me/install/seedpass-main.sh | bash</code>
|
||||
id="install-cmd">bash -c "$(curl -sSL https://raw.githubusercontent.com/PR0M3TH3AN/SeedPass/main/scripts/install.sh)"</code>
|
||||
<button class="copy-btn" id="copy-btn" aria-label="Copy command">
|
||||
<i class="far fa-copy"></i>
|
||||
</button>
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const installCommands = {
|
||||
main: 'bash -c "$(curl -sSL https://raw.githubusercontent.com/PR0M3TH3AN/SeedPass/main/scripts/install.sh)"',
|
||||
beta: 'bash -c "$(curl -sSL https://raw.githubusercontent.com/PR0M3TH3AN/SeedPass/main/scripts/install.sh)" _ -b beta'
|
||||
};
|
||||
|
||||
// --- Boot Sequence Animation ---
|
||||
const bootLines = [
|
||||
"INITIALIZING SYSTEM MODULES...",
|
||||
@@ -49,6 +54,32 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
const copyBtn = document.getElementById('copy-btn');
|
||||
const installCmd = document.getElementById('install-cmd');
|
||||
const copyFeedback = document.getElementById('copy-feedback');
|
||||
const branchButtons = document.querySelectorAll('.branch-btn');
|
||||
|
||||
function setInstallBranch(branch) {
|
||||
if (!installCmd || !installCommands[branch]) {
|
||||
return;
|
||||
}
|
||||
installCmd.textContent = installCommands[branch];
|
||||
branchButtons.forEach((btn) => {
|
||||
const isActive = btn.dataset.branch === branch;
|
||||
btn.classList.toggle('active', isActive);
|
||||
btn.setAttribute('aria-pressed', isActive ? 'true' : 'false');
|
||||
});
|
||||
}
|
||||
|
||||
if (branchButtons.length > 0) {
|
||||
branchButtons.forEach((btn) => {
|
||||
btn.addEventListener('click', () => {
|
||||
const selectedBranch = btn.dataset.branch;
|
||||
setInstallBranch(selectedBranch);
|
||||
if (copyFeedback) {
|
||||
copyFeedback.textContent = '';
|
||||
}
|
||||
});
|
||||
});
|
||||
setInstallBranch('main');
|
||||
}
|
||||
|
||||
if (copyBtn && installCmd && copyFeedback) {
|
||||
copyBtn.addEventListener('click', () => {
|
||||
|
||||
@@ -373,6 +373,37 @@ a:hover {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.branch-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.branch-btn {
|
||||
border: 1px solid var(--border-highlight);
|
||||
background: #080a0c;
|
||||
color: var(--text-primary);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.8rem;
|
||||
padding: 4px 10px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.branch-btn:hover {
|
||||
border-color: var(--accent-secondary);
|
||||
color: var(--text-bright);
|
||||
}
|
||||
|
||||
.branch-btn.active {
|
||||
color: var(--bg-main);
|
||||
background: var(--accent-primary);
|
||||
border-color: var(--accent-primary);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.cmd-prompt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in new issue
Block a user