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

cleanup and setup eslint

cleanup and setup eslint
  • Loading branch information
BlinfoldKing committed Mar 12, 2018
1 parent 48ee4b3 commit b412e89
Show file tree
Hide file tree
Showing 8 changed files with 393 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"browser": true,
"es6": true,
"jquery": true
},
"globals": {
"loadData": true
},
"rules": {
"no-unused-vars": [2, {"vars": "local"}]
},
"extends": [
"p5js",
"standard"
]
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
_site

node_modules/
package-lock.json
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>
20 changes: 20 additions & 0 deletions jsonloader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const 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)
}

/* global loadData */
const 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>
32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "gsoc-orgs",
"version": "1.0.0",
"description": "",
"main": "jsonloader.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint"
},
"repository": {
"type": "git",
"url": "git+https://github.com/summerofcode/gsoc-orgs.git"
},
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/summerofcode/gsoc-orgs/issues"
},
"homepage": "https://github.com/summerofcode/gsoc-orgs#readme",
"dependencies": {

},
"devDependencies": {
"eslint": "^4.18.2",
"eslint-config-p5js": "^1.0.1",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-standard": "^3.0.1"
}
}
Loading

0 comments on commit b412e89

Please sign in to comment.