forked from stacsnssce/official-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
112 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,100 @@ | ||
<template> | ||
<div class="container"> | ||
Contributors | ||
<div class="center-align"> | ||
<h4>Our Contributors</h4> | ||
</div> | ||
<br> | ||
<br> | ||
<div class="row"> | ||
<section v-for="c in contributors" :key="c.id"> | ||
<div class="col s12 m4 l4"> | ||
<div class="card-panel hoverable"> | ||
<div class="card-image center-align"> | ||
<progressive-img | ||
class="faculty-img circle responsive-image" | ||
:src="`${c.attribute.avatar_url || '/profilepic.png'}`" | ||
placeholder="/imageplaceholder1x1.png" | ||
:alt="`${c.attribute.name}`" | ||
:blur="30" | ||
/> | ||
</div> | ||
<div class="card-content center-align text"> | ||
<p style="font-size:20px"> | ||
{{ c.attribute.name }} | ||
</p> | ||
<a :href="c.attribute.html_url"> | ||
View GitHub Profile | ||
<i class="fa fa-github git circle" /> | ||
</a> | ||
| ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
import axios from 'axios' | ||
export default { | ||
fetch ({ store }) { | ||
return axios.get('https://api.github.com/repos/stacsnssce/official-website/stats/contributors') | ||
.then(async ({ data }) => { | ||
/* eslint-disable no-console */ | ||
store.commit('Contributors', await Promise.all(data.map(async (element) => { | ||
return await axios.get(element.author.url) | ||
.then((res) => { | ||
// eslint-disable-next-line | ||
// console.log(mdf) | ||
return { | ||
attribute: res.data | ||
} | ||
}) | ||
// store.commit('Contributors', contributors) | ||
}))) | ||
}) | ||
.then(() => { | ||
}) | ||
}, | ||
computed: { | ||
contributors () { | ||
return this.$store.state.contributors | ||
} | ||
} | ||
} | ||
</script> | ||
<style lang="scss"> | ||
.faculty-img { | ||
width: 225px !important; | ||
height: 225px !important; | ||
<style> | ||
img { | ||
width: 225px!important; | ||
height: 225px!important; | ||
object-fit: cover; | ||
} | ||
} | ||
</style> | ||
<style lang="scss" scoped> | ||
.card-panel { | ||
border-radius: 16px 16px 16px 16px; | ||
box-shadow: 0 4px 8px grey; | ||
height: 400px; | ||
} | ||
.text { | ||
text-align: center; | ||
font-weight: bold; | ||
font-size: 16px; | ||
} | ||
.middle { | ||
position: absolute; | ||
font-size: 28px; | ||
overflow: hidden; | ||
text-align: center; | ||
} | ||
.git{ | ||
color: #211F1F; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters