<!DOCTYPE html>
<html lang="{{ site.Language.Locale }}" dir="{{ or site.Language.Direction `ltr` }}">
<head>
  {{ partial "head.html" . }}
  <script>
    (function() {
      const theme = localStorage.getItem('theme') || 'dark';
      if (theme === 'light') {
        document.documentElement.classList.add('theme-light');
      }
    })();
  </script>
</head>
<body>
  <a href="#main-content" class="skip-link">Skip to content</a>
  <div class="progress-bar" id="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
  {{ partial "header.html" . }}
  <main id="main-content">{{ block "main" . }}{{ end }}</main>
  <footer>{{ partial "footer.html" . }}</footer>
</body>
</html>
