{{ $latest := (cond (.Site.Params.docs_versioning) .Site.Params.latest_version "") }}
<header>
	<div class="wrapper">
		<a href="{{ .Site.BaseURL }}"><img class="image" src="/img/Contour.svg" alt="Contour Logo" /></a>
		<ul class="desktop-links">
			<li><a href="/getting-started/" {{ if (eq .RelPermalink "/getting-started/")  }}class="active"{{ end }}>Getting Started</a></li>
			<li><a href="/guides/" {{ if (eq .RelPermalink "/guides/")  }}class="active"{{ end }}>Guides</a></li>
			<li><a href="/community/" {{ if (eq .RelPermalink "/community/")  }}class="active"{{ end }}>Community</a></li>
			<li><a href="/docs/{{ $latest }}" {{ if (eq .Page.Section "docs") }}class="active"{{ end }}>Documentation</a></li>
			<li><a href="/resources/" {{ if (eq .RelPermalink "/resources/")  }}class="active"{{ end }}>Resources</a></li>
			<li><a href="/blog/" {{ if or (eq .Page.Section "posts") (eq .Page.Section "tags") }}class="active"{{ end }}>Blog</a></li>
		</ul>
		<button type="button" class="mobile" onclick="mobileNavToggle()">
			<img class="collapsed-icon" src="/img/hamburger.svg" alt="Mobile nav icon">
			<img class="expanded-icon" src="/img/close.svg" alt="Mobile nav icon">
		</button>
		<div id="mobile-menu" class="mobile-menu mobile">
			<ul class="header-links">
				<li><a href="/getting-started/" {{ if (eq .RelPermalink "/getting-started/")  }}class="active"{{ end }}>Getting Started</a></li>
				<li><a href="/guides/" {{ if (eq .RelPermalink "/guides/")  }}class="active"{{ end }}>Guides</a></li>
				<li><a href="/community/" {{ if (eq .RelPermalink "/community/")  }}class="active"{{ end }}>Community</a></li>
				<li><a href="/docs/{{ $latest }}" {{ if (eq .Page.Section "docs") }}class="active"{{ end }}>Documentation</a></li>
				<li><a href="/resources/" {{ if (eq .RelPermalink "/resources/")  }}class="active"{{ end }}>Resources</a></li>
				<li><a href="/blog/" {{ if or (eq .Page.Section "posts") (eq .Page.Section "tags") }}class="active"{{ end }}>Blog</a></li>
			</ul>
			<div class="social">
				<a href="https://twitter.com/projectcontour"><img src="/img/twitter.png" />Twitter</a>
				<a href="https://kubernetes.slack.com/?redir=%2Fmessages%2Fcontour"><img src="/img/slack.png" />Slack</a>
				<a href="/blog/feed.xml"><img src="/img/rss.png" />RSS</a>
				<a href="https://github.com/projectcontour/contour"><img src="/img/github.svg" />GitHub</a>
			</div>
		</div>
	</div>
</header>
