96 lines
3.9 KiB
HTML
96 lines
3.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="pl">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico?v=1">
|
|
<title>Nieoficjalna aplikacja mobilna dla dziennika VULCAN UONET+ - Wulkanowy</title>
|
|
<link rel="stylesheet" href="app.css">
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-99646499-3"></script>
|
|
<script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
gtag('config', 'UA-99646499-3');
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<section class="wrapper">
|
|
<header id="header" class="header">
|
|
<h1 class="header__title">Wulkanowy</h1>
|
|
<p class="header__description">Nieoficjalna aplikacja mobilna dla dziennika <br>VULCAN UONET+</p>
|
|
</header>
|
|
<main id="main" class="main">
|
|
<a
|
|
id="beta-button"
|
|
title="Pobierz wersję beta"
|
|
href="https://github.com/wulkanowy/wulkanowy/releases"
|
|
class="button button--beta"
|
|
>Pobierz wersję beta<br>
|
|
<span id="beta-version">v0.0.0</span>
|
|
</a>
|
|
<a
|
|
id="alfa-button"
|
|
title="Pobierz wersję nightly"
|
|
href="https://bitrise-redirector.herokuapp.com/v0.1/apps/daeff1893f3c8128/builds/master/artifacts/app-debug-bitrise-signed.apk"
|
|
class="button button--nightly"
|
|
>Pobierz wersję nightly<br>
|
|
<span id="alfa-version">v000</span>
|
|
</a>
|
|
|
|
</main>
|
|
<footer id="footer" class="footer">
|
|
<a
|
|
title="Zobacz repozytorium na Githubie"
|
|
href="https://github.com/wulkanowy/wulkanowy"
|
|
class="github">
|
|
<img src="./github.svg" alt="Zobacz repozytorium na Githubie">
|
|
</a>
|
|
<ul class="footer__nav">
|
|
<li class="footer__item">
|
|
<a class="footer__link" href="https://github.com/wulkanowy">Wszystkie projekty</a>
|
|
</li>
|
|
</ul>
|
|
</footer>
|
|
</section>
|
|
<script>
|
|
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", "#beta-button", "#beta-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", "#alfa-button", "#alfa-version",
|
|
function(button, version, res) {
|
|
var json = JSON.parse(res.responseText);
|
|
button.href = json.url;
|
|
version.innerHTML = "v" + json.latestVersionCode;
|
|
}
|
|
);
|
|
</script>
|
|
</body>
|
|
</html>
|