Skip to content

Commit

Permalink
🎨 projects in random order, too
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient committed Feb 18, 2025
1 parent a3251d3 commit 80da0ad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions site/_includes/layouts/base.vto
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'sha256-Ftz1+Zqznf5C6jgwdAo8xCGXkJQhzVzJtozZsgVs3Kg='
'sha256-1K89UoFT4hr7nGDj1zIwEOiWuAOxvXCAjN0L5Mf3iPc='
'sha256-fzu1XtrgJjljHGde0+oz5+SO6JjKD93rhanVZLGvjjk='
'sha256-KLVAEBKLf+fX4F0uq3d8ru01PU2rER2Td11pVc3Jby4='
https://plausible.commonhaus.org;
style-src 'self' 'unsafe-hashes'
'sha256-+HGPn2wSlvrmslkAGw5o4jzJb9vOBRB7el8ZIcA2h60='
Expand Down
6 changes: 6 additions & 0 deletions site/assets/random-project.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
document.addEventListener('DOMContentLoaded', function () {
const items = document.querySelectorAll('#project-list .card');
items.forEach(item => {
item.style.order = Math.floor(Math.random() * items.length + 1);
});
});
4 changes: 3 additions & 1 deletion site/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ preload:
- <link rel="preload" fetchpriority="high" as="image" href="/images/hero_mainimage.webp" type="image/webp">
cssclasses:
- site-main
scripts:
- /assets/random-project.js
---
<div class="hero">
<section class="text">
Expand Down Expand Up @@ -71,7 +73,7 @@ cssclasses:

<hr />

<section class="projects">
<section class="projects" id="project-list">
<h2 id="our-projects" tabindex="-1">
<a class="header-anchor" href="#our-projects">Our Projects</a>
</h2>
Expand Down

0 comments on commit 80da0ad

Please sign in to comment.