Skip to content

Commit b85b2bb

Browse files
committed
fix small issues
1 parent 379684e commit b85b2bb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/pages/index.astro

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,16 @@ import { getAllPeople, getAllProjects, getRecentPosts } from '@/lib/data-utils'
1111
import ImageCarousel from '@/components/ui/image-carousel'
1212
import { getCollection } from 'astro:content'
1313
14+
function shuffleArray(array: any[]) {
15+
for (let i = array.length - 1; i > 0; i--) {
16+
const j = Math.floor(Math.random() * (i + 1));
17+
[array[i], array[j]] = [array[j], array[i]];
18+
}
19+
}
20+
1421
const blog = await getRecentPosts(SITE.featuredPostCount)
1522
const people = await getAllPeople()
23+
shuffleArray(people);
1624
const projects = await getAllProjects()
1725
const groupPhotos = await getCollection('groupPhotos')
1826
---

src/pages/publications.astro

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,12 @@ const publications = await getCollection('publications')
1919
<Image
2020
src={publication.data.image}
2121
alt={publication.data.title}
22-
height={100}
23-
width={200}
2422
class="w-1/4 object-cover"
2523
/>
2624
) : (
2725
<img
2826
src="/static/social-preview.png"
2927
alt={publication.data.title}
30-
height={100}
31-
width={200}
3228
class="w-1/4 object-cover"
3329
/>
3430
)}

0 commit comments

Comments
 (0)