New download card layout (#308)

* Changed download card layout
This commit is contained in:
Hendrik authored and Florian Küpper committed 2017-09-03 00:55:21 +02:00
1 parent 39949da620
commit 7d6150dd60
4 files changed
+112 -32

No files matched your search

+69 -17
View File
@@ -36,17 +36,35 @@
<span class="fa fa-times close-icon" aria-hidden="true"></span> <span class="fa fa-times close-icon" aria-hidden="true"></span>
<h3>{{currentReleaseTitle}}</h3> <h3>{{currentReleaseTitle}}</h3>
{% for asset in release_nightly.assets %} {% for asset in release_nightly.assets %}
{% assign currentReleaseData = asset.name | split:".zip" | first | split:"_" %} {% assign currentReleaseData = asset.name | remove:".zip" | remove:".exe" | split:"_" %}
{% assign currentReleaseFileEnding = asset.name | split:"." | last %} {% assign currentReleaseFileEnding = asset.name | split:"." | last %}
{% assign currentReleaseOs = currentReleaseData[2] %} {% assign currentReleaseOs = currentReleaseData[2] %}
{% assign currentReleaseArch = currentReleaseData[3] %} {% assign currentReleaseArch = currentReleaseData[3] %}
{% if currentReleaseFileEnding == "zip" %} {% if currentReleaseOs == "Windows" and currentReleaseFileEnding == "zip" and currentReleaseArch == "x86" %}
{% assign currentReleaseType = "Portable" %} {% assign winZip86 = asset.browser_download_url %}
{% else if currentReleaseFileEnding == "exe" %} {% elsif currentReleaseOs == "Windows" and currentReleaseFileEnding == "zip" and currentReleaseArch == "x64" %}
{% assign currentReleaseType = "Installer" %} {% assign winZip64 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Windows" and currentReleaseFileEnding == "exe" and currentReleaseArch == "x86" %}
{% assign winExe86 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Windows" and currentReleaseFileEnding == "exe" and currentReleaseArch == "x64" %}
{% assign winExe64 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Linux" and currentReleaseArch == "x86" %}
{% assign linux86 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Linux" and currentReleaseArch == "x64" %}
{% assign linux64 = asset.browser_download_url %}
{% endif %} {% endif %}
{% include downloadButton.html type=currentReleaseType os=currentReleaseOs arch=currentReleaseArch url=asset.browser_download_url %}
{% endfor %} {% endfor %}
{% if winZip86 or winZip64 %}
{% include downloadRow.html x86=winZip86 x64=winZip64 os="Windows" type="Portable" %}
{% endif %}
{% if winExe86 or winExe64 %}
{% include downloadRow.html x86=winExe86 x64=winExe64 os="Windows" type="Installer" %}
{% endif %}
{% if linux86 or linux64 %}
{% include downloadRow.html x86=linux86 x64=linux64 os="Linux" type="Linux" %}
{% endif %}
</div> </div>
<span class="release-details flex00a"> <span class="release-details flex00a">
<a class="btn btn-primary btn-lg btnDownload"> <a class="btn btn-primary btn-lg btnDownload">
@@ -71,13 +89,30 @@
{% assign currentReleaseFileEnding = asset.name | split:"." | last %} {% assign currentReleaseFileEnding = asset.name | split:"." | last %}
{% assign currentReleaseOs = currentReleaseData[2] %} {% assign currentReleaseOs = currentReleaseData[2] %}
{% assign currentReleaseArch = currentReleaseData[3] %} {% assign currentReleaseArch = currentReleaseData[3] %}
{% if currentReleaseFileEnding == "zip" %} {% if currentReleaseOs == "Windows" and currentReleaseFileEnding == "zip" and currentReleaseArch == "x86" %}
{% assign currentReleaseType = "Portable" %} {% assign winZip86 = asset.browser_download_url %}
{% else if currentReleaseFileEnding == "exe" %} {% elsif currentReleaseOs == "Windows" and currentReleaseFileEnding == "zip" and currentReleaseArch == "x64" %}
{% assign currentReleaseType = "Installer" %} {% assign winZip64 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Windows" and currentReleaseFileEnding == "exe" and currentReleaseArch == "x86" %}
{% assign winExe86 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Windows" and currentReleaseFileEnding == "exe" and currentReleaseArch == "x64" %}
{% assign winExe64 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Linux" and currentReleaseArch == "x86" %}
{% assign linux86 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Linux" and currentReleaseArch == "x64" %}
{% assign linux64 = asset.browser_download_url %}
{% endif %} {% endif %}
{% include downloadButton.html type=currentReleaseType os=currentReleaseOs arch=currentReleaseArch url=asset.browser_download_url %}
{% endfor %} {% endfor %}
{% if winZip86 or winZip64 %}
{% include downloadRow.html x86=winZip86 x64=winZip64 os="Windows" type="Portable" %}
{% endif %}
{% if winExe86 or winExe64 %}
{% include downloadRow.html x86=winExe86 x64=winExe64 os="Windows" type="Installer" %}
{% endif %}
{% if linux86 or linux64 %}
{% include downloadRow.html x86=linux86 x64=linux64 os="Linux" type="Linux" %}
{% endif %}
</div> </div>
<span class="release-details flex00a"> <span class="release-details flex00a">
<a class="btn btn-primary btn-lg btnDownload"> <a class="btn btn-primary btn-lg btnDownload">
@@ -101,15 +136,32 @@
{% for asset in release_stable.assets %} {% for asset in release_stable.assets %}
{% assign currentReleaseData = asset.name | remove:".zip" | remove:".exe" | split:"_" %} {% assign currentReleaseData = asset.name | remove:".zip" | remove:".exe" | split:"_" %}
{% assign currentReleaseFileEnding = asset.name | split:"." | last %} {% assign currentReleaseFileEnding = asset.name | split:"." | last %}
{% assign currentReleaseOs = currentReleaseData[2] | downcase %} {% assign currentReleaseOs = currentReleaseData[2] %}
{% assign currentReleaseArch = currentReleaseData[3] %} {% assign currentReleaseArch = currentReleaseData[3] %}
{% if currentReleaseFileEnding == "zip" %} {% if currentReleaseOs == "Windows" and currentReleaseFileEnding == "zip" and currentReleaseArch == "x86" %}
{% assign currentReleaseType = "Portable" %} {% assign winZip86 = asset.browser_download_url %}
{% else if currentReleaseFileEnding == "exe" %} {% elsif currentReleaseOs == "Windows" and currentReleaseFileEnding == "zip" and currentReleaseArch == "x64" %}
{% assign currentReleaseType = "Installer" %} {% assign winZip64 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Windows" and currentReleaseFileEnding == "exe" and currentReleaseArch == "x86" %}
{% assign winExe86 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Windows" and currentReleaseFileEnding == "exe" and currentReleaseArch == "x64" %}
{% assign winExe64 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Linux" and currentReleaseArch == "x86" %}
{% assign linux86 = asset.browser_download_url %}
{% elsif currentReleaseOs == "Linux" and currentReleaseArch == "x64" %}
{% assign linux64 = asset.browser_download_url %}
{% endif %} {% endif %}
{% include downloadButton.html type=currentReleaseType os=currentReleaseOs arch=currentReleaseArch url=asset.browser_download_url %}
{% endfor %} {% endfor %}
{% if winZip86 or winZip64 %}
{% include downloadRow.html x86=winZip86 x64=winZip64 os="Windows" type="Portable" %}
{% endif %}
{% if winExe86 or winExe64 %}
{% include downloadRow.html x86=winExe86 x64=winExe64 os="Windows" type="Installer" %}
{% endif %}
{% if linux86 or linux64 %}
{% include downloadRow.html x86=linux86 x64=linux64 os="Linux" type="Linux" %}
{% endif %}
</div> </div>
</span> </span>
<span class="release-details flex00a"> <span class="release-details flex00a">
-13
View File
@@ -1,13 +0,0 @@
<a href={{include.url}} class="btn btn-primary btn-lg btnDownload">
{% if include.os == "linux" %}
<span class="fa fa-linux btnDownloadIcon" aria-hidden="true"></span>
{% else %}
<span class="fa fa-windows btnDownloadIcon" aria-hidden="true"></span>
{% endif %}
{% if include.arch == "x86" %}
<span>x86 {{include.type}}</span>
{% else %}
<span>x64 {{include.type}}</span>
{% endif %}
</a>
</br>
+21
View File
@@ -0,0 +1,21 @@
<p class="download-table-row">
<span>
{% if include.os == "Linux" %}
<span class="fa fa-linux btnDownloadIcon" aria-hidden="true"></span>
{% else %}
<span class="fa fa-windows btnDownloadIcon" aria-hidden="true"></span>
{% endif %}
<span>{{include.type}}</span>
</span>
<span class="right">
{% if include.x86 != nil %}
<a href={{include.x86}}>x86</a>
{% if include.x64 != nil %}
<span> | </span>
{% endif %}
{% endif %}
{% if include.x64 != nil %}
<a href={{include.x64}}>x64</a>
{% endif %}
</span>
</p>
+22 -2
View File
@@ -474,7 +474,27 @@ a:hover {
} }
.card-overlay h3 { .card-overlay h3 {
margin: 10px 0; margin-top: 10px;
margin-bottom: 30px;
}
.card-overlay .download-table-row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
margin: 15px auto;
max-width: 200px;
text-align: center;
}
.card-overlay .download-table-row a {
text-decoration: underline;
color: white;
}
.card-overlay .download-table-row a:hover {
color: #428bca;
} }
.dark-bg .release-date a { .dark-bg .release-date a {
@@ -494,7 +514,7 @@ a:hover {
} }
.blue-bg .release-date a { .blue-bg .release-date a {
color: #E74C3C; color: #2C3E50;
} }
.blue-bg .card-overlay { .blue-bg .card-overlay {