From 82343ec0e697b35e0c045ec9b1e6b071d9ed82da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Tue, 8 May 2018 17:14:30 +0200 Subject: [PATCH] Add google play download button --- app.css | 42 +++++++---------- app.js | 40 +++++++++++++++++ google-play-badge.png | Bin 0 -> 10014 bytes index.html | 102 +++++++++++++----------------------------- 4 files changed, 89 insertions(+), 95 deletions(-) create mode 100644 app.js create mode 100644 google-play-badge.png diff --git a/app.css b/app.css index 4fe273d..5cf9adf 100644 --- a/app.css +++ b/app.css @@ -34,8 +34,11 @@ body { padding: 30px 0; } +.container { + padding: 10px 20px; +} + .header__title { - font-size: 60px; font-size: calc(50px + 16 * (100vw - 320px) / (960 - 320)); font-weight: normal; margin-bottom: 20px; @@ -51,37 +54,26 @@ body { } .main { - margin: 0 0 50px; - padding: 0 10px; + width: 800px; + max-width: 100%; text-align: center; } -.main p { - line-height: 1.7; - text-align: left; +.section { + margin-top: 40px; +} + +.section__header { text-shadow: #000 1px 1px 5px; + font-weight: normal; } -.main--fluid { - margin: 0; - padding: 0; - width: 100%; - height: 100%; +.play-button { + display: inline-block; } -.main--background { - background: rgba(255, 255, 255, 0.8); -} - -.main--background p { - color: #333; - text-shadow: none; -} - -.container { - margin: 0 auto; - max-width: 700px; - padding: 10px 20px; +.play-image { + max-width: 300px; } .button { @@ -94,6 +86,7 @@ body { display: inline-block; font-size: 20px; padding: 15px 25px; + text-align: left; text-decoration: none; transition: background 0.3s; } @@ -133,7 +126,6 @@ body { margin-top: 30px; list-style: none; padding: 0; - display: flex; } .footer__item { diff --git a/app.js b/app.js new file mode 100644 index 0000000..2c78799 --- /dev/null +++ b/app.js @@ -0,0 +1,40 @@ +var disableClick = function(e) {e.preventDefault()}; + +var addButtonInfo = function(url, button, version, cb) { + var buttonElement = document.querySelector(button); + buttonElement.addEventListener("click", disableClick); + var versionElement = document.querySelector(version); + versionElement.innerHTML = "Ładowanie…"; + + var res = new XMLHttpRequest(); + res.open("GET", url, true); + res.onloadend = function () { + if(res.status === 200) { + cb(buttonElement, versionElement, res); + } else { + versionElement.innerHTML = "wersja nieznana"; + } + buttonElement.removeEventListener("click", disableClick); + }; + res.send(null); +}; + +addButtonInfo("https://api.github.com/repos/wulkanowy/wulkanowy/releases/latest", "#alfa-button", "#alfa-version", + function(button, version, res) { + var json = JSON.parse(res.responseText); + button.href = json.assets[0].browser_download_url; + version.innerHTML = "v" + json.name; + } +); + +addButtonInfo("https://bitrise-redirector.herokuapp.com/v0.1/apps/daeff1893f3c8128/builds/master/artifacts/app-debug-bitrise-signed.apk/info", "#nightly-button", "#nightly-version", + function(button, version, res) { + var json = JSON.parse(res.responseText); + button.href = json.expiring_download_url; + version.innerHTML = "v" + json.build_number; + + setTimeout(function() { + button.href = json.public_install_page_url; + }, 60 * 1000); + } +); diff --git a/google-play-badge.png b/google-play-badge.png new file mode 100644 index 0000000000000000000000000000000000000000..98f7a9bfda09ff0b39dc0af16ddc4f9236859d9e GIT binary patch literal 10014 zcmXY11yodB7acmKI|Zaux&;L38fg&e7&;xgkw&Bhq#3$HK)U2Zr9`?L3F$`oFKhja zMa_FNug=+L$Bov~P<(<-g$;o~o+vBHLm?0(F7US@COY^TzDd~texX~aD#}A19>4NB zN|M1VSguNj9uNo*)8jW19Pz>%yolkctge8uhK7m9DPYKt-Uop^g(%C*>cHm?vVBZ+ z6&?m(c!+qr_B_$nmI*BV&{A010+re=w9?xxw7FNoX?PD6Xd2Mz{|;4cII)HC$Xb+T zY$1mhM3v?-#&9vlJk4?>|LeYWiLpR^nd8BG$@p}){cVj;PlkuhNUO)l_2-O3f7?iz zVD{I=Pr0~oQP6SiUN|qb9490sNU5l*zK@Y-#NeaAeT5>&K3vz-)bS}hJG;^Me0LGT z@q|`2JRH^=j`imD?9XXKMa3Rph8jAAAX!>7dMm3M(+-U&dB##54l7$*CJqj4Wo706Mn~U6 z%d8NOABF1Y=QlGmlNa=GPa*6`A?~>YiNAQp%p8BW7R$>hG*?8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