Files
website/layouts/partials/file-index.html
Akshay Kolli 639bef4b7a
All checks were successful
Deploy Website / build-and-deploy (push) Successful in 7s
Move apps into projects section
2026-07-02 00:43:02 -07:00

36 lines
1.3 KiB
HTML

{{ $active := .active | default "posts" }}
{{ $tabs := slice
(dict "id" "posts" "label" "Posts" "href" ("/" | relURL))
(dict "id" "projects" "label" "Projects" "href" ("/projects/" | relURL))
(dict "id" "publications" "label" "Publications" "href" ("/publications/" | relURL))
(dict "id" "contact" "label" "Contact" "href" ("/contact/" | relURL))
}}
<div class="file-index">
<nav class="file-tabs" aria-label="Index views">
{{ range $tabs }}
<a
class="file-tab{{ if eq $active .id }} active{{ end }}"
href="{{ .href }}"
aria-label="Show {{ .label }}"
title="Show {{ .label }}"
{{ if eq $active .id }}aria-current="page"{{ end }}
>{{ .label }}</a>
{{ end }}
</nav>
<section class="file-panel" aria-labelledby="{{ $active }}-heading">
<h2 class="sr-only" id="{{ $active }}-heading">{{ title $active }}</h2>
{{ if eq $active "publications" }}
{{ partial "publication-list.html" hugo.Data.publications }}
{{ else if eq $active "projects" }}
{{ partial "page-list.html" (where site.RegularPages "Section" "projects") }}
{{ else if eq $active "contact" }}
{{ partial "contact-section.html" . }}
{{ else }}
{{ partial "post-list.html" (where site.RegularPages "Section" "posts") }}
{{ end }}
</section>
</div>