forked from vyla-entertainment/home-frontend
android has dynamic downloads
This commit is contained in:
@@ -309,53 +309,120 @@
|
|||||||
<div class="container cta-banner-content reveal">
|
<div class="container cta-banner-content reveal">
|
||||||
<h2 id="cta-heading" class="cta-banner-title">Try Vyla Home today</h2>
|
<h2 id="cta-heading" class="cta-banner-title">Try Vyla Home today</h2>
|
||||||
<p class="cta-banner-subtitle">Your Entertainment. Zero Servers Attached.</p>
|
<p class="cta-banner-subtitle">Your Entertainment. Zero Servers Attached.</p>
|
||||||
<a class="hero-cta hero-cta-light" id="cta-copy-script-btn" href="#" target="_blank"
|
<div class="download-expandable" id="cta-download-expandable" aria-expanded="false">
|
||||||
rel="noopener noreferrer">Download Now</a>
|
<button class="hero-cta hero-cta-light" id="cta-download-btn">
|
||||||
|
<span class="download-btn-text">Download Now</span>
|
||||||
|
<svg class="dropdown-arrow" width="17" height="17" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path d="M7 10l5 5 5-5z" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<div class="download-options" id="cta-download-options" aria-hidden="true">
|
||||||
|
<a href="#" class="download-option" id="cta-windows-download">
|
||||||
|
<svg class="windows-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path
|
||||||
|
d="M0 3.449L9.75 2.1v9.451H0m10.949-9.602L24 0v11.4H10.949M0 12.6h9.75v9.451L0 20.699M10.949 12.6H24V24l-12.949-1.951" />
|
||||||
|
</svg>
|
||||||
|
<span>Windows v0.0.0</span>
|
||||||
|
</a>
|
||||||
|
<a href="#" class="download-option" id="cta-mac-download">
|
||||||
|
<svg class="mac-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path
|
||||||
|
d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z" />
|
||||||
|
</svg>
|
||||||
|
<span>Mac v0.0.0</span>
|
||||||
|
</a>
|
||||||
|
<a href="#" class="download-option" id="cta-go-download">
|
||||||
|
<svg class="android-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path
|
||||||
|
d="M17.6 9.2l1.5-2.6c.1-.2.1-.4-.1-.5-.2-.1-.4-.1-.5.1L17 8.8c-.9-.4-1.9-.6-3-.6s-2.1.2-3 .6L9.5 6.2c-.1-.2-.3-.2-.5-.1-.2.1-.2.3-.1.5l1.5 2.6C8.1 10.2 6.4 12.1 6 14.5h12c-.4-2.4-2.1-4.3-4.4-5.3zM9.5 13.2c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zm5 0c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zM6 15h12v3.5c0 .8-.7 1.5-1.5 1.5h-9c-.8 0-1.5-.7-1.5-1.5V15zm2 5v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2zm10 0v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2z" />
|
||||||
|
</svg>
|
||||||
|
<span>Android v0.0.0</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
async function setupLatestDownload() {
|
async function setupExpandableDownload(expandableId, btnId, optionsId, windowsId, goId, macId) {
|
||||||
const buttons = [
|
const expandable = document.getElementById(expandableId);
|
||||||
document.getElementById("hero-copy-script-btn"),
|
const downloadBtn = document.getElementById(btnId);
|
||||||
document.getElementById("cta-copy-script-btn")
|
const downloadOptions = document.getElementById(optionsId);
|
||||||
];
|
const windowsDownload = document.getElementById(windowsId);
|
||||||
|
const goDownload = document.getElementById(goId);
|
||||||
|
const macDownload = document.getElementById(macId);
|
||||||
|
if (!expandable || !downloadBtn || !downloadOptions || !windowsDownload || !goDownload || !macDownload) return;
|
||||||
try {
|
try {
|
||||||
const project = "vyla-entertainment%2Fhome";
|
const [homeResponse, goResponse] = await Promise.all([
|
||||||
|
fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/releases/permalink/latest"),
|
||||||
const response = await fetch(
|
fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/releases/permalink/latest")
|
||||||
`https://gitlab.com/api/v4/projects/${project}/releases/permalink/latest`
|
]);
|
||||||
);
|
if (!homeResponse.ok) throw new Error("Failed to fetch latest home release");
|
||||||
|
if (!goResponse.ok) throw new Error("Failed to fetch latest go release");
|
||||||
if (!response.ok) {
|
const homeRelease = await homeResponse.json();
|
||||||
throw new Error(`Failed to fetch latest release: ${response.status}`);
|
const goRelease = await goResponse.json();
|
||||||
|
const version = homeRelease.tag_name;
|
||||||
|
const goVersion = goRelease.tag_name;
|
||||||
|
const fileVersion = version.replace(/^v/, "");
|
||||||
|
const goFileVersion = goVersion.replace(/^v/, "");
|
||||||
|
const windowsAsset = homeRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".exe"));
|
||||||
|
const macAsset = homeRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".dmg"));
|
||||||
|
const goAsset = goRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".apk"));
|
||||||
|
const btnText = downloadBtn.querySelector(".download-btn-text");
|
||||||
|
if (btnText) {
|
||||||
|
btnText.textContent = `Download ${version}`;
|
||||||
}
|
}
|
||||||
|
if (windowsAsset?.url) {
|
||||||
const release = await response.json();
|
windowsDownload.href = windowsAsset.url;
|
||||||
|
} else {
|
||||||
const asset = release.assets?.links?.find(link =>
|
windowsDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/packages/generic/vyla-home/${version}/Vyla-Home_${fileVersion}_x64-setup.exe`;
|
||||||
link.name?.toLowerCase().endsWith(".exe")
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!asset?.url) {
|
|
||||||
throw new Error("No .exe asset found in latest release");
|
|
||||||
}
|
}
|
||||||
|
windowsDownload.querySelector("span").textContent = `Windows ${version}`;
|
||||||
buttons.forEach(button => {
|
if (goAsset?.url) {
|
||||||
if (button) {
|
goDownload.href = goAsset.url;
|
||||||
button.href = asset.url;
|
} else {
|
||||||
}
|
goDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/packages/generic/vyla-go/${goVersion}/vyla-go-${goFileVersion}.apk`;
|
||||||
|
}
|
||||||
|
goDownload.querySelector("span").textContent = `Android ${goVersion}`;
|
||||||
|
if (macAsset?.url) {
|
||||||
|
macDownload.href = macAsset.url;
|
||||||
|
} else {
|
||||||
|
macDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/packages/generic/vyla-home/${version}/Vyla-Home_${fileVersion}_aarch64.dmg`;
|
||||||
|
}
|
||||||
|
macDownload.querySelector("span").textContent = `Mac ${version}`;
|
||||||
|
downloadBtn.addEventListener("click", (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
const isExpanded = expandable.getAttribute("aria-expanded") === "true";
|
||||||
|
expandable.setAttribute("aria-expanded", String(!isExpanded));
|
||||||
|
downloadOptions.setAttribute("aria-hidden", String(isExpanded));
|
||||||
|
downloadOptions.classList.toggle("show", !isExpanded);
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
buttons.forEach(button => {
|
const btnText = downloadBtn.querySelector(".download-btn-text");
|
||||||
if (button) {
|
if (btnText) {
|
||||||
button.textContent = "Download Latest Release";
|
btnText.textContent = "Download Latest Release";
|
||||||
}
|
}
|
||||||
});
|
windowsDownload.querySelector("span").textContent = "Windows (Latest)";
|
||||||
|
goDownload.querySelector("span").textContent = "Android (Latest)";
|
||||||
|
macDownload.querySelector("span").textContent = "Mac (Latest)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setupExpandableDownload("cta-download-expandable", "cta-download-btn", "cta-download-options", "cta-windows-download", "cta-go-download", "cta-mac-download");
|
||||||
setupLatestDownload();
|
document.addEventListener("click", (e) => {
|
||||||
|
const expandables = document.querySelectorAll(".download-expandable");
|
||||||
|
expandables.forEach(expandable => {
|
||||||
|
const btn = expandable.querySelector("button");
|
||||||
|
const options = expandable.querySelector(".download-options");
|
||||||
|
if (btn && options && !expandable.contains(e.target)) {
|
||||||
|
expandable.setAttribute("aria-expanded", "false");
|
||||||
|
options.setAttribute("aria-hidden", "true");
|
||||||
|
options.classList.remove("show");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -389,7 +456,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img src="https://app.greenweb.org/api/v3/greencheckimage/vyla.cc?nocache=true"
|
<img src="https://app.greenweb.org/api/v3/greencheckimage/vyla.cc"
|
||||||
alt="This website runs on green hosting - verified by thegreenwebfoundation.org" width="200"
|
alt="This website runs on green hosting - verified by thegreenwebfoundation.org" width="200"
|
||||||
height="95" loading="lazy" decoding="async">
|
height="95" loading="lazy" decoding="async">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
66
index.html
66
index.html
@@ -333,7 +333,7 @@
|
|||||||
<path
|
<path
|
||||||
d="M17.6 9.2l1.5-2.6c.1-.2.1-.4-.1-.5-.2-.1-.4-.1-.5.1L17 8.8c-.9-.4-1.9-.6-3-.6s-2.1.2-3 .6L9.5 6.2c-.1-.2-.3-.2-.5-.1-.2.1-.2.3-.1.5l1.5 2.6C8.1 10.2 6.4 12.1 6 14.5h12c-.4-2.4-2.1-4.3-4.4-5.3zM9.5 13.2c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zm5 0c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zM6 15h12v3.5c0 .8-.7 1.5-1.5 1.5h-9c-.8 0-1.5-.7-1.5-1.5V15zm2 5v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2zm10 0v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2z" />
|
d="M17.6 9.2l1.5-2.6c.1-.2.1-.4-.1-.5-.2-.1-.4-.1-.5.1L17 8.8c-.9-.4-1.9-.6-3-.6s-2.1.2-3 .6L9.5 6.2c-.1-.2-.3-.2-.5-.1-.2.1-.2.3-.1.5l1.5 2.6C8.1 10.2 6.4 12.1 6 14.5h12c-.4-2.4-2.1-4.3-4.4-5.3zM9.5 13.2c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zm5 0c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zM6 15h12v3.5c0 .8-.7 1.5-1.5 1.5h-9c-.8 0-1.5-.7-1.5-1.5V15zm2 5v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2zm10 0v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2z" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>Android v1.0.2</span>
|
<span>Android v0.0.0</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="#" class="download-option" id="hero-mac-download">
|
<a href="#" class="download-option" id="hero-mac-download">
|
||||||
<svg class="mac-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"
|
<svg class="mac-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"
|
||||||
@@ -358,13 +358,21 @@
|
|||||||
const macDownload = document.getElementById(macId);
|
const macDownload = document.getElementById(macId);
|
||||||
if (!expandable || !downloadBtn || !downloadOptions || !windowsDownload || !goDownload || !macDownload) return;
|
if (!expandable || !downloadBtn || !downloadOptions || !windowsDownload || !goDownload || !macDownload) return;
|
||||||
try {
|
try {
|
||||||
const response = await fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/releases/permalink/latest");
|
const [homeResponse, goResponse] = await Promise.all([
|
||||||
if (!response.ok) throw new Error("Failed to fetch latest release");
|
fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/releases/permalink/latest"),
|
||||||
const release = await response.json();
|
fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/releases/permalink/latest")
|
||||||
const version = release.tag_name;
|
]);
|
||||||
|
if (!homeResponse.ok) throw new Error("Failed to fetch latest home release");
|
||||||
|
if (!goResponse.ok) throw new Error("Failed to fetch latest go release");
|
||||||
|
const homeRelease = await homeResponse.json();
|
||||||
|
const goRelease = await goResponse.json();
|
||||||
|
const version = homeRelease.tag_name;
|
||||||
|
const goVersion = goRelease.tag_name;
|
||||||
const fileVersion = version.replace(/^v/, "");
|
const fileVersion = version.replace(/^v/, "");
|
||||||
const windowsAsset = release.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".exe"));
|
const goFileVersion = goVersion.replace(/^v/, "");
|
||||||
const macAsset = release.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".dmg"));
|
const windowsAsset = homeRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".exe"));
|
||||||
|
const macAsset = homeRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".dmg"));
|
||||||
|
const goAsset = goRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".apk"));
|
||||||
const btnText = downloadBtn.querySelector(".download-btn-text");
|
const btnText = downloadBtn.querySelector(".download-btn-text");
|
||||||
if (btnText) {
|
if (btnText) {
|
||||||
btnText.textContent = `Download ${version}`;
|
btnText.textContent = `Download ${version}`;
|
||||||
@@ -375,8 +383,12 @@
|
|||||||
windowsDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/packages/generic/vyla-home/${version}/Vyla-Home_${fileVersion}_x64-setup.exe`;
|
windowsDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/packages/generic/vyla-home/${version}/Vyla-Home_${fileVersion}_x64-setup.exe`;
|
||||||
}
|
}
|
||||||
windowsDownload.querySelector("span").textContent = `Windows ${version}`;
|
windowsDownload.querySelector("span").textContent = `Windows ${version}`;
|
||||||
goDownload.href = "https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/packages/generic/vyla-go/v1.0.2/vyla-go-v1.0.2-1788911736508.apk";
|
if (goAsset?.url) {
|
||||||
goDownload.querySelector("span").textContent = "Android v1.0.2";
|
goDownload.href = goAsset.url;
|
||||||
|
} else {
|
||||||
|
goDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/packages/generic/vyla-go/${goVersion}/vyla-go-${goFileVersion}.apk`;
|
||||||
|
}
|
||||||
|
goDownload.querySelector("span").textContent = `Android ${goVersion}`;
|
||||||
if (macAsset?.url) {
|
if (macAsset?.url) {
|
||||||
macDownload.href = macAsset.url;
|
macDownload.href = macAsset.url;
|
||||||
} else {
|
} else {
|
||||||
@@ -396,8 +408,7 @@
|
|||||||
btnText.textContent = "Download Latest Release";
|
btnText.textContent = "Download Latest Release";
|
||||||
}
|
}
|
||||||
windowsDownload.querySelector("span").textContent = "Windows (Latest)";
|
windowsDownload.querySelector("span").textContent = "Windows (Latest)";
|
||||||
goDownload.href = "https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/packages/generic/vyla-go/v1.0.2/vyla-go-v1.0.2-1788911736508.apk";
|
goDownload.querySelector("span").textContent = "Android (Latest)";
|
||||||
goDownload.querySelector("span").textContent = "Android v1.0.2";
|
|
||||||
macDownload.querySelector("span").textContent = "Mac (Latest)";
|
macDownload.querySelector("span").textContent = "Mac (Latest)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -621,7 +632,7 @@
|
|||||||
<path
|
<path
|
||||||
d="M17.6 9.2l1.5-2.6c.1-.2.1-.4-.1-.5-.2-.1-.4-.1-.5.1L17 8.8c-.9-.4-1.9-.6-3-.6s-2.1.2-3 .6L9.5 6.2c-.1-.2-.3-.2-.5-.1-.2.1-.2.3-.1.5l1.5 2.6C8.1 10.2 6.4 12.1 6 14.5h12c-.4-2.4-2.1-4.3-4.4-5.3zM9.5 13.2c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zm5 0c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zM6 15h12v3.5c0 .8-.7 1.5-1.5 1.5h-9c-.8 0-1.5-.7-1.5-1.5V15zm2 5v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2zm10 0v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2z" />
|
d="M17.6 9.2l1.5-2.6c.1-.2.1-.4-.1-.5-.2-.1-.4-.1-.5.1L17 8.8c-.9-.4-1.9-.6-3-.6s-2.1.2-3 .6L9.5 6.2c-.1-.2-.3-.2-.5-.1-.2.1-.2.3-.1.5l1.5 2.6C8.1 10.2 6.4 12.1 6 14.5h12c-.4-2.4-2.1-4.3-4.4-5.3zM9.5 13.2c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zm5 0c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zM6 15h12v3.5c0 .8-.7 1.5-1.5 1.5h-9c-.8 0-1.5-.7-1.5-1.5V15zm2 5v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2zm10 0v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2z" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>Android v1.0.2</span>
|
<span>Android v0.0.0</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -637,13 +648,21 @@
|
|||||||
const macDownload = document.getElementById(macId);
|
const macDownload = document.getElementById(macId);
|
||||||
if (!expandable || !downloadBtn || !downloadOptions || !windowsDownload || !goDownload || !macDownload) return;
|
if (!expandable || !downloadBtn || !downloadOptions || !windowsDownload || !goDownload || !macDownload) return;
|
||||||
try {
|
try {
|
||||||
const response = await fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/releases/permalink/latest");
|
const [homeResponse, goResponse] = await Promise.all([
|
||||||
if (!response.ok) throw new Error("Failed to fetch latest release");
|
fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/releases/permalink/latest"),
|
||||||
const release = await response.json();
|
fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/releases/permalink/latest")
|
||||||
const version = release.tag_name;
|
]);
|
||||||
|
if (!homeResponse.ok) throw new Error("Failed to fetch latest home release");
|
||||||
|
if (!goResponse.ok) throw new Error("Failed to fetch latest go release");
|
||||||
|
const homeRelease = await homeResponse.json();
|
||||||
|
const goRelease = await goResponse.json();
|
||||||
|
const version = homeRelease.tag_name;
|
||||||
|
const goVersion = goRelease.tag_name;
|
||||||
const fileVersion = version.replace(/^v/, "");
|
const fileVersion = version.replace(/^v/, "");
|
||||||
const windowsAsset = release.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".exe"));
|
const goFileVersion = goVersion.replace(/^v/, "");
|
||||||
const macAsset = release.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".dmg"));
|
const windowsAsset = homeRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".exe"));
|
||||||
|
const macAsset = homeRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".dmg"));
|
||||||
|
const goAsset = goRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".apk"));
|
||||||
const btnText = downloadBtn.querySelector(".download-btn-text");
|
const btnText = downloadBtn.querySelector(".download-btn-text");
|
||||||
if (btnText) {
|
if (btnText) {
|
||||||
btnText.textContent = `Download ${version}`;
|
btnText.textContent = `Download ${version}`;
|
||||||
@@ -654,8 +673,12 @@
|
|||||||
windowsDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/packages/generic/vyla-home/${version}/Vyla-Home_${fileVersion}_x64-setup.exe`;
|
windowsDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/packages/generic/vyla-home/${version}/Vyla-Home_${fileVersion}_x64-setup.exe`;
|
||||||
}
|
}
|
||||||
windowsDownload.querySelector("span").textContent = `Windows ${version}`;
|
windowsDownload.querySelector("span").textContent = `Windows ${version}`;
|
||||||
goDownload.href = "https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/packages/generic/vyla-go/v1.0.2/vyla-go-v1.0.2-1788911736508.apk";
|
if (goAsset?.url) {
|
||||||
goDownload.querySelector("span").textContent = "Android v1.0.2";
|
goDownload.href = goAsset.url;
|
||||||
|
} else {
|
||||||
|
goDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/packages/generic/vyla-go/${goVersion}/vyla-go-${goFileVersion}.apk`;
|
||||||
|
}
|
||||||
|
goDownload.querySelector("span").textContent = `Android ${goVersion}`;
|
||||||
if (macAsset?.url) {
|
if (macAsset?.url) {
|
||||||
macDownload.href = macAsset.url;
|
macDownload.href = macAsset.url;
|
||||||
} else {
|
} else {
|
||||||
@@ -675,8 +698,7 @@
|
|||||||
btnText.textContent = "Download Latest Release";
|
btnText.textContent = "Download Latest Release";
|
||||||
}
|
}
|
||||||
windowsDownload.querySelector("span").textContent = "Windows (Latest)";
|
windowsDownload.querySelector("span").textContent = "Windows (Latest)";
|
||||||
goDownload.href = "https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/packages/generic/vyla-go/v1.0.2/vyla-go-v1.0.2-1788911736508.apk";
|
goDownload.querySelector("span").textContent = "Android (Latest)";
|
||||||
goDownload.querySelector("span").textContent = "Android v1.0.2";
|
|
||||||
macDownload.querySelector("span").textContent = "Mac (Latest)";
|
macDownload.querySelector("span").textContent = "Mac (Latest)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -320,53 +320,120 @@
|
|||||||
<div class="container cta-banner-content reveal">
|
<div class="container cta-banner-content reveal">
|
||||||
<h2 id="cta-heading" class="cta-banner-title">Try Vyla Home today</h2>
|
<h2 id="cta-heading" class="cta-banner-title">Try Vyla Home today</h2>
|
||||||
<p class="cta-banner-subtitle">Your Entertainment. Zero Servers Attached.</p>
|
<p class="cta-banner-subtitle">Your Entertainment. Zero Servers Attached.</p>
|
||||||
<a class="hero-cta hero-cta-light" id="cta-copy-script-btn" href="#" target="_blank"
|
<div class="download-expandable" id="cta-download-expandable" aria-expanded="false">
|
||||||
rel="noopener noreferrer">Download Now</a>
|
<button class="hero-cta hero-cta-light" id="cta-download-btn">
|
||||||
|
<span class="download-btn-text">Download Now</span>
|
||||||
|
<svg class="dropdown-arrow" width="17" height="17" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path d="M7 10l5 5 5-5z" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<div class="download-options" id="cta-download-options" aria-hidden="true">
|
||||||
|
<a href="#" class="download-option" id="cta-windows-download">
|
||||||
|
<svg class="windows-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path
|
||||||
|
d="M0 3.449L9.75 2.1v9.451H0m10.949-9.602L24 0v11.4H10.949M0 12.6h9.75v9.451L0 20.699M10.949 12.6H24V24l-12.949-1.951" />
|
||||||
|
</svg>
|
||||||
|
<span>Windows v0.0.0</span>
|
||||||
|
</a>
|
||||||
|
<a href="#" class="download-option" id="cta-mac-download">
|
||||||
|
<svg class="mac-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path
|
||||||
|
d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z" />
|
||||||
|
</svg>
|
||||||
|
<span>Mac v0.0.0</span>
|
||||||
|
</a>
|
||||||
|
<a href="#" class="download-option" id="cta-go-download">
|
||||||
|
<svg class="android-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path
|
||||||
|
d="M17.6 9.2l1.5-2.6c.1-.2.1-.4-.1-.5-.2-.1-.4-.1-.5.1L17 8.8c-.9-.4-1.9-.6-3-.6s-2.1.2-3 .6L9.5 6.2c-.1-.2-.3-.2-.5-.1-.2.1-.2.3-.1.5l1.5 2.6C8.1 10.2 6.4 12.1 6 14.5h12c-.4-2.4-2.1-4.3-4.4-5.3zM9.5 13.2c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zm5 0c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zM6 15h12v3.5c0 .8-.7 1.5-1.5 1.5h-9c-.8 0-1.5-.7-1.5-1.5V15zm2 5v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2zm10 0v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2z" />
|
||||||
|
</svg>
|
||||||
|
<span>Android v0.0.0</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
async function setupLatestDownload() {
|
async function setupExpandableDownload(expandableId, btnId, optionsId, windowsId, goId, macId) {
|
||||||
const buttons = [
|
const expandable = document.getElementById(expandableId);
|
||||||
document.getElementById("hero-copy-script-btn"),
|
const downloadBtn = document.getElementById(btnId);
|
||||||
document.getElementById("cta-copy-script-btn")
|
const downloadOptions = document.getElementById(optionsId);
|
||||||
];
|
const windowsDownload = document.getElementById(windowsId);
|
||||||
|
const goDownload = document.getElementById(goId);
|
||||||
|
const macDownload = document.getElementById(macId);
|
||||||
|
if (!expandable || !downloadBtn || !downloadOptions || !windowsDownload || !goDownload || !macDownload) return;
|
||||||
try {
|
try {
|
||||||
const project = "vyla-entertainment%2Fhome";
|
const [homeResponse, goResponse] = await Promise.all([
|
||||||
|
fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/releases/permalink/latest"),
|
||||||
const response = await fetch(
|
fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/releases/permalink/latest")
|
||||||
`https://gitlab.com/api/v4/projects/${project}/releases/permalink/latest`
|
]);
|
||||||
);
|
if (!homeResponse.ok) throw new Error("Failed to fetch latest home release");
|
||||||
|
if (!goResponse.ok) throw new Error("Failed to fetch latest go release");
|
||||||
if (!response.ok) {
|
const homeRelease = await homeResponse.json();
|
||||||
throw new Error(`Failed to fetch latest release: ${response.status}`);
|
const goRelease = await goResponse.json();
|
||||||
|
const version = homeRelease.tag_name;
|
||||||
|
const goVersion = goRelease.tag_name;
|
||||||
|
const fileVersion = version.replace(/^v/, "");
|
||||||
|
const goFileVersion = goVersion.replace(/^v/, "");
|
||||||
|
const windowsAsset = homeRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".exe"));
|
||||||
|
const macAsset = homeRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".dmg"));
|
||||||
|
const goAsset = goRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".apk"));
|
||||||
|
const btnText = downloadBtn.querySelector(".download-btn-text");
|
||||||
|
if (btnText) {
|
||||||
|
btnText.textContent = `Download ${version}`;
|
||||||
}
|
}
|
||||||
|
if (windowsAsset?.url) {
|
||||||
const release = await response.json();
|
windowsDownload.href = windowsAsset.url;
|
||||||
|
} else {
|
||||||
const asset = release.assets?.links?.find(link =>
|
windowsDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/packages/generic/vyla-home/${version}/Vyla-Home_${fileVersion}_x64-setup.exe`;
|
||||||
link.name?.toLowerCase().endsWith(".exe")
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!asset?.url) {
|
|
||||||
throw new Error("No .exe asset found in latest release");
|
|
||||||
}
|
}
|
||||||
|
windowsDownload.querySelector("span").textContent = `Windows ${version}`;
|
||||||
buttons.forEach(button => {
|
if (goAsset?.url) {
|
||||||
if (button) {
|
goDownload.href = goAsset.url;
|
||||||
button.href = asset.url;
|
} else {
|
||||||
}
|
goDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/packages/generic/vyla-go/${goVersion}/vyla-go-${goFileVersion}.apk`;
|
||||||
|
}
|
||||||
|
goDownload.querySelector("span").textContent = `Android ${goVersion}`;
|
||||||
|
if (macAsset?.url) {
|
||||||
|
macDownload.href = macAsset.url;
|
||||||
|
} else {
|
||||||
|
macDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/packages/generic/vyla-home/${version}/Vyla-Home_${fileVersion}_aarch64.dmg`;
|
||||||
|
}
|
||||||
|
macDownload.querySelector("span").textContent = `Mac ${version}`;
|
||||||
|
downloadBtn.addEventListener("click", (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
const isExpanded = expandable.getAttribute("aria-expanded") === "true";
|
||||||
|
expandable.setAttribute("aria-expanded", String(!isExpanded));
|
||||||
|
downloadOptions.setAttribute("aria-hidden", String(isExpanded));
|
||||||
|
downloadOptions.classList.toggle("show", !isExpanded);
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
buttons.forEach(button => {
|
const btnText = downloadBtn.querySelector(".download-btn-text");
|
||||||
if (button) {
|
if (btnText) {
|
||||||
button.textContent = "Download Latest Release";
|
btnText.textContent = "Download Latest Release";
|
||||||
}
|
}
|
||||||
});
|
windowsDownload.querySelector("span").textContent = "Windows (Latest)";
|
||||||
|
goDownload.querySelector("span").textContent = "Android (Latest)";
|
||||||
|
macDownload.querySelector("span").textContent = "Mac (Latest)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setupExpandableDownload("cta-download-expandable", "cta-download-btn", "cta-download-options", "cta-windows-download", "cta-go-download", "cta-mac-download");
|
||||||
setupLatestDownload();
|
document.addEventListener("click", (e) => {
|
||||||
|
const expandables = document.querySelectorAll(".download-expandable");
|
||||||
|
expandables.forEach(expandable => {
|
||||||
|
const btn = expandable.querySelector("button");
|
||||||
|
const options = expandable.querySelector(".download-options");
|
||||||
|
if (btn && options && !expandable.contains(e.target)) {
|
||||||
|
expandable.setAttribute("aria-expanded", "false");
|
||||||
|
options.setAttribute("aria-hidden", "true");
|
||||||
|
options.classList.remove("show");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -400,7 +467,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img src="https://app.greenweb.org/api/v3/greencheckimage/vyla.cc?nocache=true"
|
<img src="https://app.greenweb.org/api/v3/greencheckimage/vyla.cc"
|
||||||
alt="This website runs on green hosting - verified by thegreenwebfoundation.org" width="200"
|
alt="This website runs on green hosting - verified by thegreenwebfoundation.org" width="200"
|
||||||
height="95" loading="lazy" decoding="async">
|
height="95" loading="lazy" decoding="async">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -307,53 +307,120 @@
|
|||||||
<div class="container cta-banner-content reveal">
|
<div class="container cta-banner-content reveal">
|
||||||
<h2 id="cta-heading" class="cta-banner-title">Try Vyla Home today</h2>
|
<h2 id="cta-heading" class="cta-banner-title">Try Vyla Home today</h2>
|
||||||
<p class="cta-banner-subtitle">Your Entertainment. Zero Servers Attached.</p>
|
<p class="cta-banner-subtitle">Your Entertainment. Zero Servers Attached.</p>
|
||||||
<a class="hero-cta hero-cta-light" id="cta-copy-script-btn" href="#" target="_blank"
|
<div class="download-expandable" id="cta-download-expandable" aria-expanded="false">
|
||||||
rel="noopener noreferrer">Download Now</a>
|
<button class="hero-cta hero-cta-light" id="cta-download-btn">
|
||||||
|
<span class="download-btn-text">Download Now</span>
|
||||||
|
<svg class="dropdown-arrow" width="17" height="17" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path d="M7 10l5 5 5-5z" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<div class="download-options" id="cta-download-options" aria-hidden="true">
|
||||||
|
<a href="#" class="download-option" id="cta-windows-download">
|
||||||
|
<svg class="windows-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path
|
||||||
|
d="M0 3.449L9.75 2.1v9.451H0m10.949-9.602L24 0v11.4H10.949M0 12.6h9.75v9.451L0 20.699M10.949 12.6H24V24l-12.949-1.951" />
|
||||||
|
</svg>
|
||||||
|
<span>Windows v0.0.0</span>
|
||||||
|
</a>
|
||||||
|
<a href="#" class="download-option" id="cta-mac-download">
|
||||||
|
<svg class="mac-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path
|
||||||
|
d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z" />
|
||||||
|
</svg>
|
||||||
|
<span>Mac v0.0.0</span>
|
||||||
|
</a>
|
||||||
|
<a href="#" class="download-option" id="cta-go-download">
|
||||||
|
<svg class="android-icon" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path
|
||||||
|
d="M17.6 9.2l1.5-2.6c.1-.2.1-.4-.1-.5-.2-.1-.4-.1-.5.1L17 8.8c-.9-.4-1.9-.6-3-.6s-2.1.2-3 .6L9.5 6.2c-.1-.2-.3-.2-.5-.1-.2.1-.2.3-.1.5l1.5 2.6C8.1 10.2 6.4 12.1 6 14.5h12c-.4-2.4-2.1-4.3-4.4-5.3zM9.5 13.2c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zm5 0c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7zM6 15h12v3.5c0 .8-.7 1.5-1.5 1.5h-9c-.8 0-1.5-.7-1.5-1.5V15zm2 5v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2zm10 0v2c0 .6-.4 1-1 1s-1-.4-1-1v-2h2z" />
|
||||||
|
</svg>
|
||||||
|
<span>Android v0.0.0</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
async function setupLatestDownload() {
|
async function setupExpandableDownload(expandableId, btnId, optionsId, windowsId, goId, macId) {
|
||||||
const buttons = [
|
const expandable = document.getElementById(expandableId);
|
||||||
document.getElementById("hero-copy-script-btn"),
|
const downloadBtn = document.getElementById(btnId);
|
||||||
document.getElementById("cta-copy-script-btn")
|
const downloadOptions = document.getElementById(optionsId);
|
||||||
];
|
const windowsDownload = document.getElementById(windowsId);
|
||||||
|
const goDownload = document.getElementById(goId);
|
||||||
|
const macDownload = document.getElementById(macId);
|
||||||
|
if (!expandable || !downloadBtn || !downloadOptions || !windowsDownload || !goDownload || !macDownload) return;
|
||||||
try {
|
try {
|
||||||
const project = "vyla-entertainment%2Fhome";
|
const [homeResponse, goResponse] = await Promise.all([
|
||||||
|
fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/releases/permalink/latest"),
|
||||||
const response = await fetch(
|
fetch("https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/releases/permalink/latest")
|
||||||
`https://gitlab.com/api/v4/projects/${project}/releases/permalink/latest`
|
]);
|
||||||
);
|
if (!homeResponse.ok) throw new Error("Failed to fetch latest home release");
|
||||||
|
if (!goResponse.ok) throw new Error("Failed to fetch latest go release");
|
||||||
if (!response.ok) {
|
const homeRelease = await homeResponse.json();
|
||||||
throw new Error(`Failed to fetch latest release: ${response.status}`);
|
const goRelease = await goResponse.json();
|
||||||
|
const version = homeRelease.tag_name;
|
||||||
|
const goVersion = goRelease.tag_name;
|
||||||
|
const fileVersion = version.replace(/^v/, "");
|
||||||
|
const goFileVersion = goVersion.replace(/^v/, "");
|
||||||
|
const windowsAsset = homeRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".exe"));
|
||||||
|
const macAsset = homeRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".dmg"));
|
||||||
|
const goAsset = goRelease.assets?.links?.find(link => link.name?.toLowerCase().endsWith(".apk"));
|
||||||
|
const btnText = downloadBtn.querySelector(".download-btn-text");
|
||||||
|
if (btnText) {
|
||||||
|
btnText.textContent = `Download ${version}`;
|
||||||
}
|
}
|
||||||
|
if (windowsAsset?.url) {
|
||||||
const release = await response.json();
|
windowsDownload.href = windowsAsset.url;
|
||||||
|
} else {
|
||||||
const asset = release.assets?.links?.find(link =>
|
windowsDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/packages/generic/vyla-home/${version}/Vyla-Home_${fileVersion}_x64-setup.exe`;
|
||||||
link.name?.toLowerCase().endsWith(".exe")
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!asset?.url) {
|
|
||||||
throw new Error("No .exe asset found in latest release");
|
|
||||||
}
|
}
|
||||||
|
windowsDownload.querySelector("span").textContent = `Windows ${version}`;
|
||||||
buttons.forEach(button => {
|
if (goAsset?.url) {
|
||||||
if (button) {
|
goDownload.href = goAsset.url;
|
||||||
button.href = asset.url;
|
} else {
|
||||||
}
|
goDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fgo/packages/generic/vyla-go/${goVersion}/vyla-go-${goFileVersion}.apk`;
|
||||||
|
}
|
||||||
|
goDownload.querySelector("span").textContent = `Android ${goVersion}`;
|
||||||
|
if (macAsset?.url) {
|
||||||
|
macDownload.href = macAsset.url;
|
||||||
|
} else {
|
||||||
|
macDownload.href = `https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/packages/generic/vyla-home/${version}/Vyla-Home_${fileVersion}_aarch64.dmg`;
|
||||||
|
}
|
||||||
|
macDownload.querySelector("span").textContent = `Mac ${version}`;
|
||||||
|
downloadBtn.addEventListener("click", (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
const isExpanded = expandable.getAttribute("aria-expanded") === "true";
|
||||||
|
expandable.setAttribute("aria-expanded", String(!isExpanded));
|
||||||
|
downloadOptions.setAttribute("aria-hidden", String(isExpanded));
|
||||||
|
downloadOptions.classList.toggle("show", !isExpanded);
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
buttons.forEach(button => {
|
const btnText = downloadBtn.querySelector(".download-btn-text");
|
||||||
if (button) {
|
if (btnText) {
|
||||||
button.textContent = "Download Latest Release";
|
btnText.textContent = "Download Latest Release";
|
||||||
}
|
}
|
||||||
});
|
windowsDownload.querySelector("span").textContent = "Windows (Latest)";
|
||||||
|
goDownload.querySelector("span").textContent = "Android (Latest)";
|
||||||
|
macDownload.querySelector("span").textContent = "Mac (Latest)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setupExpandableDownload("cta-download-expandable", "cta-download-btn", "cta-download-options", "cta-windows-download", "cta-go-download", "cta-mac-download");
|
||||||
setupLatestDownload();
|
document.addEventListener("click", (e) => {
|
||||||
|
const expandables = document.querySelectorAll(".download-expandable");
|
||||||
|
expandables.forEach(expandable => {
|
||||||
|
const btn = expandable.querySelector("button");
|
||||||
|
const options = expandable.querySelector(".download-options");
|
||||||
|
if (btn && options && !expandable.contains(e.target)) {
|
||||||
|
expandable.setAttribute("aria-expanded", "false");
|
||||||
|
options.setAttribute("aria-hidden", "true");
|
||||||
|
options.classList.remove("show");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -387,7 +454,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img src="https://app.greenweb.org/api/v3/greencheckimage/vyla.cc?nocache=true"
|
<img src="https://app.greenweb.org/api/v3/greencheckimage/vyla.cc"
|
||||||
alt="This website runs on green hosting - verified by thegreenwebfoundation.org" width="200"
|
alt="This website runs on green hosting - verified by thegreenwebfoundation.org" width="200"
|
||||||
height="95" loading="lazy" decoding="async">
|
height="95" loading="lazy" decoding="async">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user