Skip to content

Commit

Permalink
Centering the detected platform and size fixes
Browse files Browse the repository at this point in the history
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Some size adjustments.

Button fixes
  • Loading branch information
Reqrefusion committed Aug 10, 2024
1 parent 0a113ef commit e8ddfa3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
12 changes: 2 additions & 10 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ code {

.btn {
font-family: "Montserrat-Bold", sans-serif;
font-size: 1em;
padding: 0.4em 1.6em 0.4em 1.6em;
margin-bottom: 1em;
}

Expand Down Expand Up @@ -208,7 +206,7 @@ code {

.download-notes {
margin-top: 3em;
margin-bottom: 4em;
margin-bottom: 3em;
}

.donation input,
Expand Down Expand Up @@ -306,12 +304,10 @@ code {
font-size: 0.8em;
}

.btn {
font-size: 0.8em;
}
.model-backround {
background-color: rgba(52, 58, 64, 0.5);
}

.text-backround {
background-color: rgba(52, 58, 64, 0.5);
}
Expand Down Expand Up @@ -356,10 +352,6 @@ code {
font-size: 1.4em;
}

/* .btn {
font-size: 1em;
} */

#floating-arrow {
width: 2em;
margin: 4em 0 4em 0;
Expand Down
41 changes: 28 additions & 13 deletions downloads.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ function thankyou(e) {
window.location = durl;
return false;
}
function setOrder(firstDiv, lastDiv) {
firstDiv.classList.add('order-first');
lastDiv.classList.add('order-last');
}
document.addEventListener("DOMContentLoaded", function() {
var userAgent = window.navigator.userAgent;
var windowsDiv = document.getElementById('windows');
var linuxDiv = document.getElementById('linux');
var macDiv = document.getElementById('mac');
if (userAgent.includes('Win')) {
setOrder(macDiv, linuxDiv);
} else if (userAgent.includes('Lin')) {
setOrder(windowsDiv, macDiv);
}
});
</script>

<div id="main" class="container-fluid">
Expand All @@ -25,23 +40,23 @@ function thankyou(e) {
<p><?php echo _('Select your desired platform (note that all downloads are for 64-bit systems):'); ?></p>

</div>
<div class="row mx-auto download-platform">

<!-- ------- -->
<!-- Windows -->
<!-- ------- -->

<div class="row mx-auto download-platform">
<div class="col-sm-6 col-lg-4 my-4">
<div id="windows" class="col-sm-6 col-lg-4 my-4">
<div class="card text-dark">
<div class="card-body d-block align-items-center text-center px-xl-5 py-xl-4">
<img class="w-100 p-4" src="svg/icon-windows.svg" alt="Windows">
<div class="card-body d-block align-items-center text-center">
<img class="w-75" src="svg/icon-windows.svg" alt="Windows">
<h3 class="card-title download-platform-name m-0 pb-3">Windows</h3>
<div class="flex-column flex-lg-row">
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/0.21.2/FreeCAD-0.21.2-WIN-x64-installer-1.exe">64-bit installer</a>
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/0.21.2/FreeCAD-0.21.2-Windows-x86_64.7z">64-bit portable (.7z)</a>
</div>
</div>
<div class="card-footer px-xl-5 py-xl-4">
<div class="card-footer">
<small class="text-muted">
<?php echo _('Windows 7 is the minimum supported version. For more info on installation, please check out the '); ?>
<a href="<?php echo _('https://wiki.freecad.org/Install_on_Windows'); ?>"><?php echo _('wiki'); ?></a>.
Expand All @@ -54,15 +69,15 @@ function thankyou(e) {
<!-- MacOS -->
<!-- ----- -->

<div class="col-sm-6 col-lg-4 my-4">
<div id="mac" class="col-sm-6 col-lg-4 my-4">
<div class="card text-dark">
<div class="card-body d-block align-items-center text-center px-xl-5 py-xl-4">
<img class="w-100 p-4" src="svg/icon-apple.svg" alt="Mac">
<div class="card-body d-block align-items-center text-center">
<img class="w-75" src="svg/icon-apple.svg" alt="Mac">
<h3 class="card-title download-platform-name m-0 pb-3">Mac</h3>
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/0.21.2/FreeCAD-0.21.2-macOS-arm64.dmg">ARM (M1/M2) disk image</a>
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/0.21.2/FreeCAD-0.21.2-macOS-intel-x86_64.dmg">Intel disk image</a>
</div>
<div class="card-footer px-xl-5 py-xl-4">
<div class="card-footer">
<small class="text-muted">
<?php echo _('Mac OS X 10.12 Sierra is the minimum supported version. For more info on installation, please check out the '); ?>
<a href="<?php echo _('https://wiki.freecad.org/Install_on_Mac'); ?>"><?php echo _('wiki'); ?></a>.
Expand All @@ -75,15 +90,15 @@ function thankyou(e) {
<!-- Linux/AppImage -->
<!-- -------------- -->

<div class="col-sm-6 col-lg-4 my-4">
<div id="linux" class="col-sm-6 col-lg-4 my-4">
<div class="card text-dark">
<div class="card-body d-block align-items-center text-center px-xl-5 py-xl-4">
<img class="w-100 p-4" src="svg/icon-linux.svg" alt="Linux">
<div class="card-body d-block align-items-center text-center">
<img class="w-75" src="svg/icon-linux.svg" alt="Linux">
<h3 class="card-title download-platform-name m-0 pb-3">Linux</h3>
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/0.21.2/FreeCAD-0.21.2-Linux-x86_64.AppImage">x86_64 AppImage</a>
<a class="btn btn-primary rounded-pill my-1" onclick="thankyou(event)" role="button" href="https://github.com/FreeCAD/FreeCAD/releases/download/0.21.2/FreeCAD-0.21.2-Linux-aarch64.AppImage">aarch64 AppImage</a>
</div>
<div class="card-footer px-xl-5 py-xl-4">
<div class="card-footer">
<small class="text-muted">
<?php echo _('In some distros you might need to install fuse to be able to run the AppImage bundles.'); ?>
<?php echo _('For other distro-specific install instructions, such as Ubuntu PPA, and other ways to install on Linux, please check out the '); ?>
Expand Down

0 comments on commit e8ddfa3

Please sign in to comment.