---
import { navItems, site } from '../lib/site';

const year = new Date().getFullYear();

// Footer shows all nav items except Home (which is implicit via the site title).
const footerNavItems = navItems.filter((item) => item.href !== '/');
---

<footer class="site-footer">
  <nav aria-label="Footer">
    <ul class="footer-links">
      {
        footerNavItems.map((item) => (
          <li>
            <a href={item.href}>{item.label}</a>
          </li>
        ))
      }
    </ul>
  </nav>
  <ul class="footer-meta">
    <li><span>© {year} {site.name}</span></li>
    <li>
      <address>
        <a href={`mailto:${site.email}`}>Email</a>
      </address>
    </li>
    <li>
      <a href={site.cv} rel="noopener">CV</a>
    </li>
    <li>
      <a href={site.github} rel="noopener me">GitHub</a>
    </li>
    <li>
      <a href={site.linkedin} rel="noopener me">LinkedIn</a>
    </li>
  </ul>
</footer>
