mirror of
https://github.com/godotengine/godot-website.git
synced 2025-12-31 09:48:43 +03:00
Add the download archive page
This commit is contained in:
17
_includes/download-version-script.html
Normal file
17
_includes/download-version-script.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const downloadToggles = document.querySelectorAll('.preview-download-toggle');
|
||||
downloadToggles.forEach((item) => {
|
||||
const toggleLink = item.querySelector('h4');
|
||||
toggleLink.addEventListener('click', (e) => {
|
||||
if (item.classList.contains('active')) {
|
||||
item.classList.remove('active');
|
||||
toggleLink.textContent = 'Show all downloads';
|
||||
} else {
|
||||
item.classList.add('active');
|
||||
toggleLink.textContent = 'Hide all downloads';
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
294
_includes/download-version.html
Normal file
294
_includes/download-version.html
Normal file
@@ -0,0 +1,294 @@
|
||||
<style>
|
||||
.preview-download {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.preview-download h3 {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.preview-download-meta {
|
||||
color: var(--secondary-color-text);
|
||||
font-size: 17px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.preview-download-primary {
|
||||
display: grid;
|
||||
grid-template-columns: 3fr 2fr;
|
||||
gap: 60px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.preview-download-primary {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-notes {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.notes-summary {
|
||||
display: grid;
|
||||
gap: 24px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.notes-thumbnail {
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
background-color: var(--card-background-color);
|
||||
border-radius: 7px;
|
||||
box-shadow: 0 5px 10px -3px #00000078;
|
||||
aspect-ratio: 16 / 9;
|
||||
max-height: 260px;
|
||||
}
|
||||
|
||||
.notes-excerpt {
|
||||
color: var(--base-color-text);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.notes-buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 42px;
|
||||
min-height: 54px;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.notes-buttons {
|
||||
flex-direction: column;
|
||||
gap: 36px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.btn.btn-release-notes {
|
||||
background-color: var(--button-card-background-color);
|
||||
color: var(--base-color-text);
|
||||
}
|
||||
|
||||
.btn.btn-release-changelog {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
color: var(--link-color);
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.download-primaries {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.download-primaries .btn-download-primary {
|
||||
margin-bottom: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.download-primaries .btn-download-primary:nth-child(2n) {
|
||||
background-color: rgb(132 151 174 / 68%);
|
||||
-webkit-backdrop-filter: blur(4px);
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
.download-primaries .btn-download-primary:nth-child(2n) .download-title {
|
||||
color: #f7f7f7;
|
||||
}
|
||||
.download-primaries .btn-download-primary:nth-child(2n) .download-hint {
|
||||
background-color: var(--primary-color-subdued);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.download-primaries .btn.btn-download-primary .download-title {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.download-primaries .btn.btn-download-primary .download-title {
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-download-toggle {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.preview-download-toggle {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-download-toggle h4 {
|
||||
color: var(--link-color);
|
||||
cursor: pointer;
|
||||
margin-top: 32px;
|
||||
text-align: right;
|
||||
/* Prevent color transitions from being too fast (for epilepsy). */
|
||||
transition: 0.1s filter;
|
||||
filter: brightness(100%);
|
||||
}
|
||||
.preview-download-toggle h4:hover {
|
||||
filter: brightness(117.5%);
|
||||
}
|
||||
.preview-download-toggle h4:active {
|
||||
filter: brightness(82.5%);
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.preview-download-toggle h4 {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-download-links {
|
||||
background-color: var(--download-table-color);
|
||||
border-left: 6px solid var(--accent-color);
|
||||
padding: 4px 16px;
|
||||
display: none;
|
||||
}
|
||||
.preview-download-toggle.active + .preview-download-links {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.preview-download-links .download {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
align-items: flex-end;
|
||||
gap: 6px;
|
||||
border-bottom: 1px dashed var(--table-divider-color);
|
||||
margin-bottom: 8px;
|
||||
padding: 2px 0;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.preview-download-links .download {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-download-links .download-details {
|
||||
color: var(--secondary-color-text);
|
||||
font-size: 14px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="card base-padding preview-download">
|
||||
{% assign release_version = include.version | make_release_version: include.release %}
|
||||
|
||||
<h3 id="{{ release_version.name }}-{{ release_version.flavor }}">
|
||||
Godot {{ release_version.name }}-{{ release_version.flavor }}
|
||||
</h3>
|
||||
|
||||
<p class="preview-download-meta">
|
||||
{% unless release_version.release_date == empty %}
|
||||
<span>{{ release_version.release_date }}</span>
|
||||
{% endunless %}
|
||||
</p>
|
||||
|
||||
<div class="preview-download-primary">
|
||||
<div class="preview-notes">
|
||||
{% unless release_version.release_notes == empty %}
|
||||
{% assign release_article = site.article | find: "url", release_version.release_notes %}
|
||||
|
||||
{% unless release_article == empty %}
|
||||
<div class="notes-summary">
|
||||
<div class="notes-thumbnail" style="background-image: url('{{ release_article.image }}');"></div>
|
||||
<div class="notes-excerpt">
|
||||
{{ release_article.excerpt }}
|
||||
</div>
|
||||
</div>
|
||||
{% endunless %}
|
||||
{% else %}
|
||||
<div class="notes-excerpt">
|
||||
Release notes are not ready yet. You can check the complete list of changes using our interactive changelog.
|
||||
</div>
|
||||
{% endunless %}
|
||||
|
||||
<div class="notes-buttons">
|
||||
{% unless release_version.release_notes == empty %}
|
||||
{% assign release_article = site.article | find: "url", release_version.release_notes %}
|
||||
{% unless release_article == empty %}
|
||||
<a class="btn btn-release-notes" href="{{ release_article.url }}">Read more</a>
|
||||
{% endunless %}
|
||||
{% endunless %}
|
||||
|
||||
<a class="btn btn-release-changelog" href="https://godotengine.github.io/godot-interactive-changelog/#{{ release_version.name }}-{{ release_version.flavor }}">View complete changelog</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Main downloads</h4>
|
||||
<div class="download-primaries">
|
||||
{% assign download_primary = release_version | get_download_primary: false %}
|
||||
{% for primary in download_primary %}
|
||||
{% comment %}
|
||||
When iterating over a hash, you get an array. 0-th item is the key, and
|
||||
1-st item is the value.
|
||||
{% endcomment %}
|
||||
{% assign platform_info = site.data.download_platforms | find: "name", primary[1] %}
|
||||
|
||||
<a href="{{ release_version | make_download: primary[1], false, "tuxfamily" }}" class="btn btn-download btn-download-primary">
|
||||
<div class="download-title">
|
||||
<img width="24" height="24" src="/assets/images/platforms/{{ primary[0] | split: "_" | join: "-" }}.svg" title="{{ platform_info.title }}" alt="{{ platform_info.title }}" />
|
||||
{{ platform_info.title }}
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{% assign mono_download = release_version | make_download: primary[1], true, "tuxfamily" %}
|
||||
{% if mono_download == "#" %}
|
||||
<div></div>
|
||||
{% else %}
|
||||
<a href="{{ mono_download }}" class="btn btn-download btn-download-primary">
|
||||
<div class="download-title">
|
||||
.NET
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="preview-download-toggle">
|
||||
<h4>Show all downloads</h4>
|
||||
</div>
|
||||
|
||||
<div class="preview-download-links">
|
||||
{% assign download_platforms = release_version | get_download_platforms: false %}
|
||||
{% for platform in download_platforms %}
|
||||
{% assign platform_info = site.data.download_platforms | find: "name", platform %}
|
||||
|
||||
<div class="download">
|
||||
<span>
|
||||
<a href="{{ release_version | make_download: platform, false, "tuxfamily" }}">
|
||||
{{ platform_info.title }}
|
||||
{% unless platform_info.caption == empty %} - {{ platform_info.caption }}{% endunless %}
|
||||
</a>
|
||||
</span>
|
||||
<span class="download-details">
|
||||
{% for tag in platform_info.tags %}{% if forloop.index > 1 %} · {% endif %}{{ tag }}{% endfor %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% assign mono_download = release_version | make_download: platform, true, "tuxfamily" %}
|
||||
{% unless mono_download == "#" %}
|
||||
<div class="download">
|
||||
<a href="{{ mono_download }}">
|
||||
{{ platform_info.title }} - .NET
|
||||
{% unless platform_info.caption == empty %} - {{ platform_info.caption }}{% endunless %}
|
||||
</a>
|
||||
<span class="download-details">
|
||||
{% for tag in platform_info.tags %}{{ tag }} · {% endfor %}C# support
|
||||
</span>
|
||||
</div>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,7 +83,15 @@ module MakeDownloadFilter
|
||||
if platform == "aar_library"
|
||||
download_file = "godot-lib.#{version_name}.#{version_flavor}.#{download_slug}"
|
||||
else
|
||||
download_file = "Godot_v#{version_name}-#{version_flavor}_#{download_slug}"
|
||||
version_bits = version_name.split(".")
|
||||
version_majmin = "#{version_bits[0]}.#{version_bits[1]}"
|
||||
|
||||
# Format was slightly different up until 2.1.
|
||||
if version_bits[0] == "1" or (version_bits[0] == "2" and version_bits[1] == "0")
|
||||
download_file = "Godot_v#{version_name}_#{version_flavor}_#{download_slug}"
|
||||
else
|
||||
download_file = "Godot_v#{version_name}-#{version_flavor}_#{download_slug}"
|
||||
end
|
||||
end
|
||||
|
||||
if host == "github"
|
||||
@@ -99,6 +107,19 @@ module MakeDownloadFilter
|
||||
end
|
||||
end
|
||||
|
||||
def make_release_version(input, release)
|
||||
if release.nil?
|
||||
return input
|
||||
end
|
||||
|
||||
new_version = input.dup
|
||||
new_version["flavor"] = release["name"]
|
||||
new_version["release_date"] = release["release_date"]
|
||||
new_version["release_notes"] = release["release_notes"]
|
||||
|
||||
return new_version
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def get_download_slugs(input, mono = false)
|
||||
|
||||
119
pages/download/archive.html
Normal file
119
pages/download/archive.html
Normal file
@@ -0,0 +1,119 @@
|
||||
---
|
||||
permalink: /download/archive/index.html
|
||||
title: "Godot download archive - Godot Engine"
|
||||
description: "Download any officially published version of Godot for Linux, macOS, Windows, or Android"
|
||||
layout: default
|
||||
---
|
||||
|
||||
{% include header.html %}
|
||||
|
||||
<link rel="stylesheet" href="/assets/css/transparent-nav.css">
|
||||
<link rel="stylesheet" href="/assets/css/download.css?2">
|
||||
<style>
|
||||
.hero {
|
||||
background-image: url('');
|
||||
}
|
||||
|
||||
.hero-blurb {
|
||||
color: var(--download-hero-color);
|
||||
}
|
||||
|
||||
.preview-cards {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.stable-download {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
background-color: var(--dark-color);
|
||||
padding: 24px;
|
||||
padding-bottom: 60px;
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.stable-download {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.stable-download h2 {
|
||||
color: var(--dark-color-text-title);
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.stable-download p {
|
||||
color: var(--dark-color-text);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.stable-download-ready {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 26px;
|
||||
}
|
||||
|
||||
.stable-download-ready .btn-download {
|
||||
min-width: 310px;
|
||||
}
|
||||
|
||||
.stable-download-ready .btn-download:nth-of-type(2n) {
|
||||
background-color: rgb(132 151 174 / 68%);
|
||||
-webkit-backdrop-filter: blur(4px);
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
.stable-download-ready .btn-download:nth-of-type(2n) .download-title {
|
||||
color: #f7f7f7;
|
||||
}
|
||||
.stable-download-ready .btn-download:nth-of-type(2n) .download-hint {
|
||||
background-color: var(--primary-color-subdued);
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="hero">
|
||||
<div class="hero-wrapper">
|
||||
<h1>Godot download archive</h1>
|
||||
|
||||
<div class="hero-blurb">
|
||||
<p>
|
||||
Download any officially published release of the engine.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="padded" style="padding-top:0;margin-top:32px">
|
||||
<h2>Official releases</h2>
|
||||
|
||||
<div class="preview-cards">
|
||||
{% for version in site.data.versions %}
|
||||
|
||||
{% include download-version.html version=version %}
|
||||
|
||||
{% for release in version.releases %}
|
||||
|
||||
{% include download-version.html version=version release=release %}
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include download-version-script.html %}
|
||||
|
||||
{% include footer.html %}
|
||||
@@ -24,184 +24,6 @@ layout: default
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.preview-download {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.preview-download h3 {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.preview-download-meta {
|
||||
color: var(--secondary-color-text);
|
||||
font-size: 17px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.preview-download-primary {
|
||||
display: grid;
|
||||
grid-template-columns: 3fr 2fr;
|
||||
gap: 60px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.preview-download-primary {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-notes {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.notes-summary {
|
||||
display: grid;
|
||||
gap: 24px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.notes-thumbnail {
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
background-color: var(--card-background-color);
|
||||
border-radius: 7px;
|
||||
box-shadow: 0 5px 10px -3px #00000078;
|
||||
aspect-ratio: 16 / 9;
|
||||
max-height: 260px;
|
||||
}
|
||||
|
||||
.notes-excerpt {
|
||||
color: var(--base-color-text);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.notes-buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 42px;
|
||||
min-height: 54px;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.notes-buttons {
|
||||
flex-direction: column;
|
||||
gap: 36px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.btn.btn-release-notes {
|
||||
background-color: var(--button-card-background-color);
|
||||
color: var(--base-color-text);
|
||||
}
|
||||
|
||||
.btn.btn-release-changelog {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
color: var(--link-color);
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.download-primaries {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.download-primaries .btn-download-primary {
|
||||
margin-bottom: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.download-primaries .btn-download-primary:nth-child(2n) {
|
||||
background-color: rgb(132 151 174 / 68%);
|
||||
-webkit-backdrop-filter: blur(4px);
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
.download-primaries .btn-download-primary:nth-child(2n) .download-title {
|
||||
color: #f7f7f7;
|
||||
}
|
||||
.download-primaries .btn-download-primary:nth-child(2n) .download-hint {
|
||||
background-color: var(--primary-color-subdued);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.download-primaries .btn.btn-download-primary .download-title {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.download-primaries .btn.btn-download-primary .download-title {
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-download-toggle {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.preview-download-toggle {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-download-toggle h4 {
|
||||
color: var(--link-color);
|
||||
cursor: pointer;
|
||||
margin-top: 32px;
|
||||
text-align: right;
|
||||
/* Prevent color transitions from being too fast (for epilepsy). */
|
||||
transition: 0.1s filter;
|
||||
filter: brightness(100%);
|
||||
}
|
||||
.preview-download-toggle h4:hover {
|
||||
filter: brightness(117.5%);
|
||||
}
|
||||
.preview-download-toggle h4:active {
|
||||
filter: brightness(82.5%);
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.preview-download-toggle h4 {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-download-links {
|
||||
background-color: var(--download-table-color);
|
||||
border-left: 6px solid var(--accent-color);
|
||||
padding: 4px 16px;
|
||||
display: none;
|
||||
}
|
||||
.preview-download-toggle.active + .preview-download-links {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.preview-download-links .download {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
align-items: flex-end;
|
||||
gap: 6px;
|
||||
border-bottom: 1px dashed var(--table-divider-color);
|
||||
margin-bottom: 8px;
|
||||
padding: 2px 0;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.preview-download-links .download {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-download-links .download-details {
|
||||
color: var(--secondary-color-text);
|
||||
font-size: 14px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.stable-download {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -291,118 +113,7 @@ layout: default
|
||||
{% for version in site.data.versions %}
|
||||
{% unless stable_versions contains version %}
|
||||
|
||||
<div class="card base-padding preview-download">
|
||||
<h3 id="{{ version.name }}-{{ version.flavor }}">
|
||||
Godot {{ version.name }}-{{ version.flavor }}
|
||||
</h3>
|
||||
|
||||
<p class="preview-download-meta">
|
||||
{% unless version.release_date == empty %}
|
||||
<span>{{ version.release_date }}</span>
|
||||
{% endunless %}
|
||||
</p>
|
||||
|
||||
<div class="preview-download-primary">
|
||||
<div class="preview-notes">
|
||||
{% unless version.release_notes == empty %}
|
||||
{% assign release_article = site.article | find: "url", version.release_notes %}
|
||||
|
||||
{% unless release_article == empty %}
|
||||
<div class="notes-summary">
|
||||
<div class="notes-thumbnail" style="background-image: url('{{ release_article.image }}');"></div>
|
||||
<div class="notes-excerpt">
|
||||
{{ release_article.excerpt }}
|
||||
</div>
|
||||
</div>
|
||||
{% endunless %}
|
||||
{% else %}
|
||||
<div class="notes-excerpt">
|
||||
Release notes are not ready yet. You can check the complete list of changes using our interactive changelog.
|
||||
</div>
|
||||
{% endunless %}
|
||||
|
||||
<div class="notes-buttons">
|
||||
{% unless version.release_notes == empty %}
|
||||
{% assign release_article = site.article | find: "url", version.release_notes %}
|
||||
{% unless release_article == empty %}
|
||||
<a class="btn btn-release-notes" href="{{ release_article.url }}">Read more</a>
|
||||
{% endunless %}
|
||||
{% endunless %}
|
||||
|
||||
<a class="btn btn-release-changelog" href="https://godotengine.github.io/godot-interactive-changelog/#{{ version.name }}-{{ version.flavor }}">View complete changelog</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Main downloads</h4>
|
||||
<div class="download-primaries">
|
||||
{% assign download_primary = version | get_download_primary: false %}
|
||||
{% for primary in download_primary %}
|
||||
{% comment %}
|
||||
When iterating over a hash, you get an array. 0-th item is the key, and
|
||||
1-st item is the value.
|
||||
{% endcomment %}
|
||||
{% assign platform_info = site.data.download_platforms | find: "name", primary[1] %}
|
||||
|
||||
<a href="{{ version | make_download: primary[1], false, "tuxfamily" }}" class="btn btn-download btn-download-primary">
|
||||
<div class="download-title">
|
||||
<img width="24" height="24" src="/assets/images/platforms/{{ primary[0] | split: "_" | join: "-" }}.svg" title="{{ platform_info.title }}" alt="{{ platform_info.title }}" />
|
||||
{{ platform_info.title }}
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{% assign mono_download = version | make_download: primary[1], true, "tuxfamily" %}
|
||||
{% if mono_download == "#" %}
|
||||
<div></div>
|
||||
{% else %}
|
||||
<a href="{{ mono_download }}" class="btn btn-download btn-download-primary">
|
||||
<div class="download-title">
|
||||
.NET
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="preview-download-toggle">
|
||||
<h4>Show all downloads</h4>
|
||||
</div>
|
||||
|
||||
<div class="preview-download-links">
|
||||
{% assign download_platforms = version | get_download_platforms: false %}
|
||||
{% for platform in download_platforms %}
|
||||
{% assign platform_info = site.data.download_platforms | find: "name", platform %}
|
||||
|
||||
<div class="download">
|
||||
<span>
|
||||
<a href="{{ version | make_download: platform, false, "tuxfamily" }}">
|
||||
{{ platform_info.title }}
|
||||
{% unless platform_info.caption == empty %} - {{ platform_info.caption }}{% endunless %}
|
||||
</a>
|
||||
</span>
|
||||
<span class="download-details">
|
||||
{% for tag in platform_info.tags %}{% if forloop.index > 1 %} · {% endif %}{{ tag }}{% endfor %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% assign mono_download = version | make_download: platform, true, "tuxfamily" %}
|
||||
{% unless mono_download == "#" %}
|
||||
<div class="download">
|
||||
<a href="{{ mono_download }}">
|
||||
{{ platform_info.title }} - .NET
|
||||
{% unless platform_info.caption == empty %} - {{ platform_info.caption }}{% endunless %}
|
||||
</a>
|
||||
<span class="download-details">
|
||||
{% for tag in platform_info.tags %}{{ tag }} · {% endfor %}C# support
|
||||
</span>
|
||||
</div>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% include download-version.html version=version %}
|
||||
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
@@ -410,23 +121,7 @@ layout: default
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const downloadToggles = document.querySelectorAll('.preview-download-toggle');
|
||||
downloadToggles.forEach((item) => {
|
||||
const toggleLink = item.querySelector('h4');
|
||||
toggleLink.addEventListener('click', (e) => {
|
||||
if (item.classList.contains('active')) {
|
||||
item.classList.remove('active');
|
||||
toggleLink.textContent = 'Show all downloads';
|
||||
} else {
|
||||
item.classList.add('active');
|
||||
toggleLink.textContent = 'Hide all downloads';
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% include download-version-script.html %}
|
||||
|
||||
<div id="stable" class="container card stable-download">
|
||||
<h2>Need a stable version?</h2>
|
||||
|
||||
Reference in New Issue
Block a user