-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a download card for use in articles
- Loading branch information
Showing
12 changed files
with
254 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{% assign release_version = include.version | make_release_version: include.release %} | ||
{% if include.page %} | ||
{% assign release_article = page %} | ||
{% else %} | ||
{% assign release_article = site.article | find: "url", release_version.release_notes %} | ||
{% endif %} | ||
|
||
<div class="card card-download"> | ||
<a class="card-download-link" href="/download/archive/{{ release_version.name }}-{{ release_version.flavor }}"> | ||
Download Godot {{ release_version.name }} {{ release_version.flavor }} | ||
</a> | ||
|
||
<div class="card-download-details"> | ||
{% unless release_article == empty %} | ||
<img class="lightbox-ignore" src="{{ release_article.image }}" /> | ||
{% endunless %} | ||
|
||
<div class="card-download-platforms"> | ||
{% 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 %} | ||
|
||
{% if primary[0] == "linux" or primary[0] == "macos" or primary[0] == "windows" %} | ||
{% assign platform_info = site.data.download_platforms | find: "name", primary[1] %} | ||
|
||
<div class="download-platform"> | ||
<img width="24" height="24" src="/assets/images/platforms/{{ primary[0] | split: "_" | join: "-" }}.svg" title="{{ platform_info.title }}" alt="{{ platform_info.title }}" class="lightbox-ignore" /> | ||
{{ platform_info.title }} | ||
</div> | ||
|
||
<a href="{{ release_version | make_download: primary[1], false, "github_builds" }}" class="btn btn-download btn-download-primary"> | ||
<div class="download-title"> | ||
Standard | ||
</div> | ||
</a> | ||
|
||
{% assign mono_download = release_version | make_download: primary[1], true, "github_builds" %} | ||
{% if mono_download == "#" %} | ||
<div></div> | ||
{% else %} | ||
{% assign has_mono = true %} | ||
<a href="{{ mono_download }}" class="btn btn-download btn-download-primary btn-download-primary--mono"> | ||
<div class="download-title"> | ||
.NET | ||
</div> | ||
</a> | ||
{% endif %} | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
</div> | ||
|
||
<div class="card-download-sublinks"> | ||
<a class="card-download-other" href="/download/archive/{{ release_version.name }}-{{ release_version.flavor }}"> | ||
Export templates and other downloads | ||
</a> | ||
<a class="card-download-donate" href="/donate"> | ||
Make a Donation | ||
</a> | ||
</div> | ||
|
||
</div> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div class="card card-warning"> | ||
<p> | ||
While engine maintainers try their best to ensure that each beta release is stable, this is by definition <strong>a pre-release piece of software</strong>. Be sure to make frequent backups, or use a version control system such as Git, to preserve your projects in a case of corruption or data loss. | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
.card-warning { | ||
background: var(--warning-background-color); | ||
border-radius: 4px 4px; | ||
color: var(--warning-color); | ||
font-size: 90%; | ||
padding: 0 12px; | ||
} | ||
|
||
.card-download { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
gap: 16px; | ||
background: var(--head-background-color); | ||
border-radius: 4px 4px; | ||
padding: 10px 16px; | ||
} | ||
|
||
.card-download-link { | ||
color: var(--dark-color-text-title); | ||
font-size: 135%; | ||
font-weight: 700; | ||
text-decoration-color: var(--dark-color-text); | ||
} | ||
|
||
.card-download-sublinks { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
gap: 12px; | ||
width: 100%; | ||
} | ||
@media (max-width: 768px) { | ||
.card-download-sublinks { | ||
flex-direction: column; | ||
width: auto; | ||
} | ||
} | ||
|
||
.card-download-sublinks .card-download-other, | ||
.card-download-sublinks .card-download-donate { | ||
color: var(--dark-color-text-hl); | ||
font-size: 95%; | ||
text-decoration-color: var(--dark-color-text); | ||
text-decoration-thickness: 1px; | ||
} | ||
.card-download-sublinks .card-download-donate { | ||
color: var(--fund-color-faint); | ||
font-weight: 600; | ||
text-decoration-color: var(--fund-color-faint); | ||
} | ||
|
||
.card-download-details { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: flex-start; | ||
gap: 12px; | ||
width: 100%; | ||
} | ||
@media (max-width: 768px) { | ||
.card-download-details { | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 20px; | ||
} | ||
} | ||
|
||
.card-download-details img, article .content .card-download-details img { | ||
background-color: transparent; | ||
display: inline-block; | ||
margin: 0; | ||
max-width: 200px; | ||
} | ||
@media (max-width: 768px) { | ||
.card-download-details img, article .content .card-download-details img { | ||
max-height: 220px; | ||
max-width: inherit; | ||
} | ||
} | ||
|
||
.card-download-platforms { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 4px; | ||
} | ||
|
||
.card-download-platforms { | ||
display: grid; | ||
grid-template-columns: 1fr 1fr 1fr; | ||
gap: 8px; | ||
} | ||
|
||
.card-download-platforms .download-platform { | ||
color: var(--primary-color-text-title); | ||
display: flex; | ||
align-items: center; | ||
gap: 12px; | ||
font-weight: 700; | ||
} | ||
|
||
.download-platform img { | ||
filter: invert(100%); | ||
} | ||
|
||
.card-download-platforms .btn-download-primary { | ||
margin-bottom: 0; | ||
text-align: left; | ||
} | ||
|
||
.card-download-platforms .btn-download-primary.btn-download-primary--mono { | ||
background-color: var(--download-mono-background-color); | ||
-webkit-backdrop-filter: blur(4px); | ||
backdrop-filter: blur(4px); | ||
} | ||
.card-download-platforms .btn-download-primary.btn-download-primary--mono .download-title { | ||
color: #f7f7f7; | ||
} | ||
.card-download-platforms .btn-download-primary.btn-download-primary--mono .download-hint { | ||
background-color: var(--primary-color-subdued); | ||
color: var(--text-color); | ||
} | ||
|
||
.card-download-platforms .btn.btn-download-primary .download-title { | ||
font-size: 18px; | ||
line-height: 24px; | ||
padding: 10px 16px; | ||
white-space: nowrap; | ||
} | ||
@media (max-width: 900px) { | ||
.card-download-platforms .btn.btn-download-primary .download-title { | ||
line-height: 28px; | ||
padding: 12px 20px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.