-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Split nav links into an include
- Loading branch information
1 parent
86a8060
commit 4e7dc1c
Showing
2 changed files
with
33 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% include nav-page-link.html url="/" title="Home" %} | ||
{% assign contact_link = "mailto:" | append: site.contact_email %} | ||
|
||
{% if site.is_hub %} | ||
{% include nav-page-link.html url="/projects/" title="Open Projects" %} | ||
|
||
{% if site.num_all_software > 0 %} | ||
{% include nav-page-link.html url="/software/" title="Software" active_for_nested=true %} | ||
{% endif %} | ||
{% if site.num_all_specs > 0 %} | ||
{% include nav-page-link.html url="/specs/" title="Specifications" active_for_nested=true %} | ||
{% endif %} | ||
{% if site.num_posts_combined > 0 %} | ||
{% include nav-page-link.html url="/blog/" title="Blog" active_for_nested=true %} | ||
{% endif %} | ||
|
||
{% else %} | ||
{% if site.num_all_software > 0 %} | ||
{% include nav-page-link.html url="/software/" title="Software" active_for_nested=true %} | ||
{% endif %} | ||
{% if site.num_all_specs > 0 %} | ||
{% include nav-page-link.html url="/specs/" title="Specifications" active_for_nested=true %} | ||
{% endif %} | ||
|
||
{% include project-nav.html %} | ||
|
||
{% if site.num_posts_combined > 0 %} | ||
{% include nav-page-link.html url="/blog/" title="Blog" active_for_nested=true %} | ||
{% endif %} | ||
|
||
{% include nav-page-link.html url=contact_link title="Contact" %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters