Browse Source

updated bridge demo

gh-pages
Alex de Mulder 9 years ago
parent
commit
e6caf50f17
8 changed files with 1 additions and 171 deletions
  1. +0
    -1
      showcase/projects/bridge/.gitignore
  2. +0
    -2
      showcase/projects/bridge/README.md
  3. BIN
      showcase/projects/bridge/background-moche.png
  4. +1
    -1
      showcase/projects/bridge/demo.html
  5. +0
    -20
      showcase/projects/bridge/package.json
  6. +0
    -53
      showcase/projects/bridge/parseData.js
  7. +0
    -93
      showcase/projects/bridge/style.css
  8. +0
    -1
      showcase/projects/bridge/timeline.json

+ 0
- 1
showcase/projects/bridge/.gitignore View File

@ -1 +0,0 @@
.idea/

+ 0
- 2
showcase/projects/bridge/README.md View File

@ -1,2 +0,0 @@
# bridge
bridgeDemo

BIN
showcase/projects/bridge/background-moche.png View File

Before After
Width: 600  |  Height: 600  |  Size: 12 KiB

+ 1
- 1
showcase/projects/bridge/demo.html View File

@ -8,7 +8,7 @@
<script src="js/timelineAgent.js"></script>
<link href="js/vis/vis.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="./css/timelineStyle.css" rel="stylesheet" type="text/css" />
</head>
<body>

+ 0
- 20
showcase/projects/bridge/package.json View File

@ -1,20 +0,0 @@
{
"name": "BRIDGE",
"version": "0.2.0",
"description": "Cloud element for BRIDGE demo",
"main": "proxy.js",
"scripts": {
"start": "node proxy.js"
},
"dependencies": {
"evejs": "0.4.6-test"
},
"engines": {
"node": "0.10.x"
},
"keywords": [
"node",
"heroku",
"express"
]
}

+ 0
- 53
showcase/projects/bridge/parseData.js View File

@ -1,53 +0,0 @@
/**
* Created by Alex on 2/2/2015.
*/
fs = require('fs')
function writeToFile(data, outputFilename, callback) {
fs.writeFile(outputFilename, JSON.stringify(data), function (err) {
if (err) {
console.log(err);
} else {
console.log("JSON saved to " + outputFilename);
callback();
//getNewAssignment();
}
});
}
function parse(data, callback) {
var objects = Object.keys(data.things);
var timelineData = [];
var groups = [];
var groupsObj = {};
for (var i = 0; i < objects.length; i++) {
var thing = data.things[objects[i]];
if (thing.properties.description && thing.properties.date) {
timelineData.push({
id:i,
content: thing.type,
start: new Date(thing.properties.date.value).valueOf(),
group: thing.type
});
if (groupsObj[thing.type] === undefined) {
groupsObj[thing.type] = true;
groups.push({id:thing.type, content:thing.type});
}
}
}
console.log("amont of data", timelineData.length, "amount of groups:", groups.length)
var dataToWrite = {data: timelineData, groups:groups};
writeToFile(dataToWrite, "timeline.json", function(){});
}
fs.readFile('./data.json', 'utf8', function (err, data) {
if (err) {
return console.log(err);
}
parse(JSON.parse(data));
});

+ 0
- 93
showcase/projects/bridge/style.css View File

@ -1,93 +0,0 @@
body {
background: #222;
font-family: "Fira Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 15pt;
line-height: 1.42857;
color: white;
}
/* timeline background */
.vis.timeline.root {
border: none;
background: #3e647e url(timeline/background-moche.png); /* blue2 */
background: #e1953f url(timeline/background-moche.png); /* orange */
background: #422a6c url(timeline/background-moche.png); /* purple */
background: #3145B1 url(timeline/background-moche.png); /* blue */
}
/* grid styling */
.vis.timeline .timeaxis .text {
color: white;
padding-top: 6px;
padding-left: 6px;
}
.vis.timeline .timeaxis .text.major {
font-weight: bold;
}
.vis.timeline .timeaxis .grid.minor {
border-width: 1px;
border-color: rgba(255,255,255, 0.2);
}
.vis.timeline .timeaxis .grid.major {
border-width: 1px;
border-color: rgba(255,255,255, 0.5);
}
/* default item class */
.vis.timeline .item,
.vis.timeline .item.line {
border-width: 2px;
}
.vis.timeline .item.dot {
border-width: 6px;
border-radius: 6px;
}
.vis.timeline .item {
border-color: lightgray;
background-color: white;
color: #222;
}
.vis.timeline .item.selected {
border-color: lightgray;
background-color: white;
box-shadow: 0 0 16px rgba(255,255,255, 0.7);
}
/* custom item classes */
.vis.timeline .item.green {
background-color: #6dd22f;
border-color: green;
color: white;
}
.vis.timeline .item.orange {
background-color: #ffdb07;
border-color: orange;
}
.vis.timeline .item.red {
background-color: #ce0000;
border-color: darkred;
color: white;
}
.vis.timeline .item.magenta {
background-color: #ff00ff;
border-color: darkmagenta;
color: white;
}

+ 0
- 1
showcase/projects/bridge/timeline.json
File diff suppressed because it is too large
View File


Loading…
Cancel
Save