Closed sliptonic closed 8 months ago
Release assets are here: https://github.com/Ondsel-Development/FreeCAD/releases
Can we have a component that uses the github api to get latest release and build download links on our site so we don't have to send the user to github.
We can see download statistics here: https://tooomm.github.io/github-release-stats/?username=Ondsel-Development&repository=FreeCAD
This issue is technically linked to the discussion document regarding a new /downloads/
page, so I'm keeping the discussion here. :)
The JSON REST API access point on github for latest releases based on @sliptonic comment above is: https://api.github.com/repos/Ondsel-Development/FreeCAD/releases/latest
We can parse (Fetch
) the available downloads from this list. Looking at this now.
I'm also going to shamelessly steal the OS detection code from VLC/Blender, located here :smile: :
https://www.blender.org/wp-content/themes/bthree/assets/js/get_os.js
Ran into a github unauthenticated API request rate limit (60 requests per hour) and lost time troubleshooting what i thought was a code problem on my end. fun. :)
I'll wait a bit for the reset and see about passing my own personal access token while I test.
I've got the OS detection and API endpoint working, just need to add the data and style things a bit before it'll be ready to merge. Please stand by.
Data and API is sorted out, I believe. I'll be adding the buttons and primary download page content shortly.
I got hit with COVID after my last commit. I must have caught it on our call from one of you two. ;) We'll have to push to the right a few days. Sorry. :(
@patdavid Get well soon, sir!
That was an adventure. :)
I just pushed a working example of parsing the latest download assets from github (still using a placeholder latest.json file). Please have a look at my branch pat/page-download to see it in action.
If it looks ok to you I'll issue a MR.
There are a few alignment problems there, but most of all, I understand why you had to invert Tux, but he kinda looks weird that way :) One option I can think of immediately is placing icons inside a circle of the same size everywhere and normalizing icons' size in all circles. Smth. like this: https://community.ardour.org/download?platform=linux&architecture=x86_64&type=compiled
Take a look now, should be a little neater and cleaner.
Nice improvement. Do we really need the hide/show for so few items? I haven't looked at it on mobile but that's really not going to be the target platform for the website download page anyway
I included mobile styling for it as well, so it should be responsive just fine. I can remove the show/hide button if you'd like (i could theoretically clean up the OS detection at that point as well if it won't be needed).
Let's kill the "Put your designs to work everywhere" tagline.
Let's kill the "Put your designs to work everywhere" tagline.
Done in f179d3e0
@sliptonic
I'd keep the show/hide button or at least comment the code out. If/when we get ChromeOS support, that would be a fourth option, at which point it will really makes sense to hide less relevant options.
ok. Keep but comment out for now. Defaulting to closed and showing linux only feels false. I have no idea which platform is most frequently downloaded but would bet it is Windows. When we get chromeos, it might make sense to show two and hide two.
Ok, I'll set all options to show by default and comment out the show/hide button for now.
Done in #43
We will be packaging our own version of FreeCAD. The build will be automated but the user needs a place to download the binary from.
We need to create a 'download' page and appropriate navigation to reach it from the pricing, main menu, and home page.