Skip to content

Commit

Permalink
fixing up issues in nav
Browse files Browse the repository at this point in the history
typos, svg 100%, missing p tags, clean up
  • Loading branch information
evanwill committed Mar 25, 2024
1 parent a673c12 commit 6c1c791
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 49 deletions.
43 changes: 9 additions & 34 deletions _includes/collection-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,46 +52,21 @@ <h2 class="offcanvas-title notable" id="offcanvasNavbarLabel"><a class="text-dar
</div>
<div class="offcanvas-body">
{% include svg/nav-stack.html %}
<ul class=" d-none navbar-nav justify-content-end flex-grow-1 pe-3">
{%- assign navItems = site.data.config-nav | where_exp: 'item', 'item.dropdown_parent == nil' -%}
{% for nav in navItems %}
{% if nav.stub %}
<li class="nav-item">
<a class="nav-link btn btn-outline-info btn-xl mb-2 text-center{% if page.url == nav.stub %} active{% endif %}"
href="{{ nav.stub | relative_url }}">{{ nav.display_name }}</a>
</li>
{%- else -%}
<li class="nav-item dropdown">
{% assign navChildren = site.data.config-nav | where_exp: 'item', 'item.dropdown_parent ==
nav.display_name' %}
{%- assign childStubs = navChildren | map: 'stub' -%}
<a class="nav-link btn btn-outline-info mb-2 btn-xl text-center dropdown-toggle{% if childStubs contains page.url %} active{% endif %}"
data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true"
aria-expanded="false">{{ nav.display_name }}</a>
<div class="dropdown-menu">
{% for c in navChildren %}
<a class="dropdown-item {% if page.url == c.stub %}active{% endif %}"
href="{{ c.stub | relative_url }}">{{ c.display_name }}</a>
{% endfor %}
</div>
</li>
{% endif %}
{%- endfor -%}
</ul>


<div class="mt-5">
<a href="{{ site.organization-link }}" target="_blank" rel="noopener">
<img class="img-fluid" id="mobile-nav-image"
src="{{ site.organization-logo-nav | relative_url }}" title="{{ site.organization-name }}"
alt="{{ site.organization-name | escape }} home">
</a>
<p class="h2 my-3 notable">Brought to you by
<a href="{{ site.organization-link }}" target="_blank" rel="noopener">
<img class="img-fluid bg-dark rounded mt-2" src="{{ site.organization-logo-nav | relative_url }}" title="{{ site.organization-name }}" alt="{{ site.organization-name | escape }} home">
</a>
</p>
</div>

</div>
</div>
</div>
</nav>
<script type="application/javascript">

<script >
var sitePages = [
{% for page in site.pages %}{% if page.title %}{% unless page.url contains '404' %}
{
Expand Down Expand Up @@ -142,5 +117,5 @@ <h2 class="offcanvas-title notable" id="offcanvasNavbarLabel"><a class="text-dar
}


</script>
</script>

2 changes: 1 addition & 1 deletion _includes/svg/mobile/browse-flat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 22 additions & 14 deletions _includes/svg/nav-stack.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
<p class="h2 my-3 notable">The Collecton</a>
<a href="{{ '/about.html' | relative_url }}">{% include svg/mobile/about-flat.svg %}</a>
<a href="{{ '/browse.html' | relative_url }}">{% include svg/mobile/browse-flat.svg %}</a>
<p class="h2 my-3 notable">The Essays</a>
<a href="{{ '/essay/' | relative_url }}">{% include svg/mobile/intro-down-arrow.svg %}</a>
<a href="{{ '/essay/cult-classics.html' | relative_url }}">{% include svg/mobile/cult-flat.svg %}</a>
<a href="{{ '/essay/horror.html' | relative_url }}">{% include svg/mobile/horror-flat.svg %}</a>
<a href="{{ '/essay/westerns.html' | relative_url }}">{% include svg/mobile/westerns-flat.svg %}</a>
<p class="h2 my-3 notable">The Data</a>
<a href="{{ '/inventory.html' | relative_url }}">{% include svg/mobile/inventory-flat.svg %}</a>
<a href="{{ '/recommendations.html' | relative_url }}">{% include svg/mobile/recommendations-flat.svg %}</a>
<a href="{{ '/subjects.html' | relative_url }}">{% include svg/mobile/subjects-flat.svg %}</a>
<a href="{{ '/data.html' | relative_url }}">{% include svg/mobile/data-flat.svg %}</a>

<p class="h2 my-3 notable">The Collection

<a href="{{ '/about.html' | relative_url }}">{% include svg/mobile/about-flat.svg %}</a>
<a href="{{ '/browse.html' | relative_url }}">{% include svg/mobile/browse-flat.svg %}</a>

</p>

<p class="h2 my-3 notable">The Essays

<a href="{{ '/essay/' | relative_url }}">{% include svg/mobile/intro-down-arrow.svg %}</a>
<a href="{{ '/essay/cult-classics.html' | relative_url }}">{% include svg/mobile/cult-flat.svg %}</a>
<a href="{{ '/essay/horror.html' | relative_url }}">{% include svg/mobile/horror-flat.svg %}</a>
<a href="{{ '/essay/westerns.html' | relative_url }}">{% include svg/mobile/westerns-flat.svg %}</a>

<p class="h2 my-3 notable">The Data

<a href="{{ '/inventory.html' | relative_url }}">{% include svg/mobile/inventory-flat.svg %}</a>
<a href="{{ '/recommendations.html' | relative_url }}">{% include svg/mobile/recommendations-flat.svg %}</a>
<a href="{{ '/subjects.html' | relative_url }}">{% include svg/mobile/subjects-flat.svg %}</a>
<a href="{{ '/data.html' | relative_url }}">{% include svg/mobile/data-flat.svg %}</a>

</p>

0 comments on commit 6c1c791

Please sign in to comment.