mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 07:37:45 +00:00
add server commit history to login page
This commit is contained in:
parent
c2223f52b5
commit
0429cd9d1c
2 changed files with 77 additions and 38 deletions
|
@ -7,6 +7,7 @@ body {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 14px;
|
line-height: 14px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentContainer{
|
.contentContainer{
|
||||||
|
@ -137,3 +138,26 @@ p.pageSubTitle{
|
||||||
margin:0 auto;
|
margin:0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.commit-history {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.commit-history li a {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.commit-history li a:hover {
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.s-left-half {
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.s-link-badge {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 19px;
|
||||||
|
}
|
|
@ -58,7 +58,10 @@
|
||||||
Our Github repository
|
Our Github repository
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<h2>Github stuff here soon!</h2>
|
<h2>Recent Activity</h2>
|
||||||
|
<ul id="commit-log" class="commit-history">
|
||||||
|
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="s-full-split s-right-half col-xs-5">
|
<div class="s-full-split s-right-half col-xs-5">
|
||||||
<div class="s-logo">
|
<div class="s-logo">
|
||||||
|
@ -94,11 +97,23 @@
|
||||||
<script src="assets/js/jquery.min.js"></script>
|
<script src="assets/js/jquery.min.js"></script>
|
||||||
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
|
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
|
||||||
|
|
||||||
<script> // Run only after jq and bootstrap have finished loading
|
<script>
|
||||||
|
fetch( "https://api.github.com/repos/SapphireMordred/Sapphire/events" ).then( function( resp ) {
|
||||||
|
return resp.json();
|
||||||
|
}).then( function( data ) {
|
||||||
|
data = data.filter( function( e ) {
|
||||||
|
return e.type == "PushEvent";
|
||||||
|
});
|
||||||
|
|
||||||
// Work around non-HTML5 compliant IE autofocus
|
let commitContainer = document.getElementById( 'commit-log' );
|
||||||
$(function() {
|
for ( var evnt of data ) {
|
||||||
$('[autofocus]:not(:focus)').eq(0).focus();
|
for ( var commit of evnt.payload.commits ) {
|
||||||
|
let e = document.createElement( 'li' );
|
||||||
|
e.innerHTML = '<a href="https://github.com/SapphireMordred/Sapphire/commit/' + commit.sha + '">' + commit.message + '</a>';
|
||||||
|
|
||||||
|
commitContainer.appendChild( e );
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Add table
Reference in a new issue