Skip to content

Commit

Permalink
Separate buttons per OS
Browse files Browse the repository at this point in the history
  • Loading branch information
dex4er committed Jan 18, 2025
1 parent 1bfbca6 commit 06a66e4
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 54 deletions.
217 changes: 167 additions & 50 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,71 +42,180 @@ <h2>Free Open Source Kubernetes IDE</h2>
</section>
<section class="download-section">
<p>Freelens is a free Kubernetes UI for Linux, MacOS and Windows</p>
<div class="download-container">
<button id="download-button" class="download-button">
Download <span class="arrow down"></span>
</button>
<div id="download-links" class="integrated">
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-amd64.AppImage"
>Linux amd64 AppImage</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-amd64.deb"
>Linux amd64 .deb</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-amd64.rpm"
>Linux amd64 .rpm</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-arm64.AppImage"
>Linux arm64 AppImage</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-arm64.deb"
>Linux arm64 .deb</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-arm64.rpm"
>Linux arm64 .rpm</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-macos-amd64.pkg"
>MacOS amd64 .pkg</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-macos-arm64.pkg"
>MacOS arm64 .pkg</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-windows-amd64.exe"
>Windows amd64 .exe</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-windows-amd64.msi"
>Windows amd64 .msi</a
>
</div>
</div>
<table>
<tr>
<td>
<button id="macos-download-button" class="download-button">
<ion-icon name="logo-apple"></ion-icon> Download for Mac<span
class="arrow down"
></span>
</button>
</td>
<td>
<button id="windows-download-button" class="download-button">
<ion-icon name="logo-windows"></ion-icon> Download for
Windows<span class="arrow down"></span>
</button>
</td>
<td>
<button id="linux-download-button" class="download-button">
<ion-icon name="logo-tux"></ion-icon> Download for Linux<span
class="arrow down"
></span>
</button>
</td>
</tr>
<tr>
<td>
<div class="download-container">
<div id="macos-download-links" class="download-links">
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-macos-arm64.pkg"
>PKG installer for M1 or newer</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-macos-arm64.dmg"
>DMG image for M1 or newer</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-macos-amd64.pkg"
>PKG installer for Intel-based</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-macos-amd64.dmg"
>DMG image for Intel-based</a
>
</div>
</div>
</td>
<td>
<div class="download-container">
<div id="windows-download-links" class="download-links">
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-windows-amd64.exe"
>EXE installer for x64</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-windows-amd64.msi"
>MSI installer for x64</a
>
</div>
</div>
</td>
<td>
<div class="download-container">
<div id="linux-download-links" class="download-links">
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-amd64.AppImage"
>AppImage for amd64 (x86_64)</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-amd64.deb"
>DEB package for amd64 (x86_64)</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-amd64.rpm"
>RPM package for amd64 (x86_64)</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-arm64.AppImage"
>AppImage for arm64 (aarch64)</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-arm64.deb"
>DEB package for arm64 (aarch64)</a
>
<a
href="https://github.com/freelensapp/freelens/releases/download/v0.1.2/Freelens-0.1.2-linux-arm64.rpm"
>RPM package for arm64 (aarch64)</a
>
</div>
</div>
</td>
</tr>
</table>
</section>
</main>
<footer>
<p>&copy; 2024-2025 Freelens Authors</p>
</footer>
<script>
document
.getElementById("download-button")
.getElementById("macos-download-button")
.addEventListener("click", function () {
var links = document.getElementById("download-links");
var links = document.getElementById("macos-download-links");
if (links.style.display === "none" || links.style.display === "") {
links.style.display = "block";
this.querySelector(".arrow").classList.add("up");
scrollToSection("download-links");
scrollToSection("macos-download-links");
} else {
links.style.display = "none";
this.querySelector(".arrow").classList.remove("up");
}
document.getElementById("windows-download-links").style.display =
"none";
document
.getElementById("windows-download-button")
.querySelector(".arrow")
.classList.remove("up");
document.getElementById("linux-download-links").style.display =
"none";
document
.getElementById("linux-download-button")
.querySelector(".arrow")
.classList.remove("up");
});

document
.getElementById("windows-download-button")
.addEventListener("click", function () {
var links = document.getElementById("windows-download-links");
if (links.style.display === "none" || links.style.display === "") {
links.style.display = "block";
this.querySelector(".arrow").classList.add("up");
scrollToSection("windows-download-links");
} else {
links.style.display = "none";
this.querySelector(".arrow").classList.remove("up");
}
document.getElementById("macos-download-links").style.display =
"none";
document
.getElementById("macos-download-button")
.querySelector(".arrow")
.classList.remove("up");
document.getElementById("linux-download-links").style.display =
"none";
document
.getElementById("linux-download-button")
.querySelector(".arrow")
.classList.remove("up");
});

document
.getElementById("linux-download-button")
.addEventListener("click", function () {
var links = document.getElementById("linux-download-links");
if (links.style.display === "none" || links.style.display === "") {
links.style.display = "block";
this.querySelector(".arrow").classList.add("up");
scrollToSection("linux-download-links");
} else {
links.style.display = "none";
this.querySelector(".arrow").classList.remove("up");
}
document.getElementById("macos-download-links").style.display =
"none";
document
.getElementById("macos-download-button")
.querySelector(".arrow")
.classList.remove("up");
document.getElementById("windows-download-links").style.display =
"none";
document
.getElementById("windows-download-button")
.querySelector(".arrow")
.classList.remove("up");
});

function scrollToSection(id) {
Expand All @@ -117,5 +226,13 @@ <h2>Free Open Source Kubernetes IDE</h2>
});
}
</script>
<script
type="module"
src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.esm.js"
></script>
<script
nomodule
src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.js"
></script>
</body>
</html>
13 changes: 9 additions & 4 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ main {
border-radius: 8px; /* Aggiunto bordo arrotondato */
}

table {
margin-left: auto;
margin-right: auto;
}

.description {
margin-bottom: 20px;
}
Expand Down Expand Up @@ -106,7 +111,7 @@ main {
-webkit-transform: rotate(-135deg);
}

#download-links {
.download-links {
display: none;
background-color: #ffffff; /* Modificato a bianco per maggiore contrasto */
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
Expand All @@ -123,22 +128,22 @@ main {
overflow-y: auto; /* Permette lo scorrimento verticale */
}

#download-links.integrated {
.download-links {
position: static;
transform: none;
margin: 10px auto;
max-height: none;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Aggiorna ombra */
}

#download-links a {
.download-links a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}

#download-links a:hover {
.download-links a:hover {
background-color: #f1f1f1;
}

Expand Down

0 comments on commit 06a66e4

Please sign in to comment.