Skip to content

Commit

Permalink
setup p5 environment
Browse files Browse the repository at this point in the history
calculating org frequency

starting to visualize orgs

changing visualization style and adding p5 library

start to displaying orgs data

update orgs mode

completing base visualization

finishing all the basic functional

fix trailing comma

change library source to cdn

move the visual to separated html file

change redirect to soc-orgs generated page

change the href target

remove vendor directory
  • Loading branch information
BlinfoldKing committed Mar 12, 2018
1 parent 48ee4b3 commit 8ffeeba
Show file tree
Hide file tree
Showing 5 changed files with 394 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Unofficial GSoC organisation list
---
<a href="list.html">2018 Organisation list</a>

<a href="orgs.html">Choose base on category</a>
<div class="search">
{% jekyll_pages_api_search_interface %}
</div>
27 changes: 27 additions & 0 deletions jsonloader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
loadJSON = (callback) => {

let xobj = new XMLHttpRequest();
xobj.overrideMimeType("application/json")
xobj.open('GET', './_data/orgs.json', true);
xobj.onreadystatechange = () => {
if (xobj.readyState === 4 && xobj.status === 200) {

// .open will NOT return a value but simply returns undefined in async mode so use a callback
callback(xobj.responseText);

}
}
xobj.send(null);

}


loadData = cb => {
loadJSON( response => {
let json = JSON.parse(response)
cb(json)
})
}



3 changes: 3 additions & 0 deletions list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
{% for org in site.data.orgs %}
<li><a href="orgs/{{ org.slug }}.html">{{ org.name }}</a>
{% endfor %}


</url>

66 changes: 66 additions & 0 deletions orgs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<style>
body {
margin: 0;
}


#container {
width: 25%;
border: solid #ff2243 3px;
position: absolute;
text-align: center;
left: 50%;
top: 50%;
background-color: #fff;
padding: 0px;
}

#head {
top: 0%;
margin: 0;
color: #fff;
background-color: #ff0043;
}

#title {
float: left;
}

#quit-btn {
float: right;
}

#quit-btn:hover {
background-color: cc0023;
}

#web {
padding: 5px;
color: #fff;
background-color: #ff0043;
}

#web:hover {
background-color: #ff2243;
}
</style>

<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/p5.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="jsonloader.js"></script>
<script src="visualizer.js"></script>

<div id="container">
<div id="head">
&nbsp;
<div id="title"> Hello </div>
<div id="quit-btn"> &times; </div>
</div>
<div id="body">
<p id="desc"></p>
</div>

<a href="" id="web">Visit Web</a>

</div>
Loading

0 comments on commit 8ffeeba

Please sign in to comment.