Skip to content

Commit

Permalink
Add nav link hover effect
Browse files Browse the repository at this point in the history
  • Loading branch information
namanyayg committed Jan 14, 2024
1 parent 4770dc3 commit 48de2fb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
_site
_drafts
.sass-cache
.jekyll-cache
.jekyll-metadata
Expand Down
8 changes: 4 additions & 4 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
</label>

<div class="trigger">
<a class="page-link" href="https://nmn.gl">Home</a>
<a class="page-link" href="https://nmn.gl/#about">About</a>
<a class="page-link" rel="author" href="{{ "/" | relative_url }}">Blog</a>
<a class="page-link" rel="author" href="https://nmn.gl/lab">Lab</a>
<a class="page-link" href="https://nmn.gl"><span>Home</span></a>
<a class="page-link" href="https://nmn.gl/#about"><span>About</span></a>
<a class="page-link" rel="author" href="{{ "/" | relative_url }}"><span>Blog</span></a>
<a class="page-link" rel="author" href="https://nmn.gl/lab"><span>Lab</span></a>
</div>
</nav>
{%- endif -%}
Expand Down
10 changes: 10 additions & 0 deletions _sass/minima/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@
line-height: $base-line-height;
text-transform: lowercase;

span {
transition: all .15s ease;
display: inline-block;
}

&:hover {
span {
transform: translateY(-.25em);
}
}
// Gaps between nav items, but not on the last one
&:not(:last-child) {
margin-right: $spacing-unit;
Expand Down

0 comments on commit 48de2fb

Please sign in to comment.