triplea-game / triplea-game.github.io

TripleA Website
https://triplea-game.org/
GNU Affero General Public License v3.0
13 stars 18 forks source link

Auto-detect optimal download option #319

Closed RoiEXLab closed 5 years ago

RoiEXLab commented 5 years ago

Alternative to #318 Based on https://stackoverflow.com/a/6866569 and https://stackoverflow.com/a/19883965 If that isn't accurate enough we might want to consider using a library like https://github.com/bestiejs/platform.js If no platform information is available, or the information available does not match anything the same download website is shown which currently exists, with all 4 options. The same happens when javascript is disabled.

Obviously I haven't been able to test the code on multiple systems, but I'm going to trust the internet on this one 🤷‍♂

Preview: Preview

DanVanAtta commented 5 years ago

Demo'ed, I like it. I would make it a bit easier to find other platforms.

I'd consider one of two treatments: (1) update the link text and have the link go to a download page with the 4 buttons we had (2 leaning towards this personally) Change the "other versions" text to "download for other platforms" and then below that have the 3 remaining buttons, but smaller.

Something like this: Screenshot from 2019-06-10 15-15-15

A nice benefit to that (2) option is a person does not have to read the link text to find the right version in case they want a different one, and it avoids the need for a second page.

DanVanAtta commented 5 years ago

Requesting link text be updated and the other download options not be from github releases.

RoiEXLab commented 5 years ago

Ok then, I'll have a look at it tomorrow (currently 1 AM here ^^)

RoiEXLab commented 5 years ago

Ok, revision 2: Screenshot

The current HTML really needs some work, the download buttons size is currently tied to the underlying image size, that's why I used a simple scale transformation to achieve small buttons. This obviously also shrinks down the text size, but otherwise I'd have to redo how those buttons work, a nice follow-up PR.

RoiEXLab commented 5 years ago

@DanVanAtta Feel free to restart the build, looks like one of the sites a link points to is down.