Skip to content

Commit

Permalink
Refactor contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
WillHannon-MCB committed Sep 20, 2024
1 parent 87be927 commit 6c87feb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions .vitepress/theme/Contributors.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
<script>
import { contributorsData } from '../../contributors.js';
export default {
data() {
return {
contributors: []
contributors: contributorsData
};
},
mounted() {
fetch('/contributors.json')
.then(response => response.json())
.then(data => {
this.contributors = data;
});
},
computed: {
gridStyle() {
const columns = this.contributors.length;
Expand All @@ -22,6 +17,7 @@ export default {
}
}
};
</script>

<template>
Expand Down
2 changes: 1 addition & 1 deletion public/contributors.json → contributors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
export const contributorsData = [
{
"name": "Will Hannon",
"image": "https://jbloomlab.org/assets/people/will-hannon.jpg"
Expand Down

0 comments on commit 6c87feb

Please sign in to comment.