Browse Source

added CDN check

gh-pages
Alex de Mulder 9 years ago
parent
commit
7a2681be8b
2 changed files with 22 additions and 3 deletions
  1. +5
    -0
      css/style.css
  2. +17
    -3
      index.html

+ 5
- 0
css/style.css View File

@ -3,6 +3,11 @@ body {
font-size:16px; font-size:16px;
} }
#linkStatus {
font-size:12px;
font-style: italic;
}
a.btn { a.btn {
width:130px; width:130px;
} }

+ 17
- 3
index.html View File

@ -12,6 +12,7 @@
<link rel="icon" HREF="favicon.ico"> <link rel="icon" HREF="favicon.ico">
<title>vis.js - A dynamic, browser based visualization library.</title> <title>vis.js - A dynamic, browser based visualization library.</title>
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->
<link href="./css/bootstrap.css" rel="stylesheet"> <link href="./css/bootstrap.css" rel="stylesheet">
@ -26,13 +27,25 @@
<![endif]--> <![endif]-->
<script src="./js/smooth-scroll.min.js"></script> <script src="./js/smooth-scroll.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.5.0/vis.min.js"></script>
<script language="JavaScript"> <script language="JavaScript">
smoothScroll.init(); smoothScroll.init();
function evalLinks() {
if (typeof vis === 'undefined') {
console.log(document.getElementById("linkStatus"))
document.getElementById("linkStatus").innerHTML = "-- CDN links are momentarily unavailable.<br />";
document.getElementById("cdn_vis").style.color = "rgb(150,150,150)";
document.getElementById("cdn_vis_css").style.color = "rgb(150,150,150)";
}
}
</script> </script>
</head> </head>
<!-- NAVBAR <!-- NAVBAR
================================================== --> ================================================== -->
<body>
<body onload="evalLinks()">
<div class="navbar-wrapper"> <div class="navbar-wrapper">
<div class="container"> <div class="container">
<nav class="navbar navbar-inverse navbar-static-top" role="navigation"> <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
@ -183,8 +196,9 @@
<pre class="prettyprint">bower install vis</pre> <pre class="prettyprint">bower install vis</pre>
<h3>link from cdnjs.com</h3> <h3>link from cdnjs.com</h3>
<p> <p>
<a href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.5.0/vis.min.js" target="_blank">vis.min.js</a> <br>
<a href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.5.0/vis.min.css" target="_blank">vis.min.css</a> <br>
<a id="cdn_vis" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.5.0/vis.min.js" target="_blank">vis.min.js</a> <br>
<a id="cdn_vis_css" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.5.0/vis.min.css" target="_blank">vis.min.css</a> <br>
<span id="linkStatus"></span>
</p> </p>
<h3>download</h3> <h3>download</h3>
<p> <p>

Loading…
Cancel
Save