Compare commits
2 Commits
configurin
...
08ad6fb469
Author | SHA1 | Date | |
---|---|---|---|
08ad6fb469 | |||
b93aab5742 |
22
js/api.js
22
js/api.js
@ -1,22 +0,0 @@
|
|||||||
|
|
||||||
var getApiIpfsCurrent = function(onSuccess, onError) {
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open('GET', '/api/ipfs/current', true);
|
|
||||||
xhr.setRequestHeader('Accept', 'application/json');
|
|
||||||
xhr.onreadystatechange = function () {
|
|
||||||
var res = null;
|
|
||||||
if (xhr.readyState === 4) {
|
|
||||||
if (xhr.status === 204 || xhr.status === 205) {
|
|
||||||
onSuccess();
|
|
||||||
} else if (xhr.status >= 200 && xhr.status < 300) {
|
|
||||||
try { res = JSON.parse(xhr.responseText); } catch (e) { onError(e); }
|
|
||||||
if (res) onSuccess(res);
|
|
||||||
} else {
|
|
||||||
try { res = JSON.parse(xhr.responseText); } catch (e) { onError(e); }
|
|
||||||
if (res) onError(res);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
xhr.send(null);
|
|
||||||
};
|
|
||||||
|
|
10
js/app.js
10
js/app.js
@ -1,10 +0,0 @@
|
|||||||
$(document).ready(function() {
|
|
||||||
var success = function(x) {
|
|
||||||
$("#ipfs > em").html(x);
|
|
||||||
};
|
|
||||||
var error = function(x) {
|
|
||||||
$("#ipfs").hide();
|
|
||||||
console.log("ipfs hash not found: " + x);
|
|
||||||
};
|
|
||||||
getApiIpfsCurrent(success, error);
|
|
||||||
});
|
|
2
js/jquery-3.3.1.min.js
vendored
2
js/jquery-3.3.1.min.js
vendored
File diff suppressed because one or more lines are too long
7
nixpkgs.json
Normal file
7
nixpkgs.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs",
|
||||||
|
"rev": "7e1f60dfbba67b975d1a77d710a6f1437fd9709c",
|
||||||
|
"date": "2020-02-01T09:20:37-05:00",
|
||||||
|
"sha256": "0vk55459iljr5dzwnr5661l44b0wdc15952lk2rjcmxr1620yr5v",
|
||||||
|
"fetchSubmodules": false
|
||||||
|
}
|
11
release.nix
11
release.nix
@ -1,4 +1,13 @@
|
|||||||
{ pkgs ? import <nixpkgs> {} }:
|
let
|
||||||
|
pin = builtins.fromJSON (builtins.readFile ./nixpkgs.json);
|
||||||
|
pinnedPkgs = with pin; import (builtins.fetchTarball {
|
||||||
|
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
|
||||||
|
inherit sha256;
|
||||||
|
}) {};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
{ pkgs ? pinnedPkgs }:
|
||||||
|
|
||||||
let
|
let
|
||||||
haskellPackages = pkgs.haskellPackages;
|
haskellPackages = pkgs.haskellPackages;
|
||||||
|
@ -29,10 +29,6 @@
|
|||||||
<footer>
|
<footer>
|
||||||
Site proudly generated by
|
Site proudly generated by
|
||||||
<a href="http://jaspervdj.be/hakyll">Hakyll</a>
|
<a href="http://jaspervdj.be/hakyll">Hakyll</a>
|
||||||
<span id="ipfs">and found on IPFS as <em></em></ipfs>
|
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
<script type="application/javascript" src="/js/jquery-3.3.1.min.js"></script>
|
|
||||||
<script type="application/javascript" src="/js/api.js"></script>
|
|
||||||
<script type="application/javascript" src="/js/app.js"></script>
|
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user