Browse Source

Switched to 2-space indentation

gh-pages
josdejong 10 years ago
parent
commit
748a5ba8f7
3 changed files with 385 additions and 385 deletions
  1. +46
    -46
      css/style.css
  2. +273
    -273
      index.html
  3. +66
    -66
      updateversion.js

+ 46
- 46
css/style.css View File

@ -1,94 +1,94 @@
#menu {
position: absolute;
left: -170px;
top: 35px;
background-color: #a7c8f9;
padding: 15px;
border-radius: 3px;
position: absolute;
left: -170px;
top: 35px;
background-color: #a7c8f9;
padding: 15px;
border-radius: 3px;
}
#forkme {
position: fixed;
top: 0;
right: 0;
border: 0;
position: fixed;
top: 0;
right: 0;
border: 0;
}
div.nav {
text-align: center;
text-align: center;
}
div.nav ul {
text-decoration: none;
text-transform: uppercase;
text-decoration: none;
text-transform: uppercase;
margin-bottom: 30px;
padding-left: 0;
margin-bottom: 30px;
padding-left: 0;
}
li.nav {
}
div.nav ul li {
text-decoration: none;
text-transform: uppercase;
font-weight: normal;
font-size: 11pt;
text-decoration: none;
text-transform: uppercase;
font-weight: normal;
font-size: 11pt;
list-style: none;
margin-top: 5px;
list-style: none;
margin-top: 5px;
}
div.nav ul li ul li {
text-decoration: none;
text-transform: none;
font-weight: normal;
font-size: 11pt;
color: #4D4D4D;
text-decoration: none;
text-transform: none;
font-weight: normal;
font-size: 11pt;
color: #4D4D4D;
list-style: none;
list-style: none;
}
div.nav a {
color: #2B7CE9;
color: white;
font-weight: bold;
color: #2B7CE9;
color: white;
font-weight: bold;
}
.subtitle {
color: gray;
text-transform: uppercase;
font-size: 11pt;
color: gray;
text-transform: uppercase;
font-size: 11pt;
}
.download td {
border: none;
padding: 5px 20px 5px 0;
border: none;
padding: 5px 20px 5px 0;
}
.gallery .thumb {
display: inline-block;
text-align: center;
margin-right: 10px;
margin-bottom: 20px;
display: inline-block;
text-align: center;
margin-right: 10px;
margin-bottom: 20px;
}
.gallery .thumb img {
border: 1px solid white;
border-radius: 5px;
height: 90px;
margin: 0;
border: 1px solid white;
border-radius: 5px;
height: 90px;
margin: 0;
}
.gallery .thumb a:hover img {
border-color: lightgray;
border-color: lightgray;
}
.gallery .thumb div {
margin: 0;
margin: 0;
}
img {
border: 0;
border: 0;
}

+ 273
- 273
index.html View File

@ -2,104 +2,104 @@
<html>
<head>
<title>vis.js | a dynamic, browser-based visualization library</title>
<title>vis.js | a dynamic, browser-based visualization library</title>
<meta charset='utf-8' />
<meta name="title" content="vis.js">
<meta name="description" content="vis.js is a dynamic, browser-based visualization library" />
<meta name="keywords" content="vis, visualization, javascript, browser based, web based, chart, linechart, timeline, graph, network, browser" />
<meta name="author" content="Almende B.V.">
<meta charset='utf-8' />
<meta name="title" content="vis.js">
<meta name="description" content="vis.js is a dynamic, browser-based visualization library" />
<meta name="keywords" content="vis, visualization, javascript, browser based, web based, chart, linechart, timeline, graph, network, browser" />
<meta name="author" content="Almende B.V.">
<link href="docs/css/prettify.css" type="text/css" rel="stylesheet" />
<link href='docs/css/style.css' type='text/css' rel='stylesheet'>
<link href="css/style.css" type="text/css" rel="stylesheet" >
<link href="docs/css/prettify.css" type="text/css" rel="stylesheet" />
<link href='docs/css/style.css' type='text/css' rel='stylesheet'>
<link href="css/style.css" type="text/css" rel="stylesheet" >
<script type="text/javascript" src="docs/lib/prettify/prettify.js"></script>
<script type="text/javascript" src="docs/lib/prettify/prettify.js"></script>
</head>
<body onload="prettyPrint();">
<div id="container">
<div id="menu">
<a href="http://visjs.org/"><img src="img/logo/vis128.png" alt="logo"></a>
<div class="nav">
<ul>
<li><a href="#install">Install</a></li>
<li><a href="#example">Example</a></li>
<li><a href="#gallery">Gallery</a></li>
<li>
<a href="docs/index.html" target="_blank">
Docs
<img src="img/external-link-icons/external-link-icon.png" style="vertical-align: text-top;" title="Docs will open in a new window">
</a>
</li>
<li><a href="#license">License</a></li>
</ul>
</div>
</div>
<h1>
vis.js<br>
<span class="subtitle">a visual interaction system</span>
</h1>
<p>
Vis.js is a dynamic, browser based visualization library.
The library is designed to be easy to use, to handle large amounts
of dynamic data, and to enable manipulation of and interaction with the data.
The library consists of the components DataSet, Timeline, and Graph.
</p>
<p>
The vis.js library is developed by <a href="http://almende.com" target="_blank">Almende B.V</a>,
as part of the <a href="http://chap.almende.com/" target="_blank">CHAP</a>.
</p>
<h2 id="install">Install</h2>
<h3>npm</h3>
<div id="menu">
<a href="http://visjs.org/"><img src="img/logo/vis128.png" alt="logo"></a>
<div class="nav">
<ul>
<li><a href="#install">Install</a></li>
<li><a href="#example">Example</a></li>
<li><a href="#gallery">Gallery</a></li>
<li>
<a href="docs/index.html" target="_blank">
Docs
<img src="img/external-link-icons/external-link-icon.png" style="vertical-align: text-top;" title="Docs will open in a new window">
</a>
</li>
<li><a href="#license">License</a></li>
</ul>
</div>
</div>
<h1>
vis.js<br>
<span class="subtitle">a visual interaction system</span>
</h1>
<p>
Vis.js is a dynamic, browser based visualization library.
The library is designed to be easy to use, to handle large amounts
of dynamic data, and to enable manipulation of and interaction with the data.
The library consists of the components DataSet, Timeline, and Graph.
</p>
<p>
The vis.js library is developed by <a href="http://almende.com" target="_blank">Almende B.V</a>,
as part of the <a href="http://chap.almende.com/" target="_blank">CHAP</a>.
</p>
<h2 id="install">Install</h2>
<h3>npm</h3>
<pre class="prettyprint">
npm install vis
</pre>
<h3>bower</h3>
<h3>bower</h3>
<pre class="prettyprint">
bower install vis
</pre>
<h3>download</h3>
<table class="download">
<tr>
<td>
<a href="vis.js" target="_blank">Development
(version <span class="version">0.2.0</span>)</a>
</td>
<td>
<span id="development-size">441 kB</span>, uncompressed with comments
</td>
</tr>
<tr>
<td>
<a href="vis.min.js" target="_blank">Production
(version <span class="version">0.2.0</span>)</a>
</td>
<td>
<span id="production-size">39 kB</span>, minified and gzipped
</td>
</tr>
</table>
<h2 id="example">Example</h2>
<p>
A basic example demonstrating how to use the vis.js timeline is shown below.
See the <a href="#gallery">gallery</a> below for more examples.
</p>
<h3>download</h3>
<table class="download">
<tr>
<td>
<a href="vis.js" target="_blank">Development
(version <span class="version">0.2.0</span>)</a>
</td>
<td>
<span id="development-size">441 kB</span>, uncompressed with comments
</td>
</tr>
<tr>
<td>
<a href="vis.min.js" target="_blank">Production
(version <span class="version">0.2.0</span>)</a>
</td>
<td>
<span id="production-size">39 kB</span>, minified and gzipped
</td>
</tr>
</table>
<h2 id="example">Example</h2>
<p>
A basic example demonstrating how to use the vis.js timeline is shown below.
See the <a href="#gallery">gallery</a> below for more examples.
</p>
<pre class="prettyprint lang-html">&lt;!doctype html&gt;
&lt;html&gt;
@ -134,200 +134,200 @@ bower install vis
</pre>
<h2 id="gallery">Gallery</h2>
This gallery gives an idea of the features and possibilities of the library.
The source code of the examples can be found in the
<a href="https://github.com/almende/vis/tree/master/examples" target="_blank">examples directory</a>.
<h3 id="timeline">Timeline</h3>
<p>
The timeline from vis.js displays different types of data on a timeline.
</p>
<div class="gallery">
<div class="thumb">
<a href="examples/timeline/01_basic.html">
<img src="img/gallery/timeline/01_basic.png">
<div>basic usage</div>
</a>
</div>
<div class="thumb">
<a href="examples/timeline/02_dataset.html">
<img src="img/gallery/timeline/02_dataset.png">
<div>dataset</div>
</a>
</div>
<div class="thumb">
<a href="examples/timeline/03_much_data.html">
<img src="img/gallery/timeline/03_much_data.png">
<div>much data</div>
</a>
</div>
<div class="thumb">
<a href="examples/timeline/04_html_data.html">
<img src="img/gallery/timeline/04_html_data.png">
<div>html data</div>
</a>
</div>
<div class="thumb">
<a href="examples/timeline/05_groups.html">
<img src="img/gallery/timeline/05_groups.png">
<div>groups</div>
</a>
</div>
</div>
<h3 id="graph">Graph</h3>
<p>
The graph from vis.js visualizes graphs and networks with
customizable styles.
</p>
<div class="gallery">
<div class="thumb">
<a href="examples/graph/01_basic_usage.html">
<img src="img/gallery/graph/01_basic_usage.png">
<div>basic usage</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/02_random_nodes.html">
<img src="img/gallery/graph/02_random_nodes.png">
<div>random nodes</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/03_images.html">
<img src="img/gallery/graph/03_images.png">
<div>images</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/04_shapes.html">
<img src="img/gallery/graph/04_shapes.png">
<div>shapes</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/05_social_network.html">
<img src="img/gallery/graph/05_social_network.png">
<div>social network</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/06_groups.html">
<img src="img/gallery/graph/06_groups.png">
<div>groups</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/07_selections.html">
<img src="img/gallery/graph/07_selections.png">
<div>selections</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/08_mobile_friendly.html">
<img src="img/gallery/graph/08_mobile_friendly.png">
<div>mobile friendly</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/09_sizing.html">
<img src="img/gallery/graph/09_sizing.png">
<div>sizing</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/10_multiline_text.html">
<img src="img/gallery/graph/10_multiline_text.png">
<div>multiline text</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/11_custom_style.html">
<img src="img/gallery/graph/11_custom_style.png">
<div>custom style</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/12_scalable_images.html">
<img src="img/gallery/graph/12_scalable_images.png">
<div>scalable images</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/13_dashed_lines.html">
<img src="img/gallery/graph/13_dashed_lines.png">
<div>dashed lines</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/14_dot_language.html">
<img src="img/gallery/graph/14_dot_language.png">
<div>dot language</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/15_dot_language_playground.html">
<img src="img/gallery/graph/15_dot_language_playground.png">
<div>playground</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/16_dynamic_data.html">
<img src="img/gallery/graph/16_dynamic_data.png">
<div>dynamic data</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/17_network_info.html">
<img src="img/gallery/graph/17_network_info.png">
<div>network info</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/graphviz/graphviz_gallery.html">
<img src="img/gallery/graph/graphviz_gallery.png">
<div>graphviz gallery</div>
</a>
</div>
</div>
<h2 id="docs">Docs</h2>
<p>
Documentation is available here:
<a href="docs/index.html" target="_blank">Documentation</a>
</p>
<h2 id="license">License</h2>
<p>
Copyright (C) 2010-2013 Almende B.V.
</p>
<p>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
</p>
<p>
http://www.apache.org/licenses/LICENSE-2.0
</p>
<p>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</p>
<a id="forkme" href="https://github.com/almende/vis/" target="_blank">
<img src="img/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" >
<h2 id="gallery">Gallery</h2>
This gallery gives an idea of the features and possibilities of the library.
The source code of the examples can be found in the
<a href="https://github.com/almende/vis/tree/master/examples" target="_blank">examples directory</a>.
<h3 id="timeline">Timeline</h3>
<p>
The timeline from vis.js displays different types of data on a timeline.
</p>
<div class="gallery">
<div class="thumb">
<a href="examples/timeline/01_basic.html">
<img src="img/gallery/timeline/01_basic.png">
<div>basic usage</div>
</a>
</div>
<div class="thumb">
<a href="examples/timeline/02_dataset.html">
<img src="img/gallery/timeline/02_dataset.png">
<div>dataset</div>
</a>
</div>
<div class="thumb">
<a href="examples/timeline/03_much_data.html">
<img src="img/gallery/timeline/03_much_data.png">
<div>much data</div>
</a>
</div>
<div class="thumb">
<a href="examples/timeline/04_html_data.html">
<img src="img/gallery/timeline/04_html_data.png">
<div>html data</div>
</a>
</div>
<div class="thumb">
<a href="examples/timeline/05_groups.html">
<img src="img/gallery/timeline/05_groups.png">
<div>groups</div>
</a>
</div>
</div>
<h3 id="graph">Graph</h3>
<p>
The graph from vis.js visualizes graphs and networks with
customizable styles.
</p>
<div class="gallery">
<div class="thumb">
<a href="examples/graph/01_basic_usage.html">
<img src="img/gallery/graph/01_basic_usage.png">
<div>basic usage</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/02_random_nodes.html">
<img src="img/gallery/graph/02_random_nodes.png">
<div>random nodes</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/03_images.html">
<img src="img/gallery/graph/03_images.png">
<div>images</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/04_shapes.html">
<img src="img/gallery/graph/04_shapes.png">
<div>shapes</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/05_social_network.html">
<img src="img/gallery/graph/05_social_network.png">
<div>social network</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/06_groups.html">
<img src="img/gallery/graph/06_groups.png">
<div>groups</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/07_selections.html">
<img src="img/gallery/graph/07_selections.png">
<div>selections</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/08_mobile_friendly.html">
<img src="img/gallery/graph/08_mobile_friendly.png">
<div>mobile friendly</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/09_sizing.html">
<img src="img/gallery/graph/09_sizing.png">
<div>sizing</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/10_multiline_text.html">
<img src="img/gallery/graph/10_multiline_text.png">
<div>multiline text</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/11_custom_style.html">
<img src="img/gallery/graph/11_custom_style.png">
<div>custom style</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/12_scalable_images.html">
<img src="img/gallery/graph/12_scalable_images.png">
<div>scalable images</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/13_dashed_lines.html">
<img src="img/gallery/graph/13_dashed_lines.png">
<div>dashed lines</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/14_dot_language.html">
<img src="img/gallery/graph/14_dot_language.png">
<div>dot language</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/15_dot_language_playground.html">
<img src="img/gallery/graph/15_dot_language_playground.png">
<div>playground</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/16_dynamic_data.html">
<img src="img/gallery/graph/16_dynamic_data.png">
<div>dynamic data</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/17_network_info.html">
<img src="img/gallery/graph/17_network_info.png">
<div>network info</div>
</a>
</div>
<div class="thumb">
<a href="examples/graph/graphviz/graphviz_gallery.html">
<img src="img/gallery/graph/graphviz_gallery.png">
<div>graphviz gallery</div>
</a>
</div>
</div>
<h2 id="docs">Docs</h2>
<p>
Documentation is available here:
<a href="docs/index.html" target="_blank">Documentation</a>
</p>
<h2 id="license">License</h2>
<p>
Copyright (C) 2010-2013 Almende B.V.
</p>
<p>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
</p>
<p>
http://www.apache.org/licenses/LICENSE-2.0
</p>
<p>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</p>
<a id="forkme" href="https://github.com/almende/vis/" target="_blank">
<img src="img/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" >
</a>
</div>
</body>

+ 66
- 66
updateversion.js View File

@ -9,94 +9,94 @@ var VIS = 'vis.js',
// get development size
function developmentSize(callback) {
fs.readFile(VIS, function (err, data) {
if (!err) {
var size = Math.round(data.length / 1024) + ' kB';
callback(null, size);
}
else {
callback(err);
}
});
fs.readFile(VIS, function (err, data) {
if (!err) {
var size = Math.round(data.length / 1024) + ' kB';
callback(null, size);
}
else {
callback(err);
}
});
}
// get (gzipped) production size
function productionSize(callback) {
fs.readFile(VIS_MIN, function (err, data) {
fs.readFile(VIS_MIN, function (err, data) {
if (!err) {
zlib.gzip(data, function (err, data) {
if (!err) {
zlib.gzip(data, function (err, data) {
if (!err) {
var size = Math.round(data.length / 1024) + ' kB';
callback(null, size)
}
else {
callback(err);
}
});
var size = Math.round(data.length / 1024) + ' kB';
callback(null, size)
}
else {
callback(err);
callback(err);
}
});
});
}
else {
callback(err);
}
});
}
// get version
function version(callback) {
fs.readFile(VIS_MIN, function (err, data) {
if (!err) {
var match = /@version\s*([\w\.-]*)/i.exec(data);
var version = undefined;
if (match) {
version = match[1];
}
callback(null, version);
}
else {
callback(err);
}
});
fs.readFile(VIS_MIN, function (err, data) {
if (!err) {
var match = /@version\s*([\w\.-]*)/i.exec(data);
var version = undefined;
if (match) {
version = match[1];
}
callback(null, version);
}
else {
callback(err);
}
});
}
// update version and library sizes in index.md
function updateVersion(developmentSize, productionSize, version, callback) {
fs.readFile(INDEX, function (err, data) {
if (!err) {
data = String(data);
data = data.replace(/<span id="development-size">([\w\s]*)<\/span>/g,
'<span id="development-size">' + developmentSize + '</span>');
fs.readFile(INDEX, function (err, data) {
if (!err) {
data = String(data);
data = data.replace(/<span id="development-size">([\w\s]*)<\/span>/g,
'<span id="development-size">' + developmentSize + '</span>');
data = data.replace(/<span id="production-size">([\w\s]*)<\/span>/g,
'<span id="production-size">' + productionSize + '</span>');
data = data.replace(/<span id="production-size">([\w\s]*)<\/span>/g,
'<span id="production-size">' + productionSize + '</span>');
data = data.replace(/<span class="version">([\w\.-]*)<\/span>/g,
'<span class="version">' + version + '</span>');
data = data.replace(/<span class="version">([\w\.-]*)<\/span>/g,
'<span class="version">' + version + '</span>');
fs.writeFile(INDEX, data, callback);
}
else {
callback(err);
}
});
fs.writeFile(INDEX, data, callback);
}
else {
callback(err);
}
});
}
developmentSize(function (err, devSize) {
console.log('development size: ' + devSize);
productionSize(function (err, prodSize) {
console.log('production size: ' + prodSize);
version(function (err, version) {
console.log('version: ' + version);
if (devSize && prodSize && version) {
updateVersion(devSize, prodSize, version, function (err, res) {
if (err) {
console.log(err);
}
else {
console.log('done');
}
});
}
else {
}
console.log('development size: ' + devSize);
productionSize(function (err, prodSize) {
console.log('production size: ' + prodSize);
version(function (err, version) {
console.log('version: ' + version);
if (devSize && prodSize && version) {
updateVersion(devSize, prodSize, version, function (err, res) {
if (err) {
console.log(err);
}
else {
console.log('done');
}
});
}
else {
}
});
});
});

Loading…
Cancel
Save