Skip to content

Commit

Permalink
Support for 20.4 and 20.3 and Added a new Versions page
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimatChamp committed Dec 10, 2023
1 parent 2c71d6f commit b958af9
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 12 deletions.
8 changes: 3 additions & 5 deletions assets/js/neoforge.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ async function loadLatestVersions(minecraftVersions) {
gav = LEGACY_GAV;
fn = "forge";
mcvers = "1.20.1";
note = `<b>Note:</b> This file is still called <i>forge</i> because we're trying to maintain compatibility with launchers, assuming they don't hardcode things too much.`;
badges_new = "";
badges_beta = "";
dropDown_VAL = "";
} else {
gav = FORGE_GAV;
fn = "neoforge";
mcvers = `1.${mcVersion}`;
note="";
badges_new = `<font class="badges_new">NEW</font>`;
badges_beta = "";
dropDown_VAL = ` open="open"`;
Expand Down Expand Up @@ -59,10 +57,10 @@ async function loadLatestVersions(minecraftVersions) {
<summary class="fileinfo__header">${badges_beta} ${badges_new} NeoForge ${version} for Minecraft ${mcvers}</summary>
<div class="fileinfo__body">
<a href="${installerUrl}"><span class="fileinfo__icon"><i class="bi-file-earmark-zip-fill" style="font-size: 2rem;"></i></span>
<span class="fileinfo__content"><span>Latest <em>NeoForge</em> Installer</span><span>${fn}-${version}-installer.jar</span></span></a>
<span class="fileinfo__content"><span>Latest <em>NeoForge</em> Installer</span><span>${fn}-${version}-installer.jar</span></span></a>
<a href="${changelogUrl}"><span class="fileinfo__icon"><i class="bi-file-earmark-text-fill" style="font-size: 2rem;"></i></span>
<span class="fileinfo__content"><span>Latest Changelog</span><span>${version}</span></span></a>
</div>${note}
<span class="fileinfo__content"><span>Latest Changelog</span><span>${version}</span></span></a>
</div>
</details>
`;
}
Expand Down
5 changes: 2 additions & 3 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ description: |
# NeoForge installer files
You can find a direct link to our latest installer files below.

{{< files "20.2" >}}

{{< files "1.20.1" >}}
{{< files "20.4" >}}
{{< versions >}}

# Using NeoForge for mod development

Expand Down
15 changes: 15 additions & 0 deletions content/versions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "All Versions"
Description: "A list of all the versions of Neoforge!"
author: "none"
---

## Hard-coded Versions
These versions are **hard-coded** and thus do not support _Forge-dependent mods_.
{{< files "20.4" >}}
{{< files "20.3" >}}
{{< files "20.2" >}}

## Forge-compatible Versions
These versions support the _Forge-dependent mods_ for the _Minecraft release_.
{{< files "1.20.1" >}}
1 change: 1 addition & 0 deletions layouts/shortcodes/versions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a id="versions" href="/versions/">See All Versions ➤</a>
6 changes: 3 additions & 3 deletions themes/mainroad/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1058,21 +1058,21 @@ details {
}

details:hover {
border: .15rem solid var(--color-border);
border: .15rem solid;
}

summary:hover {
filter: brightness(.85);
}

/* Installer */
.fileinfo {
.fileinfo, #versions {
text-align: center;
margin: 0 0 20px;
margin: 0 0 1.25rem;
}

.fileinfo .fileinfo__header {
.fileinfo .fileinfo__header, #versions {
padding: 10px 15px;
padding: .625rem .9375rem;
font-size: 16px;
Expand Down
7 changes: 6 additions & 1 deletion themes/mainroad/layouts/partials/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,13 @@ textarea {
background: var(--color-highlight);
}

/* Installer Dropdowns */
details:hover {
border-color: var(--color-border);
}

/* Installer */
.fileinfo {
.fileinfo, #versions {
background-color: var(--color-box);
}

Expand Down

1 comment on commit b958af9

@neoforged-pages-deployments
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploying with Cloudflare Pages

Name Result
Last commit: b958af99780335f196ccad015e6f5a8ac0ec76d4
Status: ✅ Deploy successful!
Preview URL: https://4588b637.neoforged-website-previews.pages.dev
PR Preview URL: https://pr-15.neoforged-website-previews.pages.dev

Please sign in to comment.