aboutsummaryrefslogtreecommitdiff
path: root/ps/ui/js/grid.js
diff options
context:
space:
mode:
authorYour Name <you@example.com>2017-12-23 20:08:09 +0100
committerYour Name <you@example.com>2017-12-23 20:08:09 +0100
commit79fa6979aa36b40983827fc5608b8bed85eea833 (patch)
treeedd5ee0a6bbf883036d011248b8243d748e3adaa /ps/ui/js/grid.js
parente1a06ca1c59c6af49671cf6f6ab48bcc95af6ef4 (diff)
downloadlesoiseaux.io-79fa6979aa36b40983827fc5608b8bed85eea833.tar.gz
Add existing ps.l.o site
Diffstat (limited to 'ps/ui/js/grid.js')
-rw-r--r--ps/ui/js/grid.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/ps/ui/js/grid.js b/ps/ui/js/grid.js
new file mode 100644
index 0000000..9eabe9d
--- /dev/null
+++ b/ps/ui/js/grid.js
@@ -0,0 +1,30 @@
+/**/
+
+var $ = {
+ 'info': 'info'
+};
+var info = document.getElementById('info');
+
+info.style.transition = 'opacity 2s ease-in 0s';
+info.classList.add('on');
+info.style.position = 'fixed';
+info.style.top = '10rem';
+
+// Populate Grid
+var scene = document.getElementById('scene');
+var view = document.createElement('SECTION');
+
+view.style.width = screen.availWidth;
+view.style.height = screen.availHeight;
+view.classList.add('view');
+
+var row = 0, col = 0;
+
+for (var i = 0; i < 100; i++) {
+ var v = view.cloneNode();
+ v.id = 'view-' + i;
+ v.style.left = 'calc(' + (i * view.style.width) + ' + 0px)';
+ v.style.top = 'calc(' + (Math.floor(i / 10) * view.style.height) + ' + 0px)';
+ v.style.position = 'relative';
+ scene.appendChild(v);
+}