forked from colin/resume
37 lines
1.6 KiB
HTML
37 lines
1.6 KiB
HTML
<hr>
|
|
|
|
<p class="accessibility-notice"><strong>Accessibility:</strong> This website is designed and developed to meet WCAG 2.1 Level AAA standards, ensuring the highest level of accessibility for all users. Features include high contrast ratios, keyboard navigation, screen reader compatibility, and responsive design. The site supports both light and dark modes with automatic system preference detection.</p>
|
|
|
|
<p id="pdf-download-link" class="pdf-download" style="display: none;">
|
|
<a href="#" id="pdf-link" download>Download this page as PDF</a>
|
|
</p>
|
|
|
|
<script>
|
|
(function() {
|
|
// Determine PDF path based on current page URL
|
|
var path = window.location.pathname;
|
|
if (path === '/' || path === '') path = '/index.html';
|
|
|
|
// Convert .html to .pdf and prepend /pdfs/
|
|
var pdfPath = '/pdfs' + path.replace(/\.html$/, '.pdf');
|
|
|
|
// Check if PDF exists, then show link
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open('HEAD', pdfPath, true);
|
|
xhr.onreadystatechange = function() {
|
|
if (xhr.readyState === 4 && xhr.status === 200) {
|
|
var container = document.getElementById('pdf-download-link');
|
|
var link = document.getElementById('pdf-link');
|
|
if (container && link) {
|
|
link.href = pdfPath;
|
|
container.style.display = 'block';
|
|
}
|
|
}
|
|
};
|
|
xhr.send();
|
|
})();
|
|
</script>
|
|
</div>
|
|
</body>
|
|
</html>
|