21 lines
627 B
Plaintext
21 lines
627 B
Plaintext
<% const snow = [];%>
|
|
<noscript>
|
|
|
|
<%
|
|
const m = new Date().getMonth();
|
|
snowflakes = "❅❆❃❊❉";
|
|
if ([11,0,1].includes(m)) {
|
|
const winter = 10;
|
|
for (let i = 0; i < winter; i++) {
|
|
snow.push(snowflakes[Math.floor(Math.random() * snowflakes.length)]);
|
|
}
|
|
}
|
|
for(var i = 0; i < snow.length; i++) { %>
|
|
<div class="snowflake"><%= snow[i] %> </div>
|
|
<% } %>
|
|
</noscript>
|
|
<% if (snow.length) { %>
|
|
<script src="/assets/js/snow.js"></script>
|
|
<% } %>
|
|
|