_layouts/default.html in minima-rock-0.7.3 vs _layouts/default.html in minima-rock-0.8.0

- old
+ new

@@ -15,6 +15,16 @@ {%- include footer.html -%} </body> + <script> + const imgs = [ + {%- for item in site.data.backgrounds -%} + '{{ item.name }}', + {%- endfor -%} + ]; + const date = new Date(); + const index = date.getDay() % imgs.length; + document.body.style.backgroundImage = `url('{{ site.baseurl }}${imgs[index]}')`; + </script> </html>