Skip to content

Commit

Permalink
Merge pull request #48 from finglis/mac-download-update
Browse files Browse the repository at this point in the history
Mac download update - option 1
  • Loading branch information
petebankhead authored Dec 1, 2023
2 parents 6679aed + c678e4b commit 3e0adcc
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 40 deletions.
30 changes: 23 additions & 7 deletions _includes/download.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
<!-- Downloads component -->
<div id="downloads" class="standard-component">
<div class="download-container">
<a class="button windows-button main-button" href="{{ page.qupath_releases }}" data-for-os="default"
data-download="win" tabindex=“-1”>{{ page.download_button_default }}</a>
<a class="button default-button main-button" href="{{ page.qupath_releases }}" data-for-os="default"
data-download="default" tabindex=“-1”>{{ page.download_button_default }}</a>
<a class="button windows-button main-button" href="{{ page.qupath_download_msi }}" data-for-os="win"
data-download="win" tabindex=“0” aria-label="{{ page.download_dropdown_msi_aria }}">{{
page.download_button_win }}</a>
<a class="button mac-button main-button" href="{{ page.qupath_download_pkg }}" data-for-os="mac"
data-download="mac" tabindex=“0” aria-label="{{ page.download_dropdown_pkg_aria }}">{{
<a class="button mac-button main-button" href="{{ page.qupath_download_pkg }}" data-for-os="macIntel"
data-download="macIntel" tabindex=“0” aria-label="{{ page.download_dropdown_mac_aria }}">{{
page.download_button_mac }}</a>
<div class="mac-dropdown" data-for-os="macAll" data-download="macAll" tabindex=“-1”>
<button title="mac download options" class="button mac-button main-button mac-dropdown" data-for-os="macAll"
data-download="macAll" tabindex=“0” aria-label="{{ page.download_dropdown_mac_aria }}">{{
page.download_button_mac }}</button>
<div class="mac-dropdown-content dropdown-content" tabindex=“0”>
<a href="{{ page.qupath_download_pkg }}" tabindex=“0”
aria-label="{{ page.download_dropdown_pkg_aria }}"><img src="/assets/images/icons/apple.svg"
class="fa-platform-icon" alt="apple icon">{{ page.download_dropdown_pkg }}</a>
<a href="{{ page.qupath_download_pkg_s }}" tabindex=“0”
aria-label="{{ page.download_dropdown_pkg_s_aria }}"><img src="/assets/images/icons/apple.svg"
class="fa-platform-icon" alt="apple icon">{{ page.download_dropdown_pkg_s }}<span
id="super">beta</span></a>
<a href="{{ page.qupath_download_which }}" tabindex=“0” class="dropdown-info"
aria-label="{{ page.download_dropdown_which_aria }}"
target="blank">{{ page.download_dropdown_which }}</a>
</div>
</div>
<a class="button linux-button main-button" href="{{ page.qupath_download_tar }}" data-for-os="lin"
data-download="lin" tabindex=“0” aria-label="{{ page.download_dropdown_tar_aria }}">{{
page.download_button_lin }}</a>
<div class="dropdown" tabindex=“-1”>
<button title="expand-side-button" class="button windows-button side-button" tabindex=“0”
<button title="more download options" class="button windows-button side-button" tabindex=“0”
aria-label="{{ page.dropdown_aria }}"><img src="/assets/images/icons/angle-right-solid.svg"
class="fa-angle-right" alt="right angle button"></span></button>
<div class="dropdown-content">
Expand All @@ -38,8 +55,7 @@
</div>
</div>
<p class="bold"><a href="{{ page.qupath_release_notes }}" target=blank>{{ page.latest_release_notes }}</a></p>
<p>{{page.all_release_notes }}
</p>
<p>{{page.all_release_notes }}</p>
<p>{{page.install_troubleshooting }}</p>
</div>
</div>
95 changes: 83 additions & 12 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
text-decoration: none;
font-size: 16pt;
border-radius: 10px;
color: var(--off-black);
color: var(--off-black) !important;
background-color: var(--yellow);
transition: background-color 0.3s ease-in-out 30ms;
}
Expand Down Expand Up @@ -331,10 +331,48 @@
height: 15px;
width: 15px;
}

/* Mac Dropdown Content (Hidden by Default)*/
.mac-dropdown {
position: relative;
display: inline-block;
margin-left: auto;
margin-right: auto;
align-content: center;
height: auto;
}

/* Mac dropdown content positioning*/
.mac-dropdown-content {
right: -35px;
}

/* Mac dropdown content show/hide */
.mac-dropdown:hover .mac-dropdown-content,
.mac-dropdown:focus-within .mac-dropdown-content {
visibility: visible;
opacity: 1;
transition: opacity 0.3s ease-in-out 0.3s;
}

/* Dropdown info section (as seen on Mac) */
a.dropdown-info {
text-align: center;
font-size: 15px;
font-weight: 900;
}

a.dropdown-info:hover {
text-decoration:underline;
}

/* Which OS download to hide */
/* Windows */
html.mac [data-for-os="win"] {
// Display the windows download only and hide the following:
html.macAll [data-for-os="win"] {
display: none !important;
}

html.macIntel [data-for-os="win"] {
display: none !important;
}

Expand All @@ -347,7 +385,12 @@
}

/* Linux */
html.mac [data-for-os="lin"] {
// Display the linux download only and hide the following:
html.macAll [data-for-os="lin"] {
display: none !important;
}

html.macIntel [data-for-os="lin"] {
display: none !important;
}

Expand All @@ -358,33 +401,61 @@
html.default [data-for-os="lin"] {
display: none !important;
}

/* Mac Intel*/
// Display the apple intel download only and hide the following:
html.macAll [data-for-os="macIntel"] {
display: none !important;
}

html.win [data-for-os="macIntel"] {
display: none !important;
}

/* Mac */
html.win [data-for-os="mac"] {
html.lin [data-for-os="macIntel"] {
display: none !important;
}

html.lin [data-for-os="mac"] {
html.default [data-for-os="macIntel"] {
display: none !important;
}

html.default [data-for-os="mac"] {
/* Mac All (non-apple intel)*/
// Display apple download with options and hide the following:
html.macIntel [data-for-os="macAll"] {
display: none !important;
}

/* Not sure what platform? */
html.win [data-for-os="default"] {
html.win [data-for-os="macAll"] {
display: none !important;
}

html.lin [data-for-os="default"] {
html.lin [data-for-os="macAll"] {
display: none !important;
}

html.mac [data-for-os="default"] {
html.default [data-for-os="macAll"] {
display: none !important;
}

/* Not sure what platform? */
// Display the default button
html.macAll [data-for-os="default"] {
display: none !important;
}

html.macIntel [data-for-os="default"] {
display: none !important;
}

html.win [data-for-os="default"] {
display: none !important;
}

html.lin [data-for-os="default"] {
display: none !important;
}

/* -------------Slideshow Styling------------- */
.slideshow-container {
max-width: 1000px;
Expand Down
4 changes: 2 additions & 2 deletions _slides/slide0.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
slide-title: v0.5.0 is coming - try it early!
slide-content: Explore the new features coming in QuPath v0.5.0 by downloading the <a href="https://github.com/qupath/qupath/releases" target="_blank" rel=”noopener”>latest release candidate</a>. You can also help us out by reporting any bugs <a href="https://forum.image.sc/tag/qupath" target="_blank" rel=”noopener”>on the forum</a>.
slide-title: v0.5.0 is finally here!
slide-content: <br> Lots of improvements, fixes & features - check out <a href="https://github.com/qupath/qupath/releases/latest"target=blank>releases</a> or the <a href="https://www.youtube.com/watch?v=tV-BYEHVCw8"target=blank>I2K YouTube video</a> to find out more.
slide-img: /assets/images/slideshow/qupath-jobs.png
---
1 change: 1 addition & 0 deletions assets/images/icons/circle-info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 11 additions & 4 deletions assets/js/os.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@
var htmlElement = document.documentElement;

if (navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i)) {
htmlElement.className = "mac";
// console.log(navigator.platform);
// if (navigator.platform == "MacIntel") {
// htmlElement.className = "macIntel";
// } else {
htmlElement.className = "macAll";
// }
} else if (navigator.platform.match(/(Win16|Win32|Android)/i)) {
htmlElement.className = "win";
} else if (navigator.platform.match(/(Linux i686|Linux armv7l|Linux x86_64|Linux x86_64)/i)) {
} else if (
navigator.platform.match(
/(Linux i686|Linux armv7l|Linux x86_64|Linux x86_64)/i
)
) {
htmlElement.className = "lin";
} else {
htmlElement.className = "default";
}

// console.log(htmlElement.className);
})();
35 changes: 20 additions & 15 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
qupath_github: https://github.com/qupath/qupath
qupath_java_docs: https://qupath.github.io/javadoc/docs/
qupath_releases: https://github.com/qupath/qupath/releases/
qupath_release_notes: https://github.com/qupath/qupath/releases/tag/v0.4.4
qupath_release_notes: https://github.com/qupath/qupath/releases/tag/v0.5.0
qupath_release_latest: https://github.com/qupath/qupath/releases/latest
qupath_download_msi: https://github.com/qupath/qupath/releases/download/v0.4.4/QuPath-0.4.4-Windows.msi
qupath_download_zip: https://github.com/qupath/qupath/releases/download/v0.4.4/QuPath-0.4.4-Windows.zip
qupath_download_pkg: https://github.com/qupath/qupath/releases/download/v0.4.4/QuPath-0.4.4-Mac.pkg
qupath_download_pkg_s: https://github.com/qupath/qupath/releases/download/v0.4.4/QuPath-0.4.4-Mac-arm64.pkg
qupath_download_tar: https://github.com/qupath/qupath/releases/download/v0.4.4/QuPath-0.4.4-Linux.tar.xz
qupath_download_msi: https://github.com/qupath/qupath/releases/download/v0.5.0/QuPath-v0.5.0-Windows.msi
qupath_download_zip: https://github.com/qupath/qupath/releases/download/v0.5.0/QuPath-v0.5.0-Windows.zip
qupath_download_pkg: https://github.com/qupath/qupath/releases/download/v0.5.0/QuPath-v0.5.0-Mac-x64.pkg
qupath_download_pkg_s: https://github.com/qupath/qupath/releases/download/v0.5.0/QuPath-v0.5.0-Mac-arm64.pkg
qupath_download_tar: https://github.com/qupath/qupath/releases/download/v0.5.0/QuPath-v0.5.0-Linux.tar.xz
qupath_documentation: https://qupath.readthedocs.io/en/stable/
qupath_installation: https://qupath.readthedocs.io/en/stable/docs/intro/installation.html
qupath_citation: https://qupath.readthedocs.io/en/stable/docs/intro/citing.html
Expand All @@ -22,11 +22,11 @@ qupath_youtube: https://www.youtube.com/c/qupath
#Metadata
layout: landing
title: QuPath
description: QuPath is cross-platform, user-friendly open source software for digital pathology and whole slide image analysis, written using JavaFX. QuPath has also been designed to be developer-friendly, and combines an extensible design with powerful scripting tools.
description: QuPath is cross-platform, user-friendly open source software for digital pathology and whole slide image analysis, written using JavaFX. QuPath has also been designed to be developer-friendly, and combines an extensible design with powerful scripting tools.
logo: assets/images/favicon.ico

#Banner
banner: <a href="https://github.com/qupath/qupath/releases/tag/v0.5.0-rc2" target=blank>QuPath v0.5.0-rc2 is available for testing!</a>
banner: <a href="https://github.com/qupath/qupath/releases/tag/v0.5.0" target=blank>QuPath v0.5.0 is now online!</a>

#Hero content
hero-heading: QuPath
Expand All @@ -46,13 +46,18 @@ download_dropdown_pkg_s: macOS Apple silicon (pkg)
download_dropdown_tar: Linux (tar.xz)

download_dropdown_aria: Submenu to download alternative releases
download_dropdown_msi_aria: follow this link to download qupath for windows m s i 224 M B
download_dropdown_zip_aria: follow this link to download qupath for windows Z I P 223 M B
download_dropdown_pkg_aria: follow this link to download qupath for macOS intel p k g 216 M B
download_dropdown_pkg_s_aria: follow this link to download qupath for macOS apple silicon p k g 185 M B
download_dropdown_tar_aria: follow this link to download qupath for Linux t a r 209 M B
download_dropdown_msi_aria: follow this link to download qupath for windows m s i 234 M B
download_dropdown_zip_aria: follow this link to download qupath for windows Z I P 233 M B
download_dropdown_mac_aria: Choose which mac version to download
download_dropdown_pkg_aria: follow this link to download qupath for macOS intel p k g 218 M B
download_dropdown_pkg_s_aria: follow this link to download qupath for macOS apple silicon p k g 202 M B
download_dropdown_which_aria: Follow this link to learn more about which mac version to download
download_dropdown_tar_aria: follow this link to download qupath for Linux t a r 224 M B

latest_release_notes: Release notes v0.4.4
qupath_download_which: https://qupath.readthedocs.io/en/latest/docs/intro/installation.html#qupath-for-mac
download_dropdown_which: Not sure which version?

latest_release_notes: Release notes v0.5.0
all_release_notes: Looking for another version? Find <a href="https://github.com/qupath/qupath/releases" target=blank>all releases</a>
install_troubleshooting: Trouble installing? Check out the <a href="https://qupath.readthedocs.io/en/stable/docs/intro/installation.html" target=blank>installation notes</a>

Expand All @@ -72,4 +77,4 @@ footer-1: To reference QuPath in scientific publications, see <a href="https://q
footer-2: QuPath is open source software, licensed under the <a href="https://github.com/qupath/qupath/blob/main/LICENSE" target="_blank" rel=”noopener”>GNU General Public License</a>
twitter_aria: follow this link to the qupath github twitter account
github_aria: follow this link to the qupath github code base
---
---

0 comments on commit 3e0adcc

Please sign in to comment.