Skip to content

Commit

Permalink
Better navbar cutoff for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Owez committed Dec 10, 2023
1 parent f4b2379 commit 297b80a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
18 changes: 10 additions & 8 deletions sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,21 @@ a {
// Space between the screen and the left of navbar
#nav-left {
margin-left: $nav-space;

// Cut my name off if it's too crampt
@media screen and (max-width: 400px) {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
width: 0;
}
}

// Space between the screen and the right of navbar
#nav-right {
margin-right: $nav-space;

// Cut optional content off if it's too crampt
&.optional {
@media screen and (max-width: 400px) {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
width: 0;
}
}
}

// Navbar
Expand Down
2 changes: 1 addition & 1 deletion templates/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- NOTE: navbar should ideally be a component -->
<a id="nav-left" class="nav-link" href="/">Owen Griffiths</a>
<div>
<a id="nav-right" class="nav-link" href="/#about">About</a>
<a id="nav-right" class="nav-link optional" href="/#about">About</a>
<a id="nav-right" class="nav-link" href="/blog">Blog</a>
</div>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion templates/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<!-- NOTE: navbar should ideally be a component -->
<a id="nav-left" class="nav-link" href="/">Owen Griffiths</a>
<div>
<a id="nav-right" class="nav-link" href="/#about">About</a>
<a id="nav-right" class="nav-link optional" href="/#about">About</a>
<a id="nav-right" class="nav-link" href="/blog">Blog</a>
</div>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<!-- NOTE: navbar should ideally be a component -->
<a id="nav-left" class="nav-link" href="/">Owen Griffiths</a>
<div>
<a id="nav-right" class="nav-link" href="/#about">About</a>
<a id="nav-right" class="nav-link optional" href="/#about">About</a>
<a id="nav-right" class="nav-link" href="/blog">Blog</a>
</div>
</nav>
Expand Down

0 comments on commit 297b80a

Please sign in to comment.