make basepath-friendly

This commit is contained in:
Rich Harris
2018-03-16 20:25:15 -04:00
parent 1a5f69c593
commit d5e1c99ef6
8 changed files with 25 additions and 27 deletions

View File

@@ -1,11 +1,11 @@
<nav>
<ul>
<li><a class='{{page === "home" ? "selected" : ""}}' href='/'>home</a></li>
<li><a class='{{page === "about" ? "selected" : ""}}' href='/about'>about</a></li>
<li><a class='{{page === "home" ? "selected" : ""}}' href=''>home</a></li>
<li><a class='{{page === "about" ? "selected" : ""}}' href='about'>about</a></li>
<!-- for the blog link, we're using rel=prefetch so that Sapper prefetches
the blog data when we hover over the link or tap it on a touchscreen -->
<li><a rel=prefetch class='{{page === "blog" ? "selected" : ""}}' href='/blog'>blog</a></li>
<li><a rel=prefetch class='{{page === "blog" ? "selected" : ""}}' href='blog'>blog</a></li>
</ul>
</nav>