Skip to content

fixes site js #307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 91 additions & 2 deletions _layouts/bootstrap.html
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,92 @@ <h4>they support us_</h4>
{% include js.html %}

<!-- SCRIPTS -->
<script>
$(document).ready(function () {
function randomCarousel(id) {
var num = $(id + ' .item').length;
var slide = Math.floor((Math.random() * num));
$(id + ' .item').each(function (index) {
if (index == slide) {
$(this).addClass('active');
} else {
$(this).removeClass('active');
}
});
}

randomCarousel('#carousel-tweets');
randomCarousel('#carousel-companies');
});
</script>

<script>
$(document).ready(function () {
var toc = $('#toc');
if(toc.length) {
toc.toc({
'selectors': 'h2',
'prefix': 'toc',
'container': '#page',
'anchorName': function (i, heading, prefix) { //custom function for anchor name
return $(heading).text().replace(/\s/g, '-').replace(/[^\w-]/g, '');
},
});
}
});
</script>

<script>
$(document).ready(function () {
var cpContainer = $(".cp:contains('<?php')");
var cpContains = $(".cp:contains('?>')");
var page = $('#page table');
var tocNext = $('#toc');
var tocNextUl = $('#toc > ul');
var tocNextUlLi = $('#toc ul.list li a');

if(cpContainer.length) {
cpContainer.css({ visibility : 'hidden' });
}

if(cpContains.length) {
cpContains.css({ visibility : 'hidden' });
}

if(page.length) {
page.addClass('table table-striped table-bordered');
}

if(tocNext.length) {
tocNext.toc({
'selectors': 'h2,h3,h4',
'prefix': 'toc',
'container': '#page',
//custom function for anchor name
'anchorName': function(i, heading, prefix) {
return $(heading).text().replace(/\s/g, '-').replace(/[^\w-]/g, '');
},
});
}

// List.js
if(tocNextUl.length) {
tocNextUl.addClass('list');
}

if(tocNextUlLi.length) {
tocNextUlLi.addClass('searchitem');
}

var options = {
valueNames: [ 'searchitem' ]
};
var userList = new List('searchable', options);
// end List.js

}); // docrdy
</script>

<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1899308-9']);
Expand All @@ -320,9 +406,12 @@ <h4>they support us_</h4>
<script>
// Adding this layout functionality for mobile views with the homepage hero
$(document).ready(function(){
$('.navbar-toggle').click(function(){
$('.row.home').toggleClass('no-padding-top');
var navbarToggle = $('.navbar-toggle')
if(navbarToggle.length) {
navbarToggle.click(function(){
$('.row.home').toggleClass('no-padding-top');
});
}
});
</script>

Expand Down
28 changes: 0 additions & 28 deletions _layouts/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,34 +70,6 @@ <h1 class="page-title">Search</h1>
<!-- toc.js generated nav... -->
<div id="toc" class="nav"></div>

<script>
$(document).ready(function () {
$(".cp:contains('<?php')").css({ visibility : 'hidden' });
$(".cp:contains('?>')").css({ visibility : 'hidden' });
$('#page table').addClass('table table-striped table-bordered');
$('#toc').toc({
'selectors': 'h2,h3,h4',
'prefix': 'toc',
'container': '#page',
//custom function for anchor name
'anchorName': function(i, heading, prefix) {
return $(heading).text().replace(/\s/g, '-').replace(/[^\w-]/g, '');
},
});
// List.js
$('#toc > ul').addClass('list');
$('#toc ul.list li a').addClass('searchitem');
var options = {
valueNames: [ 'searchitem' ]
};
var userList = new List('searchable', options);
// end List.js

}); // docrdy
</script>



</div>
</div>

Expand Down
13 changes: 0 additions & 13 deletions _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,3 @@
</div>
</div>
</div>

<script>
$(document).ready(function () {
$('#toc').toc({
'selectors': 'h2',
'prefix': 'toc',
'container': '#page',
'anchorName': function (i, heading, prefix) { //custom function for anchor name
return $(heading).text().replace(/\s/g, '-').replace(/[^\w-]/g, '');
},
});
});
</script>
18 changes: 0 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,24 +190,6 @@ <h3 class="text-center">Trusted By_</h3>
</div>
</div>
</div>
<script>
$(document).ready(function () {
function randomCarousel(id) {
var num = $(id + ' .item').length;
var slide = Math.floor((Math.random() * num));
$(id + ' .item').each(function (index) {
if (index == slide) {
$(this).addClass('active');
} else {
$(this).removeClass('active');
}
});
}

randomCarousel('#carousel-tweets');
randomCarousel('#carousel-companies');
});
</script>

<div class="bg-grey">
<div class="container">
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy