Browse Source

added breadcrumbs to all pages

flowchartTest
Felix Hayashi 9 years ago
parent
commit
fe9086b38e
18 changed files with 117 additions and 13 deletions
  1. +15
    -0
      docs/css/style.css
  2. +3
    -1
      docs/data/dataset.html
  3. +3
    -1
      docs/data/dataview.html
  4. +3
    -1
      docs/data/index.html
  5. +5
    -1
      docs/graph2d/index.html
  6. +3
    -1
      docs/graph3d/index.html
  7. +11
    -0
      docs/index.html
  8. +46
    -0
      docs/js/main.js
  9. +3
    -1
      docs/network/configure.html
  10. +2
    -0
      docs/network/edges.html
  11. +3
    -1
      docs/network/groups.html
  12. +3
    -1
      docs/network/index.html
  13. +3
    -1
      docs/network/interaction.html
  14. +3
    -1
      docs/network/layout.html
  15. +3
    -1
      docs/network/manipulation.html
  16. +2
    -0
      docs/network/nodes.html
  17. +3
    -1
      docs/network/physics.html
  18. +3
    -1
      docs/timeline/index.html

+ 15
- 0
docs/css/style.css View File

@ -188,4 +188,19 @@ pre.options {
pre.hidden {
display:none;
}
#breadcrumbs {
font-size: 0.85em;
}
#breadcrumbs::before {
content: "You are here:";
padding-right: 5px;
}
#breadcrumbs > *:not(:first-child)::before{
content: "▸";
padding: 0 2px 0 5px;
display:inline-block;
}

+ 3
- 1
docs/data/dataset.html View File

@ -996,4 +996,6 @@ var positiveBalance = dataset.get({
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 3
- 1
docs/data/dataview.html View File

@ -386,4 +386,6 @@ view.on('*', function (event, properties, senderId) {
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 3
- 1
docs/data/index.html View File

@ -111,4 +111,6 @@
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 5
- 1
docs/graph2d/index.html View File

@ -1411,4 +1411,8 @@ Graph2d.off('rangechanged', onChange);
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 3
- 1
docs/graph3d/index.html View File

@ -765,4 +765,6 @@ graph3d.on('cameraPositionChange', onCameraPositionChange);
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 11
- 0
docs/index.html View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0;url=../index.html#modules">
<title>Page Redirection</title>
</head>
<body>
If you are not redirected automatically, follow this <a href="../index.html#modules">link</a>.
</body>
</html>

+ 46
- 0
docs/js/main.js View File

@ -0,0 +1,46 @@
$(document).ready(function() {
vis.createBreadcrumbs($(".container.full").first());
});
// namespace
var vis = {};
/**
* Adds a breadcrumb as first child to the specified container.
*
* @author felixhayashi
*/
vis.createBreadcrumbs = function(container) {
// use the url to infer the path
var crumbs = location.pathname.split('/');
// number of ancestor directories
var stepbackIndex = crumbs.length-1;
var breadcrumbs = $.map(crumbs, function(crumb, i) {
// first and last element of the split
if(!crumb) return;
stepbackIndex--;
if(/\.html$/.test(crumb)) {
// strip the .html to make it look prettier
return "<span>" + crumb.replace(/\.html$/, "") + "</span>";
} else {
// calculate the relative url
for(var ref=crumb+"/", j=0; j<stepbackIndex; j++, ref="../"+ref);
return "<a href='" + ref + "'>" + crumb + "</a>";
}
}).join("") || "Home";
// insert into the container at the beginning.
$(container).prepend("<div id=\"breadcrumbs\">" + breadcrumbs + "</div>");
};

+ 3
- 1
docs/network/configure.html View File

@ -168,4 +168,6 @@ function (option, path) {
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 2
- 0
docs/network/edges.html View File

@ -660,3 +660,5 @@ var options: {
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 3
- 1
docs/network/groups.html View File

@ -152,4 +152,6 @@ var options = {
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 3
- 1
docs/network/index.html View File

@ -1565,4 +1565,6 @@ var network = new vis.Network(container, data, options);
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 3
- 1
docs/network/interaction.html View File

@ -146,4 +146,6 @@ network.setOptions(options);
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 3
- 1
docs/network/layout.html View File

@ -126,4 +126,6 @@ network.setOptions(options);
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 3
- 1
docs/network/manipulation.html View File

@ -178,4 +178,6 @@ var options = {
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 2
- 0
docs/network/nodes.html View File

@ -647,3 +647,5 @@ mySize = minSize + diff * scale;
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 3
- 1
docs/network/physics.html View File

@ -196,4 +196,6 @@ network.setOptions(options);
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

+ 3
- 1
docs/timeline/index.html View File

@ -1606,4 +1606,6 @@ var options = {
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<script src="../js/ie10-viewport-bug-workaround.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>

Loading…
Cancel
Save