wulkanowy.github.io/index.html

141 lines
5.1 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
2017-12-27 23:45:01 +01:00
<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">
2017-12-27 23:55:49 +01:00
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico?v=1">
2017-12-27 23:45:01 +01:00
<title>Wulkanowy</title>
<style>
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
html, body, .wrapper {
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
body {
background: url(wallpaper.jpg) no-repeat center / cover fixed;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.wrapper {
align-items: center;
background: -moz-radial-gradient(center center, circle cover, transparent, #000);
background: -ms-radial-gradient(center center, circle cover, transparent, #000);
background: -webkit-radial-gradient(center center, circle cover, transparent, #000);
background: radial-gradient(center center, circle cover, transparent, #000);
display: flex;
flex-direction: column;
justify-content: center;
}
.header__title {
color: #fff;
font-size: 60px;
font-size: calc(50px + 16 * (100vw - 320px) / (960 - 320));
font-weight: normal;
text-align: center;
text-shadow: #000 5px 5px 5px;
}
.main {
margin: 0 0 50px;
text-align: center;
}
.button {
2018-05-02 19:47:36 +02:00
width: 100%;
max-width: 300px;
margin: 10px 0;
2017-12-27 23:45:01 +01:00
background: rgb(112, 50, 50);
border-radius: 3px;
color: #eee;
display: inline-block;
font-size: 25px;
padding: 15px 25px;
text-decoration: none;
transition: background 0.3s;
}
2018-05-02 19:47:36 +02:00
.button--nightly {
background: #333;
}
2017-12-27 23:45:01 +01:00
.button:hover, .button:focus, .button:active {
background: rgb(90, 45, 45);
}
.github {
transition: opacity 0.3s;
}
.github:hover, .github:focus, .github:active {
opacity: 0.7;
}
</style>
2017-12-29 19:14:32 +01:00
<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>
2017-12-27 23:45:01 +01:00
</head>
<body>
<section class="wrapper">
<header id="header" class="header">
<h1 class="header__title">Wulkanowy</h1>
</header>
<main id="main" class="main">
<a
2018-05-02 19:47:36 +02:00
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">0.0.0</span>
</a>
<a
title="Pobierz wersję nightly"
2018-03-26 23:38:32 +02:00
href="https://bitrise-redirector.herokuapp.com/v0.1/apps/daeff1893f3c8128/builds/master/artifacts/app-debug-bitrise-signed.apk"
2018-05-02 19:47:36 +02:00
class="button button--nightly"
>Pobierz wersję nightly<br>
<span id="alfa-version">000</span>
</a>
2017-12-27 23:45:01 +01:00
</main>
<footer id="footer" class="footer">
<a
2018-05-02 19:47:36 +02:00
id="alfa-button"
2017-12-27 23:45:01 +01:00
title="Zobacz repozytorium na Githubie"
href="https://github.com/wulkanowy/wulkanowy"
class="github">
<img src="./github.svg" alt="Zobacz repozytorium na Githubie">
</a>
</footer>
</section>
2018-05-02 19:47:36 +02:00
<script>
const disableClick = e => e.preventDefault();
const betaButton = document.querySelector("#beta-button");
betaButton.addEventListener("click", disableClick);
fetch("https://api.github.com/repos/wulkanowy/wulkanowy/releases/latest")
.then(res => { return res.json() })
.then(json => {
betaButton.removeEventListener("click", disableClick);
betaButton.href = json.assets[0].browser_download_url;
document.querySelector("#beta-version").innerHTML = json.name;
});
const alfaButton = document.querySelector("#alfa-button")
alfaButton.addEventListener("click", disableClick);
fetch("https://bitrise-redirector.herokuapp.com/v0.1/apps/daeff1893f3c8128/builds/master/artifacts/app-debug-bitrise-signed.apk/info")
.then(res => { return res.json() })
.then(json => {
alfaButton.removeEventListener("click", disableClick);
alfaButton.href = json.url;
document.querySelector("#alfa-version").innerHTML = json.latestVersionCode;
});
</script>
2017-12-27 23:45:01 +01:00
</body>
</html>