diff --git a/pelican/theme/aesthetic-programming/static/js/styles.js b/pelican/theme/aesthetic-programming/static/js/styles.js new file mode 100644 index 0000000000000000000000000000000000000000..26f478e964a13c0368196757a8b1b7fabe08cf6c --- /dev/null +++ b/pelican/theme/aesthetic-programming/static/js/styles.js @@ -0,0 +1,29 @@ +function loadEtherStyle(url, interval) { + function load(url) { + fetch(url) + .then(function(r) { return r.text()}) + .then(function (styles) { + var el = document.createElement('style'); + el.appendChild(document.createTextNode(styles)); + el.setAttribute('data-type', 'etherstyle'); + document.head.appendChild(el); + window.requestAnimationFrame(function () { + var styles = document.querySelectorAll('[data-type="etherstyle"]'); + for (var i=0;i<(styles.length-1);i++) { + styles[i].remove(); + } + }); + }); + } + + load(url); + var urlParameters = new URLSearchParams(window.location.search), + reload = urlParameters.get('reload'); + if (reload == 'reload') { + window.setInterval(function () { load(url); }, interval); + } +} + +(function () { + loadEtherStyle('http://pads.osp.kitchen/p/aesthetic-programming.css/export/txt/', 7500); +})(); diff --git a/pelican/theme/aesthetic-programming/templates/archives.html b/pelican/theme/aesthetic-programming/templates/archives.html deleted file mode 100644 index 44d24e6bed0a46a1446692c10ca75ec1f19ef10a..0000000000000000000000000000000000000000 --- a/pelican/theme/aesthetic-programming/templates/archives.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - {{ SITENAME }} - - - - - - {% for page in pages %} - {{ page.content }} - {% endfor %} - - \ No newline at end of file diff --git a/pelican/theme/aesthetic-programming/templates/page.html b/pelican/theme/aesthetic-programming/templates/page.html index b320c137784101c9cc910ddb68f436167c1ec1d9..538b82767e5d7190a988304a29115cc69e285143 100644 --- a/pelican/theme/aesthetic-programming/templates/page.html +++ b/pelican/theme/aesthetic-programming/templates/page.html @@ -7,10 +7,29 @@ {{ SITENAME }} - + + + + + + {{ page.content }} - \ No newline at end of file +