{
loading = true;
fetch($event.detail.new_url)
.then(response => response.text())
.then(data => {
let html_div = document.createElement('div');
html_div.innerHTML = data;
const button = document.querySelector('#blog-pagination .btn');
const href = button.getAttribute('href');
const url = new URL(href, window.location.origin);
const pageValue = url.searchParams.get('page');
if(pageValue && parseInt(pageValue) === parseInt(button.getAttribute('data-total-pages'))) {
document.querySelector('#blog-pagination').style.display = 'none';
}
let html_dom = html_div.querySelector('#blog-grid').innerHTML;
if (document.querySelector('#blog-grid')){
document.querySelector('#blog-grid').innerHTML += html_dom;
}
showingResultCount = document.querySelectorAll('.article-card').length
calculateProgressBarWidth(showingResultCount)
if (html_div.querySelector('#blog-pagination')){
let pagination_dom = html_div.querySelector('#blog-pagination').innerHTML;
if(document.querySelector('#blog-pagination')) {
document.querySelector('#blog-pagination').innerHTML = pagination_dom;
}
}
})
.catch(error => console.error('Error:', error))
.finally(() => loading = false);
})
">
Jul 10, 2024
Education
Injury recovery
How relevant are CBD products for rugby players?
Read more
Jul 10, 2024
Education
Injury recovery
Nutrition
Are you getting enough hydration during exercise?
Read more
Jul 10, 2024
Help me sleep
Injury recovery
Manage pain
Jack Nowell tells us about his health routine.
Read more
Jul 10, 2024
Help me sleep
Injury recovery
Question & Answer with Tian Koekemoer
Read more
Jul 10, 2024
Injury recovery
Question & Answer with Hendrick Famutimi
Read more
Jul 10, 2024
Injury recovery
Manage pain
CBD Joint Gels and Muscle Rubs: A Buyer's Guide
Read more
Jul 09, 2024
Injury recovery
Alex Donnachie: Broken Bones, BMX Titles, and Some CBD Oil
Read more
Jul 04, 2024
Education
Injury recovery
Does CBD Show Up on a Drug Test in UK?
Read more