Radish alpha
r
rad:z371PVmDHdjJucejRoRYJcDEvD5pp
Radicle website including documentation and guides
Radicle
Git
Show live release information
Alexis Sellier committed 2 years ago
commit aca3151fe85c810569e0dc625a8b5b00da261304
parent 517ec79
2 files changed +55 -1
added _includes/latest-release.html
@@ -0,0 +1,54 @@
+
<style>
+
  #release {
+
    display: flex;
+
    align-items: center;
+
    gap: 0.5rem;
+
  }
+
  .loading .release-info {
+
    display: none;
+
  }
+
  .loading .release-loader {
+
    display: inline-block;
+
  }
+
  .release-loader {
+
    display: none;
+
    border: 2px solid var(--color-border-hint);
+
    border-top: 2px solid var(--color-border-default);
+
    border-right: 2px solid var(--color-border-default);
+
    border-radius: 50%;
+
    height: 1rem;
+
    width: 1rem;
+
    animation: spin 1s linear infinite;
+
  }
+
  #release-timestamp {
+
    color: var(--color-fg-low-contrast);
+
  }
+

+
  @keyframes spin {
+
    0% { transform: rotate(0deg); }
+
    100% { transform: rotate(360deg); }
+
  }
+
</style>
+

+
<blockquote id="release" class="loading">
+
  <strong>Latest release</strong> 💾
+
  <span class="release-loader"></span>
+
  <span>
+
    <a href="https://files.radicle.xyz/latest" id="release-info"></a> &middot; <span id="release-timestamp"></span>
+
  </span>
+
</blockquote>
+

+
<script>
+
  fetch("https://files.radicle.xyz/latest/version.json")
+
    .then(res => res.json())
+
    .then(data => {
+
      const version = data.version;
+
      const commit = data.commit;
+
      const release = document.getElementById("release");
+
      const releaseInfo = document.getElementById("release-info");
+

+
      release.classList.remove("loading");
+
      releaseInfo.innerText = `Radicle v${version} (${commit})`;
+
      document.getElementById("release-timestamp").innerText = new Date(data.timestamp * 1000).toUTCString();
+
    });
+
</script>
modified index.md
@@ -19,7 +19,7 @@ Radicle is an open source, peer-to-peer code collaboration stack. It leverages G

# Get started

-
> **Latest release** 💾 [Radicle v0.8.0 (570a7eb)][binaries] - March 11 2024
+
{% include latest-release.html %}

To install Radicle on your system, simply run the [install
script][install-script] from a POSIX shell. For now, Radicle only works on