More fixes
This commit is contained in:
283
blog/index.php
283
blog/index.php
@@ -336,11 +336,89 @@ $og_image = "https://ukdataservices.co.uk/assets/images/blog-og-image.png";
|
||||
<a href="articles/gdpr-data-minimisation-practices.php" class="read-more">Read →</a>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="article-card">
|
||||
<div class="article-meta">
|
||||
<span class="category">Technology</span>
|
||||
<time datetime="2025-05-23">23 May 2025</time>
|
||||
</div>
|
||||
<h3><a href="articles/python-data-pipeline-tools-2025.php">Python Data Pipeline Tools for 2025</a></h3>
|
||||
<p>Comprehensive guide to the latest Python tools and frameworks for building robust data pipelines in enterprise environments.</p>
|
||||
<div class="article-footer">
|
||||
<span class="read-time">11 min read</span>
|
||||
<a href="articles/python-data-pipeline-tools-2025.php" class="read-more">Read →</a>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="article-card">
|
||||
<div class="article-meta">
|
||||
<span class="category">Web Scraping</span>
|
||||
<time datetime="2025-05-20">20 May 2025</time>
|
||||
</div>
|
||||
<h3><a href="articles/web-scraping-rate-limiting.php">Professional Rate Limiting Strategies for Web Scraping</a></h3>
|
||||
<p>Master advanced rate limiting techniques to ensure respectful and sustainable web scraping operations.</p>
|
||||
<div class="article-footer">
|
||||
<span class="read-time">9 min read</span>
|
||||
<a href="articles/web-scraping-rate-limiting.php" class="read-more">Read →</a>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="article-card">
|
||||
<div class="article-meta">
|
||||
<span class="category">Technology</span>
|
||||
<time datetime="2025-05-18">18 May 2025</time>
|
||||
</div>
|
||||
<h3><a href="articles/kubernetes-scraping-deployment.php">Kubernetes Deployment for Enterprise Scraping</a></h3>
|
||||
<p>Deploy and scale web scraping applications using Kubernetes with best practices for production environments.</p>
|
||||
<div class="article-footer">
|
||||
<span class="read-time">13 min read</span>
|
||||
<a href="articles/kubernetes-scraping-deployment.php" class="read-more">Read →</a>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="article-card">
|
||||
<div class="article-meta">
|
||||
<span class="category">Legal & Compliance</span>
|
||||
<time datetime="2025-05-15">15 May 2025</time>
|
||||
</div>
|
||||
<h3><a href="articles/uk-cookie-law-compliance.php">UK Cookie Law Compliance for Data Collection</a></h3>
|
||||
<p>Navigate UK cookie regulations and ensure compliant data collection practices in your web applications.</p>
|
||||
<div class="article-footer">
|
||||
<span class="read-time">7 min read</span>
|
||||
<a href="articles/uk-cookie-law-compliance.php" class="read-more">Read →</a>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="article-card">
|
||||
<div class="article-meta">
|
||||
<span class="category">Industry Insights</span>
|
||||
<time datetime="2025-05-12">12 May 2025</time>
|
||||
</div>
|
||||
<h3><a href="articles/ecommerce-trends-uk-2025.php">UK E-commerce Data Trends for 2025</a></h3>
|
||||
<p>Essential insights into the UK e-commerce market using comprehensive data analysis and market intelligence.</p>
|
||||
<div class="article-footer">
|
||||
<span class="read-time">10 min read</span>
|
||||
<a href="articles/ecommerce-trends-uk-2025.php" class="read-more">Read →</a>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="article-card">
|
||||
<div class="article-meta">
|
||||
<span class="category">Case Studies</span>
|
||||
<time datetime="2025-05-10">10 May 2025</time>
|
||||
</div>
|
||||
<h3><a href="articles/healthcare-research-data-collection.php">Healthcare Research Data Collection Success</a></h3>
|
||||
<p>How a UK research institution improved data collection efficiency by 60% using automated web scraping solutions.</p>
|
||||
<div class="article-footer">
|
||||
<span class="read-time">8 min read</span>
|
||||
<a href="articles/healthcare-research-data-collection.php" class="read-more">Read →</a>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="blog-pagination">
|
||||
<button class="btn btn-secondary" disabled>Previous</button>
|
||||
<span class="pagination-info">Page 1 of 5</span>
|
||||
<span class="pagination-info">Page 1 of 2</span>
|
||||
<button class="btn btn-secondary">Next</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -479,208 +557,7 @@ $og_image = "https://ukdataservices.co.uk/assets/images/blog-og-image.png";
|
||||
});
|
||||
}
|
||||
|
||||
// Blog pagination functionality
|
||||
const paginationButtons = document.querySelectorAll('.blog-pagination button');
|
||||
const paginationInfo = document.querySelector('.pagination-info');
|
||||
const articlesGrid = document.querySelector('.articles-grid');
|
||||
|
||||
if (paginationButtons.length > 0 && articlesGrid) {
|
||||
let currentPage = 1;
|
||||
const totalPages = 5; // Update this based on actual article count
|
||||
const articlesPerPage = 6;
|
||||
|
||||
// All articles data (in real implementation, this would come from a database)
|
||||
const allArticles = [
|
||||
// Current articles from page 1
|
||||
{
|
||||
category: 'Web Scraping',
|
||||
date: '2025-06-01',
|
||||
dateTime: '2025-06-01',
|
||||
title: 'Scraping JavaScript-Heavy Sites: Advanced Techniques',
|
||||
description: 'Master the challenges of extracting data from dynamic websites using modern browser automation and rendering techniques.',
|
||||
readTime: '6 min read',
|
||||
link: 'articles/javascript-heavy-sites-scraping.php'
|
||||
},
|
||||
{
|
||||
category: 'Data Analytics',
|
||||
date: '2025-05-29',
|
||||
dateTime: '2025-05-29',
|
||||
title: 'Building Robust Data Quality Validation Pipelines',
|
||||
description: 'Implement comprehensive data validation systems to ensure accuracy and reliability in your data processing workflows.',
|
||||
readTime: '9 min read',
|
||||
link: 'articles/data-quality-validation-pipelines.php'
|
||||
},
|
||||
{
|
||||
category: 'Case Studies',
|
||||
date: '2025-05-27',
|
||||
dateTime: '2025-05-27',
|
||||
title: 'Financial Services Data Transformation Success Story',
|
||||
description: 'How a leading UK investment firm automated their market data collection and reduced analysis time by 75%.',
|
||||
readTime: '7 min read',
|
||||
link: 'articles/financial-services-data-transformation.php'
|
||||
},
|
||||
{
|
||||
category: 'Technology',
|
||||
date: '2025-05-25',
|
||||
dateTime: '2025-05-25',
|
||||
title: 'Cloud-Native Scraping Architecture for Enterprise Scale',
|
||||
description: 'Design scalable, resilient web scraping infrastructure using modern cloud technologies and containerization.',
|
||||
readTime: '11 min read',
|
||||
link: 'articles/cloud-native-scraping-architecture.php'
|
||||
},
|
||||
{
|
||||
category: 'Industry Insights',
|
||||
date: '2025-05-22',
|
||||
dateTime: '2025-05-22',
|
||||
title: 'UK Property Market: Data-Driven Investment Insights',
|
||||
description: 'Leverage comprehensive property data analysis to identify emerging investment opportunities across UK markets.',
|
||||
readTime: '8 min read',
|
||||
link: 'articles/uk-property-market-data-trends.php'
|
||||
},
|
||||
{
|
||||
category: 'Legal & Compliance',
|
||||
date: '2025-05-20',
|
||||
dateTime: '2025-05-20',
|
||||
title: 'GDPR Data Minimisation: Best Practices for Data Teams',
|
||||
description: 'Implement effective data minimisation strategies that comply with GDPR requirements while maintaining analytical value.',
|
||||
readTime: '6 min read',
|
||||
link: 'articles/gdpr-data-minimisation-practices.php'
|
||||
},
|
||||
// Page 2 articles
|
||||
{
|
||||
category: 'Data Analytics',
|
||||
date: '2025-05-23',
|
||||
dateTime: '2025-05-23',
|
||||
title: 'Predictive Analytics for Customer Churn Prevention',
|
||||
description: 'Build machine learning models to predict and prevent customer churn using advanced analytics techniques and behavioral data.',
|
||||
readTime: '13 min read',
|
||||
link: 'articles/predictive-analytics-customer-churn.php'
|
||||
},
|
||||
{
|
||||
category: 'Data Analytics',
|
||||
date: '2025-05-20',
|
||||
dateTime: '2025-05-20',
|
||||
title: 'Advanced SQL Techniques for Data Analytics',
|
||||
description: 'Master complex SQL queries, window functions, and optimization strategies for large-scale data analytics projects.',
|
||||
readTime: '14 min read',
|
||||
link: 'articles/sql-analytics-advanced-techniques.php'
|
||||
},
|
||||
{
|
||||
category: 'Data Analytics',
|
||||
date: '2025-05-18',
|
||||
dateTime: '2025-05-18',
|
||||
title: 'Real-Time Analytics with Streaming Data Platforms',
|
||||
description: 'Implement real-time data processing and analytics using modern streaming platforms like Apache Kafka and Apache Flink.',
|
||||
readTime: '12 min read',
|
||||
link: 'articles/real-time-analytics-streaming.php'
|
||||
},
|
||||
{
|
||||
category: 'Web Scraping',
|
||||
date: '2025-05-16',
|
||||
dateTime: '2025-05-16',
|
||||
title: 'Handling CAPTCHAs in Web Scraping: Professional Techniques',
|
||||
description: 'Learn professional techniques for handling CAPTCHAs in web scraping operations with ethical approaches and automated solutions.',
|
||||
readTime: '10 min read',
|
||||
link: 'articles/handling-captchas-scraping.php'
|
||||
},
|
||||
{
|
||||
category: 'Web Scraping',
|
||||
date: '2025-05-15',
|
||||
dateTime: '2025-05-15',
|
||||
title: 'Python Scrapy for Enterprise: Complete Implementation Guide',
|
||||
description: 'Master Scrapy framework for enterprise-scale web scraping with advanced configurations, monitoring, and deployment strategies.',
|
||||
readTime: '15 min read',
|
||||
link: 'articles/python-scrapy-enterprise-guide.php'
|
||||
},
|
||||
{
|
||||
category: 'Technology',
|
||||
date: '2025-05-12',
|
||||
dateTime: '2025-05-12',
|
||||
title: 'Selenium vs Playwright: Comprehensive Comparison for 2025',
|
||||
description: 'Detailed comparison of browser automation tools covering performance, features, and real-world applications.',
|
||||
readTime: '11 min read',
|
||||
link: 'articles/selenium-vs-playwright-comparison.php'
|
||||
}
|
||||
];
|
||||
|
||||
function renderArticles(page) {
|
||||
const startIndex = (page - 1) * articlesPerPage;
|
||||
const endIndex = startIndex + articlesPerPage;
|
||||
const pageArticles = allArticles.slice(startIndex, endIndex);
|
||||
|
||||
articlesGrid.innerHTML = pageArticles.map(article => `
|
||||
<article class="article-card">
|
||||
<div class="article-meta">
|
||||
<span class="category">${article.category}</span>
|
||||
<time datetime="${article.dateTime}">${article.date}</time>
|
||||
</div>
|
||||
<h3><a href="${article.link}">${article.title}</a></h3>
|
||||
<p>${article.description}</p>
|
||||
<div class="article-footer">
|
||||
<span class="read-time">${article.readTime}</span>
|
||||
<a href="${article.link}" class="read-more">Read →</a>
|
||||
</div>
|
||||
</article>
|
||||
`).join('');
|
||||
}
|
||||
|
||||
function updatePagination() {
|
||||
paginationInfo.textContent = `Page ${currentPage} of ${totalPages}`;
|
||||
|
||||
// Update Previous button
|
||||
const prevButton = paginationButtons[0];
|
||||
if (currentPage <= 1) {
|
||||
prevButton.disabled = true;
|
||||
prevButton.textContent = 'Previous';
|
||||
} else {
|
||||
prevButton.disabled = false;
|
||||
prevButton.textContent = 'Previous';
|
||||
}
|
||||
|
||||
// Update Next button
|
||||
const nextButton = paginationButtons[1];
|
||||
if (currentPage >= totalPages) {
|
||||
nextButton.disabled = true;
|
||||
nextButton.textContent = 'Next';
|
||||
} else {
|
||||
nextButton.disabled = false;
|
||||
nextButton.textContent = 'Next';
|
||||
}
|
||||
}
|
||||
|
||||
// Previous button click handler
|
||||
paginationButtons[0].addEventListener('click', function() {
|
||||
if (currentPage > 1) {
|
||||
currentPage--;
|
||||
renderArticles(currentPage);
|
||||
updatePagination();
|
||||
|
||||
// Scroll to articles section
|
||||
document.querySelector('.blog-recent').scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Next button click handler
|
||||
paginationButtons[1].addEventListener('click', function() {
|
||||
if (currentPage < totalPages) {
|
||||
currentPage++;
|
||||
renderArticles(currentPage);
|
||||
updatePagination();
|
||||
|
||||
// Scroll to articles section
|
||||
document.querySelector('.blog-recent').scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize pagination
|
||||
updatePagination();
|
||||
}
|
||||
// Pagination is now handled by the universal pagination system in main.js
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user