added contributors to splash page

This commit is contained in:
Sam Keddy 2020-04-16 18:21:34 +00:00
parent 737afc6e79
commit f1fe597b80
3 changed files with 71 additions and 10 deletions

View File

@ -1,3 +1,4 @@
$base-color: #332f35;
.pixel-editor-screenshot {
box-shadow: 0px 10px 40px 0px rgba(0,0,0,0.45);
@ -7,4 +8,31 @@
border: solid 5px white;
}
hr {
margin: 4em 0 2em;
}
.contributors {
display: flex;
flex-wrap: wrap;
a {
display: flex;
flex-direction: column;
font-size: 0.7em;
text-align: center;
padding: 1em;
align-items: center;
color: lighten($base-color,50%);
img {
width: 60px;
height: 60px;
}
&:hover {
background: darken($base-color,5%);
color: white;
}
}
}

View File

@ -0,0 +1,20 @@
ajax('https://api.github.com/repos/lospec/pixel-editor/contributors', response => {
console.log(response)
if (Array.isArray(response)) {
var html = '';
response.forEach(c => {
//skip lospec
if (c.login == 'lospec') return;
//add to html
html+='<a target="_blank" href="'+c.html_url+'"><img src="'+c.avatar_url+'&s=60" /> '+c.login+'</a>'
});
document.querySelector('.contributors').innerHTML = html;
}
});

View File

@ -25,5 +25,18 @@ the latest versions of <a target="_blank" href="https://www.mozilla.org/en-US/fi
<a class="link-button" href="/pixel-editor/app">Enter app now&nbsp;&nbsp;{{svg "angle-right.svg" width="32" height="32"}}</a>
<hr />
<p>This app has been made in collaboration with <a {{outbound}} href="https://github.com/lospec/pixel-editor/graphs/contributors">contributors</a> on GitHub. We welcome anyone to submit bugfixes and new features.</p>
<div><strong>Our Contributors:</strong></div>
<div class="contributors">
</div>
<a class="link-button" {{outbound}} href="https://github.com/lospec/pixel-editor">View on GitHub&nbsp;&nbsp;{{svg "github"}}</a>