nav.gohtml 415 B

1234567891011
  1. {{ define "nav" }}
  2. <ul>
  3. {{ if gt .num 0 }}
  4. <li><a href="/{{.prev}}.html">Previous</a></li>
  5. {{ end }}
  6. <li><a href="/{{.next}}.html">Next</a></li>
  7. </ul>
  8. {{/* Piggy-back title updates on the NAV swap to avoid extra requests */}}
  9. <h1 id="title" hx-swap-oob="true">Demo {{ .curr }}</h1>
  10. <title id="page title" hx-swap-oob="true">Demo {{ .curr }}</title>
  11. {{ end }}