Skip to content
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

Update Index and footer date #13492

Merged
merged 1 commit into from
Feb 9, 2023
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
2 changes: 1 addition & 1 deletion docs/_includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<div>
{%- include snippets/get-locale-string.html key='COPYRIGHT_DATES' -%}
{%- assign _locale_copyright_dates = __return -%}
© 2022 John Snow Labs Inc.
© <span id="year"></span> John Snow Labs Inc.
<a href="http://www.johnsnowlabs.com/terms-of-service">Terms of Service</a> | <a href="http://www.johnsnowlabs.com/privacy-policy/">Privacy Policy</a>
</div>
</div>
Expand Down
71 changes: 38 additions & 33 deletions docs/_includes/scripts/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jQuery(document).ready(function () {
}
});

//Accordion demos categories
if(document.querySelector(".acc-top")) {
try{
//Accordion demos categories
let acc = document.getElementsByClassName("acc-top"),
isResizeble = false;

Expand All @@ -61,11 +61,11 @@ for (let i = 0; i < acc.length; i++) {
}
});
}
}
} catch(e){}


//Show more in demos description
if(document.querySelector('.tab-description')) {
try {
//Show more in demos description
let tabDescription = document.querySelectorAll('.tab-description');

tabDescription.forEach(element => {
Expand All @@ -84,47 +84,49 @@ if(document.querySelector('.tab-description')) {
this.parentElement.parentElement.classList.add('big-descr-close');
});
});
}
} catch(e){}


//disable Colab link
if(document.querySelector('.btn.disable')) {
try{
//disable Colab link
let btnDisable = document.querySelectorAll('.btn.disable');

btnDisable.forEach(element => {
element.addEventListener("click", function(e) {
e.preventDefault();
});
});
}
} catch(e){}


// Ancor click
try {
// Ancor click
const anchors = [].slice.call(document.querySelectorAll('.btn-box-install a')),
animationTime = 300,
framesCount = 20;
animationTime = 300,
framesCount = 20;

anchors.forEach(function(item) {
item.addEventListener('click', function(e) {
e.preventDefault();
let coordY = document.querySelector(item.getAttribute('href')).getBoundingClientRect().top + window.pageYOffset -100;
let scroller = setInterval(function() {
let scrollBy = coordY / framesCount;
if(scrollBy > window.pageYOffset - coordY && window.innerHeight + window.pageYOffset < document.body.offsetHeight) {
window.scrollBy(0, scrollBy);
} else {
window.scrollTo(0, coordY);
clearInterval(scroller);
}
}, animationTime / framesCount);
});
item.addEventListener('click', function(e) {
e.preventDefault();
let coordY = document.querySelector(item.getAttribute('href')).getBoundingClientRect().top + window.pageYOffset -100;

let scroller = setInterval(function() {
let scrollBy = coordY / framesCount;

if(scrollBy > window.pageYOffset - coordY && window.innerHeight + window.pageYOffset < document.body.offsetHeight) {
window.scrollBy(0, scrollBy);
} else {
window.scrollTo(0, coordY);
clearInterval(scroller);
}
}, animationTime / framesCount);
});
});
} catch(e){}


//Pagination active
if(document.querySelector('.pagination_big')) {
try {
//Pagination active
let paginationItems = document.querySelectorAll('.pagination_big li'),
nextVersionContainer = document.querySelector('#nextver'),
previosVersionContainer = document.querySelector('#previosver'),
Expand Down Expand Up @@ -153,9 +155,11 @@ if(document.querySelector('.pagination_big')) {
break;
}
}
}
// copy to clipboard
if (document.querySelector('.button-copy-s3')) {
} catch(e){}


try{
// copy to clipboard
let btnCopy = document.querySelectorAll('.button-copy-s3');

btnCopy.forEach((element) => {
Expand All @@ -171,5 +175,6 @@ if (document.querySelector('.button-copy-s3')) {
navigator.clipboard.writeText(element.href);
});
});
}
} catch(e){}

document.getElementById("year").innerHTML = new Date().getFullYear();
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ data:
is_row: true
- title:
image:
src: https://www.ericsson.com/4915cd/assets/global/qbank/2018/02/14/e-con-vertical-1500x1500px-88604crop105012731273resize750750autoorientquality90stripbackground23ffffffextensionjpg.jpg
src: https://logos-world.net/wp-content/uploads/2020/12/Ericsson-Logo.png
url: https://www.ericsson.com/
style: ""
is_row: true
Expand All @@ -193,7 +193,7 @@ data:
is_row: true
- title:
image:
src: https://aiuaeafbno.cloudimg.io/v7/https://www.providence.org/-/media/200x38/6294B19C274A30A9861AFB9AB9BE7C4F/Project/psjh/providence/socal/Images/Logos/providence_color_small.png
src: https://give.providence.org/WA/hospiceseattle/image/providence-health-services.svg
url: https://www.providence.org/
style: ""
is_row: true
Expand Down Expand Up @@ -223,7 +223,7 @@ data:
is_row: true
- title:
image:
src: https://www.idexx.com/static/img/logo/logo.47b5fefbb6b3.svg
src: https://companieslogo.com/img/orig/IDXX-d9c286e7.png?t=1592707160
url: https://www.idexx.com/en/
style: ""
is_row: true
Expand Down