Fixes some issues with the 4.4 release page (#1033)

- Fixes missing margins of the download content
- Add Play Store and Horizon Store releases
- Display all downloads when JavaScript is disabled
This commit is contained in:
Adam Scott
2025-03-06 16:09:44 +01:00
committed by GitHub
parent 7e6d6beb84
commit 8c3a18b062
6 changed files with 67 additions and 43 deletions

View File

@@ -135,6 +135,9 @@
// Open from the main download buttons.
const downloadButtons = document.querySelectorAll('.btn-download, .download-button');
downloadButtons.forEach((it) => {
if (it.dataset?.external === "yes") {
return;
}
it.addEventListener('click', () => {
thankYouWrapper.style.display = '';
document.querySelector('.btn.btn-donate').focus();

View File

@@ -37,7 +37,7 @@ layout: default
<a href="{{ download_url }}" class="btn btn-download btn-download-main{% if forloop.index > 1 %}2{% endif %}">
<div class="download-title">
<img src="/assets/images/platforms/{{ page.platform | slugify }}.svg" alt="({{ page.platform }})">
Godot Engine{% if download.featured_flavor %} - {{ download.featured_flavor }}{% endif %}
Godot Engine{% if download.featured_flavor %} {{ download.featured_flavor }}{% endif %}
</div>
<div class="download-hint">{{ stable_version.name }}</div>
</a>

View File

@@ -1,6 +1,15 @@
---
---
#download-download {
.release-card-media {
.release-platform {
display: flex;
flex-direction: column;
align-items: center;
}
}
}
.comparison-range {
display: none !important;
}

View File

@@ -238,12 +238,13 @@ $donate-robot-size: 500px;
.release-card-media {
.release-platform {
display: none;
margin: 0 auto;
margin: var(--card-padding);
&.active {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--card-padding);
}
.release-button {
@@ -259,9 +260,9 @@ $donate-robot-size: 500px;
.download-button {
display: grid;
gap: var(--card-padding);
padding: 0;
grid-template-columns: 215px 1fr;
max-width: 290px;
grid-template-columns: auto 1fr;
text-align: center;
align-items: center;
text-decoration: none;
@@ -270,23 +271,33 @@ $donate-robot-size: 500px;
line-height: 32px;
.download-title {
display: flex;
flex-direction: row;
gap: var(--card-padding);
color: var(--primary-color-text-title);
font-size: 20px;
img {
display: inline-block;
filter: invert(1);
margin-right: 10px;
margin-left: var(--card-padding);
width: 22px;
vertical-align: text-bottom;
}
}
.download-hint {
display: flex;
flex-direction: column;
justify-content: center;
background-color: var(--primary-color-text-title);
color: var(--dark-color);
padding: 12px 16px;
font-weight: bold;
border-radius: 0 var(--button-border-radius)
var(--button-border-radius) 0;
height: 100%;
box-sizing: border-box;
}
}
@@ -294,9 +305,6 @@ $donate-robot-size: 500px;
background-color: rgba(111, 111, 111, 27%);
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
grid-template-columns: 270px 1fr;
max-width: 350px;
margin-top: 20px;
}
}
}

View File

@@ -362,7 +362,10 @@ const anchors = Array.from(
document.querySelector("main .release-container").querySelectorAll("a"),
);
for (const anchor of anchors) {
if (anchor.classList.contains("download-button")) {
if (
anchor.classList.contains("download-button") &&
anchor.dataset?.external !== "yes"
) {
continue;
}
try {

View File

@@ -48,13 +48,13 @@ authors_list: "0x0ACB,1,1|0x53A,1,1|0xafbf,1,1|0xcafeb33f,1,1|10Drenth,1,1|2nafi
{% assign data = site.release_4_4 %}
{% assign _intro = data | where: "type", "entry" | where: "category", "intro" | sort: "rank" %}
{% assign _sections = data | where: "type", "section" | sort: "rank" %}
{% assign _foundation = data | where: "type", "entry" | where: "category", "foundation" | sort: "rank" %}
{% assign _special_thanks = data | where: "type", "entry" | where: "category", "special_thanks" | sort: "rank" %}
{% assign download_platforms = site.download %}
{% assign stable_version = site.data.versions | find: "name", release_version_number %}
<link rel="stylesheet" href="/assets/css/material-symbols-outlined.css" />
<link rel="stylesheet" href="/assets/css/releases/4.4.css" />
<script type="module" src="/assets/js/releases/4.4.mjs"></script>
@@ -114,45 +114,46 @@ authors_list: "0x0ACB,1,1|0x53A,1,1|0xafbf,1,1|0xcafeb33f,1,1|10Drenth,1,1|2nafi
</div>
</div>
<div class="release-card-media">
{% assign download_primary = release_version | get_download_primary: false %}
{% assign download_primary = release_version | get_download_platforms: false %}
<div class="release-platform-container">
{% for primary in download_primary %}
{% if primary[0] == "linux" or primary[0] == "macos" or primary[0] == "windows" or primary[0] == "android" %}
<div class="release-platform release-platform-{{primary[0]}}">
{% assign platform_info = site.data.download_platforms | find: "name", primary[1] %}
{% for download_platform in download_platforms %}
{% assign platform_name = download_platform.platform | downcase %}
<div class="release-platform release-platform-{{platform_name}}">
{% assign featured_downloads = download_platform.downloads | where: "featured", "true" %}
{% for featured_download in featured_downloads %}
{% capture download_url %}
{% if featured_download.custom %}
{{ featured_download.custom }}
{% else %}
{{ stable_version | make_download: featured_download.platform, featured_download.mono, "github_builds" }}
{% endif %}
{% endcapture %}
{% assign platform_info = site.data.download_platforms | find: "name", featured_download.platform %}
<div class="release-button release-button-standard">
<a href="{{ release_version | make_download: primary[1], false, "github_builds" }}" class="btn download-button">
{% assign download_btn_class = "download-button" %}
{% if featured_download.mono %}
{% assign download_btn_class = download_btn_class | append: " download-net-button" %}
{% endif %}
{% assign data_external = 'data-external="no"' %}
{% if featured_download.custom %}
{% assign data_external = 'data-external="yes"' %}
{% endif %}
<a href="{{ download_url }}" class="btn {{ download_btn_class }}" {{data_external}}>
<div class="download-title">
<img src="/assets/images/platforms/{{primary[0]}}.svg" draggable="false" />
Godot Engine
</div>
<div class="download-hint">
{{ release_version.name }}
<img src="/assets/images/platforms/{{ platform_name | slugify }}.svg" alt="({{ platform_name }})" draggable="false" />
<span>Godot Engine{% if featured_download.featured_flavor %} {{ featured_download.featured_flavor }}{% endif %}</span>
</div>
<div class="download-hint"><span>{{ stable_version.name }}</span></div>
</a>
<p class="main-download-details">
<strong>{% for tag in platform_info.tags %}{{ tag }} · {% endfor %}{% if primary.mono %}C# support · {% endif %}</strong>{{ release_version.release_date }}
<strong>{% for tag in platform_info.tags %}{{ tag }} · {% endfor %}{% if featured_download.mono %}C# support · {% endif %}</strong>{{ stable_version.release_date }}
</p>
</div>
{% assign mono_download = release_version | make_download: primary[1], true, "github_builds" %}
{% if mono_download != "#" %}
<div class="release-button release-button-mono">
<a href="{{ mono_download }}" class="btn download-button download-net-button">
<div class="download-title">
<img src="/assets/images/platforms/{{primary[0]}}.svg" draggable="false" />
Godot Engine - .NET
</div>
<div class="download-hint">
{{ release_version.name }}
</div>
</a>
<p class="main-download-details">
<strong>{% for tag in platform_info.tags %}{{ tag }} · {% endfor %}C# support · </strong>{{ release_version.release_date }}
</p>
</div>
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
</div>