Skip to content

Commit 0e141b9

Browse files
Removed snow flakes + fixed 404 (#103)
1 parent ccc8c88 commit 0e141b9

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

community/index.html

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,19 @@
4747
<script type="module">
4848
import SnowFlakes from '/assets/js/snow-flakes.js';
4949

50-
const canvas = document.createElement('canvas');
51-
canvas.classList.add('show-flakes');
52-
document.body.appendChild(canvas);
50+
const month = (new Date).getMonth();
5351

54-
new SnowFlakes(canvas, 10 + Math.random() * 100, 2).start();
55-
setTimeout(() => {
56-
canvas.style.opacity = 1;
57-
}, 1000);
52+
// show snow flakes only in winter
53+
if (month < 2 || month > 10) {
54+
const canvas = document.createElement('canvas');
55+
canvas.classList.add('show-flakes');
56+
document.body.appendChild(canvas);
57+
58+
new SnowFlakes(canvas, 10 + Math.random() * 100, 2).start();
59+
setTimeout(() => {
60+
canvas.style.opacity = 1;
61+
}, 1000);
62+
}
5863
</script>
5964
</head>
6065

error.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ <h2>Documentation</h2>
7373
<!-- begin dialog content -->
7474
<div class="dialogs">
7575
<!-- begin examples badge -->
76-
<a href="https://pyscript.com/@examples" target="_blank" rel="noreferrer noopener" class="dialog">
76+
<a href="/community/" target="_blank" rel="noreferrer noopener" class="dialog">
7777
<div class="glyph">
7878
<svg width="16px" height="16px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-grid">
7979
<path d="M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5v-3zM2.5 2a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zm6.5.5A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zM1 10.5A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3zm6.5.5A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5v-3zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z"/>
8080
</svg>
8181
</div>
8282
<div>
8383
<h2>Examples</h2>
84-
<p>See what PyScript can do.</p>
84+
<p>See what PyScript can do and what others are building with it.</p>
8585
</div>
8686
</a>
8787
<!-- end examples badge -->

0 commit comments

Comments
 (0)