.
This commit is contained in:
@@ -12,10 +12,7 @@ google_analytics: UA-119938781-2
|
|||||||
disqus_url: "https://pupil.disqus.com"
|
disqus_url: "https://pupil.disqus.com"
|
||||||
discord_url: "https://discord.gg/Stj4b5v"
|
discord_url: "https://discord.gg/Stj4b5v"
|
||||||
|
|
||||||
github:
|
github_url: "https://github.com/tom5079/Pupil"
|
||||||
latest_url: "https://github.com/tom5079/Pupil/releases/download/4.3-hotfix1/Pupil-v4.3-hotfix1.apk"
|
|
||||||
release_url: "https://github.com/tom5079/Pupil/releases/"
|
|
||||||
issue_url: "https://github.com/tom5079/Pupil/issues/"
|
|
||||||
|
|
||||||
t:
|
t:
|
||||||
en:
|
en:
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
<html lang="{{ site.lang | default: " en-US " }}">
|
<html lang="{{ site.lang | default: " en-US " }}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||||
|
<script src="https://kit.fontawesome.com/695c47bd28.js" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
{% if site.google_analytics %}
|
{% if site.google_analytics %}
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
||||||
@@ -46,16 +48,33 @@
|
|||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script type='text/javascript' src='/Pupil/assets/js/pupil.js'></script>
|
||||||
|
<script>
|
||||||
|
Promise.resolve()
|
||||||
|
.then(getLatestRelease)
|
||||||
|
.then(result => {
|
||||||
|
let url = result["assets"][0]["browser_download_url"];
|
||||||
|
|
||||||
|
$("#download-btn").attr("href", url)
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header class="page-header" role="banner">
|
<header class="page-header" role="banner">
|
||||||
<a href="https://tom5079.github.io/Pupil" style="text-decoration:none; color:inherit;"><h1 class="project-name">{{ page.title | default: site.title | default: site.github.repository_name }}</h1></a>
|
<a href="https://tom5079.github.io/Pupil" style="text-decoration:none; color:inherit;"><h1 class="project-name">{{ page.title | default: site.title | default: site.github.repository_name }}</h1></a>
|
||||||
<h2 class="project-tagline">{{ site.t[page.lang].header.description }}</h2>
|
<h2 class="project-tagline">{{ site.t[page.lang].header.description }}</h2>
|
||||||
<a href="{{ site.github.latest_url }}" class="btn">{{ site.t[page.lang].header.download }}</a>
|
<a id="download-btn" class="btn">{{ site.t[page.lang].header.download }}</a>
|
||||||
<a href="{{ site.github.issue_url }}" target="_blank" class="btn">{{ site.t[page.lang].header.issue }}</a> {{ site.t[page.lang].header.or }}
|
<p/>
|
||||||
<a href="mailto:pupil.hentai@gmail.com" class="btn">{{ site.t[page.lang].header.email }}</a>
|
<div class="wrap">
|
||||||
<a href="{{ site.discord_url }}" class="btn">{{ site.t[page.lang].header.discord }}</a>
|
<a href="{{ site.github_url }}"><i class="fab fa-github"></i></a>
|
||||||
|
<a href="mailto:pupil.hentai@gmail.com"><i class="fas fa-envelope"></i></a>
|
||||||
|
<a href="{{ site.discord_url }}"><i class="fab fa-discord"></i></a>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main id="content" class="main-content" role="main">
|
<main id="content" class="main-content" role="main">
|
||||||
|
|||||||
@@ -10,6 +10,21 @@ img + br + em {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.center {
|
.center {
|
||||||
display: block;
|
display: block;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrap > * {
|
||||||
|
margin: 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fab, .fas {
|
||||||
|
font-size: 32px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
BIN
assets/images/github.png
Normal file
BIN
assets/images/github.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
22
assets/js/pupil.js
Normal file
22
assets/js/pupil.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const LATEST_URL = "https://api.github.com/repos/tom5079/Pupil/releases/latest";
|
||||||
|
|
||||||
|
function getLatestRelease() {
|
||||||
|
return new Promise(function(resolve, reject) {
|
||||||
|
const xhr = new XMLHttpRequest();
|
||||||
|
|
||||||
|
xhr.open("GET", LATEST_URL)
|
||||||
|
xhr.onreadystatechange = function() {
|
||||||
|
if (xhr.readyState === 4) {
|
||||||
|
if (xhr.status === 200) {
|
||||||
|
resolve(JSON.parse(xhr.responseText))
|
||||||
|
} else {
|
||||||
|
reject(new Error('XHR failed on getLAtestRelease() with status ' + xhr.status))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
xhr.send();
|
||||||
|
})
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user