index.json
This commit is contained in:
parent
19bb4e1308
commit
8a808d24b1
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"cSpell.words": [
|
||||
"onlinepngtools"
|
||||
]
|
||||
}
|
18
index.html
Normal file
18
index.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="viewport"
|
||||
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
|
||||
<title>www</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="deviceReady">
|
||||
<p><a href='http://localhost/slideshow/index.html'>Slideshow</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,14 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
|
||||
<meta name="viewport"
|
||||
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css" media="screen">
|
||||
<link rel="stylesheet" href="css/bootswatch/slate/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/index.css">
|
||||
<title>Slideshow</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="deviceReady">
|
||||
<div class="opaque"></div>
|
||||
@ -18,6 +21,7 @@
|
||||
<script src="scripts/jquery-1.9.1.min.js"></script>
|
||||
<script src="scripts/bootstrap.min.js"></script>
|
||||
<script src="scripts/jquery.bgswitcher.js"></script>
|
||||
<script type="text/javascript" src="scripts/index.js?nocache=2022_02_12_03_31_PM"></script>
|
||||
<script type="text/javascript" src="scripts/index.js?nocache=2022_02_12_06_16_PM"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
5
slideshow/index.json
Normal file
5
slideshow/index.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"ImageZero": "images/1x1_00000000.png",
|
||||
"DataDirectory": "../Images - Results/F) Random/2021-11-03/[]",
|
||||
"Root": "../Images - Results/C) Resize/2021-11-03/1920 x 1080/()"
|
||||
}
|
@ -7,8 +7,10 @@
|
||||
|
||||
var _Root;
|
||||
var _RootAlt;
|
||||
var _ImageZero;
|
||||
var _JsonTimer;
|
||||
var _ImageTimer;
|
||||
var _DataDirectory;
|
||||
|
||||
var _Pause = 0;
|
||||
var _Images = [];
|
||||
@ -28,12 +30,33 @@
|
||||
|
||||
document.addEventListener('keyup', getInput, false);
|
||||
|
||||
loadDevice();
|
||||
loadData();
|
||||
|
||||
_JsonTimer = setInterval(onTickJSON, _JsonInterval);
|
||||
_ImageTimer = setInterval(onTickImage, _ImageInterval);
|
||||
var url = '../slideshow/index.json';
|
||||
console.log(url);
|
||||
var _ = $.getJSON(url, function (data) {
|
||||
console.log(url + " downloaded successfully");
|
||||
_RootAlt = null;
|
||||
_Root = data.Root;
|
||||
_ImageZero = data.ImageZero;
|
||||
_DataDirectory = data.DataDirectory;
|
||||
console.log(url + " used successfully");
|
||||
})
|
||||
.done(function () {
|
||||
loadData();
|
||||
|
||||
_JsonTimer = setInterval(onTickJSON, _JsonInterval);
|
||||
_ImageTimer = setInterval(onTickImage, _ImageInterval);
|
||||
})
|
||||
.fail(function (er) {
|
||||
console.log("error", er);
|
||||
_Root = "../pictures";
|
||||
_DataDirectory = "../random";
|
||||
// _ImageZero = "images/img_tree.gif";
|
||||
// _ImageZero = "images/output-onlinepngtools.png";
|
||||
_ImageZero = "images/1x1_00000000.png"; // https://shoonia.github.io/1x1/#00000000
|
||||
})
|
||||
.always(function () {
|
||||
console.log("complete");
|
||||
});
|
||||
});
|
||||
|
||||
function onPause() {
|
||||
@ -141,14 +164,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
function loadDevice() {
|
||||
_Root = '../pictures';
|
||||
_RootAlt = null;
|
||||
}
|
||||
|
||||
function loadData() {
|
||||
var isoString = new Date().toISOString();
|
||||
var url = '../random/' + isoString.substring(5, isoString.indexOf("T")) + '.json';
|
||||
var url = _DataDirectory + '/' + isoString.substring(5, isoString.indexOf("T")) + '.json';
|
||||
console.log(url);
|
||||
var _ = $.getJSON(url, function (data) {
|
||||
console.log("success", data.length);
|
||||
@ -162,9 +180,7 @@
|
||||
})
|
||||
.fail(function (er) {
|
||||
console.log("error", er);
|
||||
//_Images = ['images/img_tree.gif'];
|
||||
//_Images = ['images/output-onlinepngtools.png'];
|
||||
_Images = ['images/1x1_00000000.png']; // https://shoonia.github.io/1x1/#00000000
|
||||
_Images = [_ImageZero];
|
||||
})
|
||||
.always(function () {
|
||||
console.log("complete");
|
||||
@ -187,9 +203,7 @@
|
||||
if (_RootAlt !== null) {
|
||||
result = result + _RootAlt + _Images[_ImageIndex] + "'), url('";
|
||||
}
|
||||
//result = result + "images/img_tree.gif');";
|
||||
//result = result + "images/output-onlinepngtools.png');";
|
||||
result = result + "images/1x1_00000000.png');"; // https://shoonia.github.io/1x1/#00000000
|
||||
result = result + _ImageZero + "');";
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user