diff --git a/_includes/download-version-script.html b/_includes/download-version-script.html new file mode 100644 index 0000000000..27b3e5132b --- /dev/null +++ b/_includes/download-version-script.html @@ -0,0 +1,17 @@ + diff --git a/_includes/download-version.html b/_includes/download-version.html new file mode 100644 index 0000000000..ba4e176095 --- /dev/null +++ b/_includes/download-version.html @@ -0,0 +1,294 @@ + + +
+ {% assign release_version = include.version | make_release_version: include.release %} + +

+ Godot {{ release_version.name }}-{{ release_version.flavor }} +

+ +

+ {% unless release_version.release_date == empty %} + {{ release_version.release_date }} + {% endunless %} +

+ +
+
+ {% unless release_version.release_notes == empty %} + {% assign release_article = site.article | find: "url", release_version.release_notes %} + + {% unless release_article == empty %} +
+
+
+ {{ release_article.excerpt }} +
+
+ {% endunless %} + {% else %} +
+ Release notes are not ready yet. You can check the complete list of changes using our interactive changelog. +
+ {% endunless %} + +
+ {% unless release_version.release_notes == empty %} + {% assign release_article = site.article | find: "url", release_version.release_notes %} + {% unless release_article == empty %} + Read more + {% endunless %} + {% endunless %} + + View complete changelog +
+ +
+ +
+

Main downloads

+
+ {% 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] %} + + +
+ {{ platform_info.title }} + {{ platform_info.title }} +
+
+ + {% assign mono_download = release_version | make_download: primary[1], true, "tuxfamily" %} + {% if mono_download == "#" %} +
+ {% else %} + +
+ .NET +
+
+ {% endif %} + {% endfor %} +
+
+
+ +
+

Show all downloads

+
+ + +
diff --git a/_plugins/make_download.rb b/_plugins/make_download.rb index a94130e063..1c0281e4b0 100644 --- a/_plugins/make_download.rb +++ b/_plugins/make_download.rb @@ -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) diff --git a/pages/download/archive.html b/pages/download/archive.html new file mode 100644 index 0000000000..c78b24182b --- /dev/null +++ b/pages/download/archive.html @@ -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 %} + + + + + +
+
+

Godot download archive

+ +
+

+ Download any officially published release of the engine. +

+
+
+
+ +
+
+

Official releases

+ +
+ {% 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 %} +
+
+
+ +{% include download-version-script.html %} + +{% include footer.html %} diff --git a/pages/download/preview.html b/pages/download/preview.html index 740e17aa6c..b77c750887 100644 --- a/pages/download/preview.html +++ b/pages/download/preview.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 %} -
-

- Godot {{ version.name }}-{{ version.flavor }} -

- -

- {% unless version.release_date == empty %} - {{ version.release_date }} - {% endunless %} -

- -
-
- {% unless version.release_notes == empty %} - {% assign release_article = site.article | find: "url", version.release_notes %} - - {% unless release_article == empty %} -
-
-
- {{ release_article.excerpt }} -
-
- {% endunless %} - {% else %} -
- Release notes are not ready yet. You can check the complete list of changes using our interactive changelog. -
- {% endunless %} - -
- {% unless version.release_notes == empty %} - {% assign release_article = site.article | find: "url", version.release_notes %} - {% unless release_article == empty %} - Read more - {% endunless %} - {% endunless %} - - View complete changelog -
- -
- -
-

Main downloads

-
- {% 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] %} - - -
- {{ platform_info.title }} - {{ platform_info.title }} -
-
- - {% assign mono_download = version | make_download: primary[1], true, "tuxfamily" %} - {% if mono_download == "#" %} -
- {% else %} - -
- .NET -
-
- {% endif %} - {% endfor %} -
-
-
- -
-

Show all downloads

-
- - -
+ {% include download-version.html version=version %} {% endunless %} {% endfor %} @@ -410,23 +121,7 @@ layout: default - +{% include download-version-script.html %}

Need a stable version?