Skip to content

Commit ee689cd

Browse files
committed
upgraded to jquery 3.2.1 to resolve issues with facebook/twitter loads. system is now working pretty well but with errors on twitter reload (t is null, sandbox not initialized) and google analytics reload. way better though...
1 parent bd1a75f commit ee689cd

File tree

8 files changed

+10348
-680
lines changed

8 files changed

+10348
-680
lines changed

war/css/main.css

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,15 @@
366366
float: left;
367367
}
368368

369+
.ted {
370+
font-family: Helvetica, Arial, sans-serif;
371+
color: rgb(230, 43, 30);
372+
letter-spacing: 0;
373+
/*font-kerning: auto;*/
374+
font-weight: 800;
375+
}
376+
377+
369378
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
370379
#nbc {
371380
background-image: url("../img/nbc2x.png");
@@ -800,11 +809,3 @@ dd {
800809
.clearer {
801810
clear: both;
802811
}
803-
804-
.ted {
805-
font-family: Helvetica, Arial, sans-serif;
806-
color: rgb(230, 43, 30);
807-
letter-spacing: 0;
808-
/*font-kerning: auto;*/
809-
font-weight: 800;
810-
}

war/getting_started.html

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -217,61 +217,64 @@ <h1>Contribute</h1>
217217
We are constantly looking for collaborators and people that share our vision.
218218
<br/><br/>
219219
If you want to contribute to the project in any way you should visit the <a href="./get_involved.html">Get Involved</a> page.
220-
We have put together some common profiles but if yours doesn't fit in any of them please drop us a <a href="./contacts.html">line</a> anyway, we'd love to hear from you!
220+
We have put together some common profiles but if yours doesn't fit in any of them please <a href="./contacts.html">drop us a line</a> anyway, we'd love to hear from you!
221221
</p>
222222

223223
</section>
224224
</div>
225225

226226
</div>
227227
</div>
228-
<script type="text/javascript">
229-
$(function() {
230-
$('.nav li').removeClass('active');
231-
$('#started').addClass('active');
232-
});
233-
</script>
234-
</div><!-- end pj-content -->
228+
</div><!-- end pjax content -->
235229

236-
237-
<!-- Footer inserted with jquery
230+
<!-- Footer navigation
238231
================================================== -->
239232
<div id="foot-nav"></div>
240233

241-
242234
<!-- Le javascript
243235
================================================== -->
244236
<!-- Placed at the end of the document so the pages load faster -->
245-
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
246-
<script src="js/jquery-1.8.3.min.js"></script>
247-
<script src="js/bootstrap.js"></script>
248-
<script type="text/javascript" src="js/jquery.parss.uncompressed.js"></script>
249-
250-
<!-- <script src="js/jquery.colorbox-min.js"></script>-->
251-
<script src="js/main.js"></script>
252237

253-
<script type="text/javascript">
238+
<!-- pull in header/footer w/ jquery -->
239+
<script>
254240
$.get('header-content.html', function(data) {
255241
$('#head-nav').html(data);
256-
});
242+
})
257243
$.get('footer-content.html', function(data) {
258244
$('#foot-nav').html(data);
259-
});
245+
})
260246
</script>
261247

262-
<script type="text/javascript">
263-
var _gaq = _gaq || [];
264-
_gaq.push(['_setAccount', 'UA-29668455-1']);
265-
_gaq.push(['_trackPageview']);
248+
<!-- jquery was loaded in head. load other resources: -->
249+
<script src="js/bootstrap.js"></script>
250+
<script src="js/jquery.parss.uncompressed.js"></script>
251+
<script src="js/main.js"></script>
252+
<script src="http://platform.twitter.com/widgets.js"></script>
253+
254+
<script>
255+
$(document).on('pjax:complete', function() {
256+
// things to do on page change back to index.html
257+
if (window.location.pathname === '/index.html') {
258+
reloadSocial();
259+
$("#news-feed").PaRSS("http://openworm.tumblr.com/rss", // url to the feed
260+
6, // number of items to retrieve
261+
"M jS Y, g:i a", // date format
262+
false, // include descriptions
263+
function() {
264+
// optional callback not used
265+
})
266+
}
267+
setNavigation();
268+
})
266269

267-
(function () {
268-
var ga = document.createElement('script');
269-
ga.type = 'text/javascript';
270-
ga.async = true;
271-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
272-
var s = document.getElementsByTagName('script')[0];
273-
s.parentNode.insertBefore(ga, s);
274-
})();
270+
$(window).load(function() {
271+
// things to do on initial page load (defined in main.js)
272+
setNavigation();
273+
loadGooglePlus();
274+
loadGoogleAnalytics();
275+
loadFacebook();
276+
loadTwitterWidget();
277+
})
275278
</script>
276279
</body>
277280

war/header-content.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<div class="navbar navbar-inverse navbar-fixed-top">
32
<div class="navbar-inner">
43
<div class="container">
@@ -37,11 +36,11 @@
3736
</ul>
3837
<ul class="nav pull-right">
3938
<li><a class="fa fa-github fa-15x" href="http://docs.openworm.org/en/latest/Community/github/"
40-
target="_blank"></a>
41-
<li><a class="minilogo" rel="tooltip" data-placement="right"
39+
target="_blank"></a></li>
40+
<li><a class="minilogo" rel="tooltip" data-placement="right"
4241
data-original-title='"What I cannot create, I do not understand" - R. Feynman'></a>
43-
<li>
44-
<li><a href="http://browser.openworm.org" target="wormbrowser"> Explore the Worm</a></li>
42+
</li>
43+
<li><a href="http://browser.openworm.org" target="wormbrowser"> Explore the Worm</a></li>
4544
</ul>
4645
</div><!--/.nav-collapse -->
4746
</div>

war/index.html

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
2828

2929

30-
<!-- see: https://github.com/thybag/PJAX-Standalone -->
31-
<script src="js/jquery-1.8.3.min.js"></script>
30+
<script src="js/jquery-3.2.1.js"></script>
3231
<script src="js/jquery.pjax.js"></script>
3332
<script>
3433
// set all links inside pj-content to try pjax
@@ -210,7 +209,7 @@ <h1>Aiming for the best.</h1>
210209

211210

212211
<!-- ======== social links ========== -->
213-
<div class="bs-docs-social">
212+
<div class="bs-docs-social" id="social-links">
214213
<div class="container">
215214
<ul class="bs-docs-social-buttons">
216215
<li>
@@ -390,54 +389,53 @@ <h1>Meet with us</h1> <br>
390389
</p>
391390
</div>
392391
</div>
393-
<script>
394-
// set active nav
395-
$('.nav li').removeClass('active');
396-
$('#home').addClass('active');
397-
</script>
398-
</div>
399-
<!-- end pjax content -->
392+
</div><!-- end pjax content -->
400393

401-
<!-- Footer inserted with jquery
394+
395+
<!-- Footer navigation
402396
================================================== -->
403397
<div id="foot-nav"></div>
404398

405-
406399
<!-- Le javascript
407400
================================================== -->
408401
<!-- Placed at the end of the document so the pages load faster -->
409-
<script src="http://platform.twitter.com/widgets.js"></script>
410-
<script src="js/bootstrap.js"></script>
411-
<script src="js/jquery.parss.uncompressed.js"></script>
412402

413-
<!-- <script src="js/jquery.colorbox-min.js"></script>-->
414-
<script src="js/main.js"></script>
415-
416-
<script type="text/javascript">
403+
<!-- pull in header/footer w/ jquery -->
404+
<script>
417405
$.get('header-content.html', function(data) {
418406
$('#head-nav').html(data);
419-
});
407+
})
420408
$.get('footer-content.html', function(data) {
421409
$('#foot-nav').html(data);
422-
});
410+
})
411+
</script>
423412

424-
$(document).on('pjax:complete', function() {
425-
// do stuff when pjax finished
413+
<!-- jquery was loaded in head. load other resources: -->
414+
<script src="js/bootstrap.js"></script>
415+
<script src="js/jquery.parss.uncompressed.js"></script>
416+
<script src="js/main.js"></script>
417+
<script src="http://platform.twitter.com/widgets.js"></script>
418+
419+
<script>
420+
$(document).on('pjax:success', function() {
421+
// things to do on page change back to index.html
426422
if (window.location.pathname === '/index.html') {
427-
reloadSocial();
423+
reloadSocial();
428424
$("#news-feed").PaRSS("http://openworm.tumblr.com/rss", // url to the feed
429425
6, // number of items to retrieve
430426
"M jS Y, g:i a", // date format
431427
false, // include descriptions
432428
function() {
433-
// don't do anything
429+
// optional callback not used
434430
})
435431
}
432+
setNavigation();
436433
})
437434

438-
$(window).load(function () {
439-
// this works:
440-
// alert('inital load!');
435+
$(window).on('load', function() {
436+
// things to do on initial page load (defined in main.js)
437+
// alert(window.location.pathname);
438+
setNavigation();
441439
loadGooglePlus();
442440
loadGoogleAnalytics();
443441
loadFacebook();

war/js/jquery-1.8.3.min.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)