Skip to content

Commit

Permalink
componentize nav links
Browse files Browse the repository at this point in the history
  • Loading branch information
vincerubinetti committed Feb 5, 2021
1 parent 4dea3b9 commit ccb23b6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 40 deletions.
65 changes: 25 additions & 40 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,30 @@
<span class="logo_text">{{ site.title }}</span>
</a>
<nav class="nav_row">
<a
href="{{ 'research' | relative_url }}"
class="nav_link"
data-tooltip="Published works"
data-placement="bottom"
data-delay="400"
>Research</a
>
<a
href="{{ 'resources' | relative_url }}"
class="nav_link"
data-tooltip="Tools, datasets, and more"
data-placement="bottom"
data-delay="400"
>Resources</a
>
<a
href="{{ 'team' | relative_url }}"
class="nav_link"
data-tooltip="About our team"
data-placement="bottom"
data-delay="400"
>Team</a
>
<a
href="{{ 'blog' | relative_url }}"
class="nav_link"
data-tooltip="Musings and miscellany"
data-placement="bottom"
data-delay="400"
>Blog</a
>
<a
href="{{ 'contact' | relative_url }}"
class="nav_link"
data-tooltip="Email, address, and location"
data-placement="bottom"
data-delay="400"
>Contact</a
>
{%
include nav-link.html
link="research"
tooltip="Published works"
%}
{%
include nav-link.html
link="resources"
tooltip="Tools, datasets, and more"
%}
{%
include nav-link.html
link="team"
tooltip="About our team"
%}
{%
include nav-link.html
link="blog"
tooltip="Musings and miscellany"
%}
{%
include nav-link.html
link="contact"
tooltip="Email, address, and location"
%}
</nav>
</header>
9 changes: 9 additions & 0 deletions _includes/nav-link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<a
href="{{ include.link | relative_url }}"
class="nav_link"
data-tooltip="{{ include.tooltip }}"
data-placement="bottom"
data-delay="400"
>
{{- include.link -}}
</a>

0 comments on commit ccb23b6

Please sign in to comment.