diff --git a/_config.yml b/_config.yml index 038ba3d4..60f6f6a5 100644 --- a/_config.yml +++ b/_config.yml @@ -12,10 +12,7 @@ google_analytics: UA-119938781-2 disqus_url: "https://pupil.disqus.com" discord_url: "https://discord.gg/Stj4b5v" -github: - 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/" +github_url: "https://github.com/tom5079/Pupil" t: en: diff --git a/_layouts/default.html b/_layouts/default.html index 2f011cf6..35c19eb6 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -2,6 +2,8 @@ + + {% if site.google_analytics %} @@ -46,16 +48,33 @@ })(); + + +
diff --git a/assets/css/styles.scss b/assets/css/styles.scss index 5a7a46da..ee422dfa 100644 --- a/assets/css/styles.scss +++ b/assets/css/styles.scss @@ -10,6 +10,21 @@ img + br + em { } .center { - display: block; - margin: auto; + display: block; + margin: auto; } + +.wrap { + display: flex; + justify-content: center; + align-items: center; +} + +.wrap > * { + margin: 0 1rem; +} + +.fab, .fas { + font-size: 32px; + color: white; +} \ No newline at end of file diff --git a/assets/images/github.png b/assets/images/github.png new file mode 100644 index 00000000..628da97c Binary files /dev/null and b/assets/images/github.png differ diff --git a/assets/js/pupil.js b/assets/js/pupil.js new file mode 100644 index 00000000..9a337a2e --- /dev/null +++ b/assets/js/pupil.js @@ -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(); + }) +} \ No newline at end of file